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 "base/strings/stringprintf.h" | 5 #include "base/strings/stringprintf.h" |
6 #include "chrome/browser/extensions/activity_log/activity_log.h" | 6 #include "chrome/browser/extensions/activity_log/activity_log.h" |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
9 #include "chrome/browser/prerender/prerender_handle.h" | 9 #include "chrome/browser/prerender/prerender_handle.h" |
10 #include "chrome/browser/prerender/prerender_manager.h" | 10 #include "chrome/browser/prerender/prerender_manager.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace extensions { | 23 namespace extensions { |
24 | 24 |
25 // Only the prerender tests are in this file. To add tests for activity | 25 // Only the prerender tests are in this file. To add tests for activity |
26 // logging please see: | 26 // logging please see: |
27 // chrome/test/data/extensions/api_test/activity_log_private/README | 27 // chrome/test/data/extensions/api_test/activity_log_private/README |
28 | 28 |
29 class ActivityLogPrerenderTest : public ExtensionApiTest { | 29 class ActivityLogPrerenderTest : public ExtensionApiTest { |
30 protected: | 30 protected: |
31 // Make sure the activity log is turned on. | 31 // Make sure the activity log is turned on. |
32 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 32 virtual void SetUpCommandLine(CommandLine* command_line) override { |
33 ExtensionBrowserTest::SetUpCommandLine(command_line); | 33 ExtensionBrowserTest::SetUpCommandLine(command_line); |
34 command_line->AppendSwitch(switches::kEnableExtensionActivityLogging); | 34 command_line->AppendSwitch(switches::kEnableExtensionActivityLogging); |
35 command_line->AppendSwitchASCII(switches::kPrerenderMode, | 35 command_line->AppendSwitchASCII(switches::kPrerenderMode, |
36 switches::kPrerenderModeSwitchValueEnabled); | 36 switches::kPrerenderModeSwitchValueEnabled); |
37 } | 37 } |
38 | 38 |
39 static void Prerender_Arguments( | 39 static void Prerender_Arguments( |
40 const std::string& extension_id, | 40 const std::string& extension_id, |
41 int port, | 41 int port, |
42 scoped_ptr<std::vector<scoped_refptr<Action> > > i) { | 42 scoped_ptr<std::vector<scoped_refptr<Action> > > i) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 "", | 126 "", |
127 -1, | 127 -1, |
128 base::Bind( | 128 base::Bind( |
129 ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port)); | 129 ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port)); |
130 | 130 |
131 // Allow invocation of Prerender_Arguments | 131 // Allow invocation of Prerender_Arguments |
132 base::MessageLoop::current()->Run(); | 132 base::MessageLoop::current()->Run(); |
133 } | 133 } |
134 | 134 |
135 } // namespace extensions | 135 } // namespace extensions |
OLD | NEW |