OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 18 matching lines...) Expand all Loading... | |
29 // Only the prerender tests are in this file. To add tests for activity | 29 // Only the prerender tests are in this file. To add tests for activity |
30 // logging please see: | 30 // logging please see: |
31 // chrome/test/data/extensions/api_test/activity_log_private/README | 31 // chrome/test/data/extensions/api_test/activity_log_private/README |
32 | 32 |
33 class ActivityLogPrerenderTest : public ExtensionApiTest { | 33 class ActivityLogPrerenderTest : public ExtensionApiTest { |
34 protected: | 34 protected: |
35 // Make sure the activity log is turned on. | 35 // Make sure the activity log is turned on. |
36 void SetUpCommandLine(base::CommandLine* command_line) override { | 36 void SetUpCommandLine(base::CommandLine* command_line) override { |
37 ExtensionBrowserTest::SetUpCommandLine(command_line); | 37 ExtensionBrowserTest::SetUpCommandLine(command_line); |
38 command_line->AppendSwitch(switches::kEnableExtensionActivityLogging); | 38 command_line->AppendSwitch(switches::kEnableExtensionActivityLogging); |
39 command_line->AppendSwitchASCII(switches::kPrerenderMode, | |
pasko
2016/12/01 16:47:58
if we are removing this, then the tests will need
droger
2016/12/01 17:17:40
I don't have a simple solution unfortunately.
We c
droger
2016/12/05 14:48:27
Done.
pasko
2016/12/08 15:23:44
In the last version of the code, the above instruc
droger
2016/12/08 15:47:30
I think they would work, but I did not need it in
| |
40 switches::kPrerenderModeSwitchValueEnabled); | |
41 } | 39 } |
42 | 40 |
43 static void Prerender_Arguments( | 41 static void Prerender_Arguments( |
44 const std::string& extension_id, | 42 const std::string& extension_id, |
45 uint16_t port, | 43 uint16_t port, |
46 const base::Closure& quit_when_idle_closure, | 44 const base::Closure& quit_when_idle_closure, |
47 std::unique_ptr<std::vector<scoped_refptr<Action>>> i) { | 45 std::unique_ptr<std::vector<scoped_refptr<Action>>> i) { |
48 quit_when_idle_closure.Run(); | 46 quit_when_idle_closure.Run(); |
49 | 47 |
50 ASSERT_TRUE(i->size()); | 48 ASSERT_TRUE(i->size()); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 activity_log->GetFilteredActions( | 114 activity_log->GetFilteredActions( |
117 ext->id(), Action::ACTION_ANY, "", "", "", -1, | 115 ext->id(), Action::ACTION_ANY, "", "", "", -1, |
118 base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port, | 116 base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port, |
119 run_loop.QuitWhenIdleClosure())); | 117 run_loop.QuitWhenIdleClosure())); |
120 | 118 |
121 // Allow invocation of Prerender_Arguments | 119 // Allow invocation of Prerender_Arguments |
122 run_loop.Run(); | 120 run_loop.Run(); |
123 } | 121 } |
124 | 122 |
125 } // namespace extensions | 123 } // namespace extensions |
OLD | NEW |