Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: chrome/browser/extensions/activity_log/activity_log_browsertest.cc

Issue 2828143003: NoStatePrefetch: update the fieldtrial_testing_config (Closed)
Patch Set: force prerendering in customtabs tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 22 matching lines...) Expand all
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 } 39 }
40 40
41 void SetUpOnMainThread() override { 41 void SetUpOnMainThread() override {
42 ExtensionApiTest::SetUpOnMainThread(); 42 ExtensionApiTest::SetUpOnMainThread();
43 prerender::PrerenderManager::SetMode( 43 prerender::PrerenderManager::SetOmniboxMode(
44 prerender::PrerenderManager::PRERENDER_MODE_ENABLED); 44 prerender::PrerenderManager::PRERENDER_MODE_ENABLED);
45 } 45 }
46 46
47 static void Prerender_Arguments( 47 static void Prerender_Arguments(
48 const std::string& extension_id, 48 const std::string& extension_id,
49 uint16_t port, 49 uint16_t port,
50 const base::Closure& quit_when_idle_closure, 50 const base::Closure& quit_when_idle_closure,
51 std::unique_ptr<std::vector<scoped_refptr<Action>>> i) { 51 std::unique_ptr<std::vector<scoped_refptr<Action>>> i) {
52 quit_when_idle_closure.Run(); 52 quit_when_idle_closure.Run();
53 53
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 activity_log->GetFilteredActions( 120 activity_log->GetFilteredActions(
121 ext->id(), Action::ACTION_ANY, "", "", "", -1, 121 ext->id(), Action::ACTION_ANY, "", "", "", -1,
122 base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port, 122 base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port,
123 run_loop.QuitWhenIdleClosure())); 123 run_loop.QuitWhenIdleClosure()));
124 124
125 // Allow invocation of Prerender_Arguments 125 // Allow invocation of Prerender_Arguments
126 run_loop.Run(); 126 run_loop.Run();
127 } 127 }
128 128
129 } // namespace extensions 129 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698