base::OnceClosure quit_closure_;I'm not sure that the change from storing the base::RunLoop to QuitClosure is needed here. I think we can leave RunLoop as it was. I'm not sure that the pattern used in this CL is widespread, so let's ask Tom what he thinks.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (!is_android && !is_chromeos && (is_linux || is_win || is_mac)) {TODO: remove "!is_android"
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
EXPECT_TRUE(
base::test::RunUntil([&]() { return call_count >= kAudioBusesNumber; }));Avoiding `RunLoop::RunUntilIdle()` is definitely a win here. Your approach does work, though we can simplify this a bit to avoid the need for the `call_count` variable (keeping the setup from the unit test mostly the same).
Instead we can `RunUntil` the expectations have been satisfied, something like
```
EXPECT_TRUE(base::test::RunUntil(
[&]() { return testing::Mock::VerifyAndClear(&callback); }));
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
EXPECT_TRUE(
base::test::RunUntil([&]() { return call_count >= kAudioBusesNumber; }));Avoiding `RunLoop::RunUntilIdle()` is definitely a win here. Your approach does work, though we can simplify this a bit to avoid the need for the `call_count` variable (keeping the setup from the unit test mostly the same).
Instead we can `RunUntil` the expectations have been satisfied, something like
```
EXPECT_TRUE(base::test::RunUntil(
[&]() { return testing::Mock::VerifyAndClear(&callback); }));
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
LGTM, but I can't give you +1.
For comparison, same test made by AI: https://chromium-review.googlesource.com/c/chromium/src/+/6592061
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Migrate AudioStreamCoordinatorTest into InProcessBrowserTest
Use of TestWithBrowserView is being deprecated and existing
tests requiring a Browser environment are being migrated to
being browser tests.
This CL updates the AudioStreamCoordinatorTest fixture to an
InProcessBrowserTest and removes the TestWithBrowserView
dependency.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |