| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
explicit MainThreadDefaultHandle(Add a SingleThreadTaskRunnerCurrentDefaultHandleTest?
base::CurrentThread::Get()->SetTaskRunner(task_runner);Ouch, that was terrible, glad we removed that possibility..!
Well I guess it's still possible with CurrentHandleOverrideForTesting 😞, worth making that private+friend..?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
+amehfooz@ for ui/message_center/
explicit MainThreadDefaultHandle(Add a SingleThreadTaskRunnerCurrentDefaultHandleTest?
Do you mean to avoid friendship ScopedMockTimeMessageLoopTaskRunner?
I don't think it's worth for one-of, and we don't actually want to let other tests (more) easily use this?
base::CurrentThread::Get()->SetTaskRunner(task_runner);Ouch, that was terrible, glad we removed that possibility..!
Well I guess it's still possible with CurrentHandleOverrideForTesting 😞, worth making that private+friend..?
At least CurrentHandleOverrideForTesting forces scoping.
3 out of 4 CurrentHandleOverrideForTesting just use it with TestMockTimeTaskRunner, which is the same thing as ScopedMockTimeMessageLoopTaskRunner.
https://source.chromium.org/search?q=CurrentHandleOverrideForTesting%20-file:base&sq=&ss=chromium
We already encourage TaskEnvironment over ScopedMockTimeMessageLoopTaskRunner, but since this isn't supported for e.g. browser tests, ScopedMockTimeMessageLoopTaskRunner is still useful.
Idk if it's worth forcing people to add friendship for new usage; there's also a PRESUBMIT.py for ScopedMockTimeMessageLoopTaskRunner, but not for CurrentHandleOverrideForTesting (I could add that).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
explicit MainThreadDefaultHandle(Etienne Pierre-DorayAdd a SingleThreadTaskRunnerCurrentDefaultHandleTest?
Do you mean to avoid friendship ScopedMockTimeMessageLoopTaskRunner?
I don't think it's worth for one-of, and we don't actually want to let other tests (more) easily use this?
No, I mean a unittest (that's an existing test fixture name)
base::CurrentThread::Get()->SetTaskRunner(task_runner);Etienne Pierre-DorayOuch, that was terrible, glad we removed that possibility..!
Well I guess it's still possible with CurrentHandleOverrideForTesting 😞, worth making that private+friend..?
At least CurrentHandleOverrideForTesting forces scoping.
3 out of 4 CurrentHandleOverrideForTesting just use it with TestMockTimeTaskRunner, which is the same thing as ScopedMockTimeMessageLoopTaskRunner.
https://source.chromium.org/search?q=CurrentHandleOverrideForTesting%20-file:base&sq=&ss=chromium
We already encourage TaskEnvironment over ScopedMockTimeMessageLoopTaskRunner, but since this isn't supported for e.g. browser tests, ScopedMockTimeMessageLoopTaskRunner is still useful.
Idk if it's worth forcing people to add friendship for new usage; there's also a PRESUBMIT.py for ScopedMockTimeMessageLoopTaskRunner, but not for CurrentHandleOverrideForTesting (I could add that).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Etienne Pierre-DorayAdd a SingleThreadTaskRunnerCurrentDefaultHandleTest?
Gabriel CharetteDo you mean to avoid friendship ScopedMockTimeMessageLoopTaskRunner?
I don't think it's worth for one-of, and we don't actually want to let other tests (more) easily use this?
No, I mean a unittest (that's an existing test fixture name)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +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. |
[task] Remove CurrentThread::SetTaskRunner
This CL removes CurrentThread::SetTaskRunner(), and uses better
alternatives in the 2 existing calls to it.
Drive-by: uses optional to hold
CurrentDefaultHandle/MainThreadDefaultHandle, leveraging pass key
pattern.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |