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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 9293008: Move click-to-play out of chrome://flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <deque> 5 #include <deque>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 443 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
444 #if defined(ENABLE_SAFE_BROWSING) 444 #if defined(ENABLE_SAFE_BROWSING)
445 SafeBrowsingService::RegisterFactory(safe_browsing_factory_.get()); 445 SafeBrowsingService::RegisterFactory(safe_browsing_factory_.get());
446 #endif 446 #endif
447 } 447 }
448 448
449 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 449 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
450 command_line->AppendSwitchASCII(switches::kPrerenderMode, 450 command_line->AppendSwitchASCII(switches::kPrerenderMode,
451 switches::kPrerenderModeSwitchValueEnabled); 451 switches::kPrerenderModeSwitchValueEnabled);
452 // This is needed to enable click-to-play without triggering a DCHECK.
453 // It does not actually enable click-to-play.
454 command_line->AppendSwitchASCII(switches::kEnableClickToPlay, "");
455 #if defined(OS_MACOSX) 452 #if defined(OS_MACOSX)
456 // The plugins directory isn't read by default on the Mac, so it needs to be 453 // The plugins directory isn't read by default on the Mac, so it needs to be
457 // explicitly registered. 454 // explicitly registered.
458 FilePath app_dir; 455 FilePath app_dir;
459 PathService::Get(chrome::DIR_APP, &app_dir); 456 PathService::Get(chrome::DIR_APP, &app_dir);
460 command_line->AppendSwitchPath( 457 command_line->AppendSwitchPath(
461 switches::kExtraPluginDir, 458 switches::kExtraPluginDir,
462 app_dir.Append(FILE_PATH_LITERAL("plugins"))); 459 app_dir.Append(FILE_PATH_LITERAL("plugins")));
463 #endif 460 #endif
464 } 461 }
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, MatchCompleteDummy) { 1940 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, MatchCompleteDummy) {
1944 std::deque<FinalStatus> expected_final_status_queue; 1941 std::deque<FinalStatus> expected_final_status_queue;
1945 expected_final_status_queue.push_back(FINAL_STATUS_JAVASCRIPT_ALERT); 1942 expected_final_status_queue.push_back(FINAL_STATUS_JAVASCRIPT_ALERT);
1946 expected_final_status_queue.push_back(FINAL_STATUS_WOULD_HAVE_BEEN_USED); 1943 expected_final_status_queue.push_back(FINAL_STATUS_WOULD_HAVE_BEEN_USED);
1947 PrerenderTestURL("files/prerender/prerender_alert_before_onload.html", 1944 PrerenderTestURL("files/prerender/prerender_alert_before_onload.html",
1948 expected_final_status_queue, 1); 1945 expected_final_status_queue, 1);
1949 NavigateToDestURL(); 1946 NavigateToDestURL();
1950 } 1947 }
1951 1948
1952 } // namespace prerender 1949 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698