Chromium Code Reviews| Index: chrome/browser/extensions/activity_log/activity_log_browsertest.cc |
| diff --git a/chrome/browser/extensions/activity_log/activity_log_browsertest.cc b/chrome/browser/extensions/activity_log/activity_log_browsertest.cc |
| index 43664e4d6d39a44b0715c407e44148e084777d9e..1008a8a28c690cd8517c78974e7c87be717a58f4 100644 |
| --- a/chrome/browser/extensions/activity_log/activity_log_browsertest.cc |
| +++ b/chrome/browser/extensions/activity_log/activity_log_browsertest.cc |
| @@ -4,6 +4,7 @@ |
| #include <stdint.h> |
| +#include "base/callback.h" |
| #include "base/location.h" |
| #include "base/run_loop.h" |
| #include "base/single_thread_task_runner.h" |
| @@ -42,10 +43,11 @@ class ActivityLogPrerenderTest : public ExtensionApiTest { |
| static void Prerender_Arguments( |
| const std::string& extension_id, |
| uint16_t port, |
| + const base::Closure& quit_when_idle_closure, |
| std::unique_ptr<std::vector<scoped_refptr<Action>>> i) { |
| - // This is to exit RunLoop (base::MessageLoop::current()->Run()) below |
| - base::ThreadTaskRunnerHandle::Get()->PostTask( |
| - FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| + // This is to exit RunLoop (run_loop.Run()) below |
|
sky
2016/09/08 17:54:33
end sentence with '.'. That said, this comment isn
fdoray
2016/09/09 18:10:50
Actually, posting a QuitWhenIdleClosure() to the c
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, |
| + quit_when_idle_closure); |
| ASSERT_TRUE(i->size()); |
| scoped_refptr<Action> last = i->front(); |
| @@ -112,18 +114,14 @@ IN_PROC_BROWSER_TEST_F(ActivityLogPrerenderTest, TestScriptInjected) { |
| page_observer.Wait(); |
| + base::RunLoop run_loop; |
| activity_log->GetFilteredActions( |
| - ext->id(), |
| - Action::ACTION_ANY, |
| - "", |
| - "", |
| - "", |
| - -1, |
| - base::Bind( |
| - ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port)); |
| + ext->id(), Action::ACTION_ANY, "", "", "", -1, |
| + base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port, |
| + run_loop.QuitWhenIdleClosure())); |
| // Allow invocation of Prerender_Arguments |
| - base::RunLoop().Run(); |
| + run_loop.Run(); |
| } |
| } // namespace extensions |