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

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

Issue 55323002: Fix tests that were setting safebrowsing factories without unsetting them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes Created 7 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/database_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 719
720 InProcessBrowserTest::SetUp(); 720 InProcessBrowserTest::SetUp();
721 } 721 }
722 722
723 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 723 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
724 #if defined(FULL_SAFE_BROWSING) 724 #if defined(FULL_SAFE_BROWSING)
725 SafeBrowsingService::RegisterFactory(safe_browsing_factory_.get()); 725 SafeBrowsingService::RegisterFactory(safe_browsing_factory_.get());
726 #endif 726 #endif
727 } 727 }
728 728
729 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE {
730 #if defined(FULL_SAFE_BROWSING)
731 SafeBrowsingService::RegisterFactory(NULL);
732 #endif
733 }
734
729 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 735 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
730 command_line->AppendSwitchASCII(switches::kPrerenderMode, 736 command_line->AppendSwitchASCII(switches::kPrerenderMode,
731 switches::kPrerenderModeSwitchValueEnabled); 737 switches::kPrerenderModeSwitchValueEnabled);
732 #if defined(OS_MACOSX) 738 #if defined(OS_MACOSX)
733 // The plugins directory isn't read by default on the Mac, so it needs to be 739 // The plugins directory isn't read by default on the Mac, so it needs to be
734 // explicitly registered. 740 // explicitly registered.
735 base::FilePath app_dir; 741 base::FilePath app_dir;
736 PathService::Get(chrome::DIR_APP, &app_dir); 742 PathService::Get(chrome::DIR_APP, &app_dir);
737 command_line->AppendSwitchPath( 743 command_line->AppendSwitchPath(
738 switches::kExtraPluginDir, 744 switches::kExtraPluginDir,
(...skipping 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after
3243 std::string post_data = "DATA"; 3249 std::string post_data = "DATA";
3244 content::OpenURLParams params(dest_url(), Referrer(), CURRENT_TAB, 3250 content::OpenURLParams params(dest_url(), Referrer(), CURRENT_TAB,
3245 content::PAGE_TRANSITION_TYPED, false); 3251 content::PAGE_TRANSITION_TYPED, false);
3246 params.uses_post = true; 3252 params.uses_post = true;
3247 params.browser_initiated_post_data = 3253 params.browser_initiated_post_data =
3248 base::RefCountedString::TakeString(&post_data); 3254 base::RefCountedString::TakeString(&post_data);
3249 NavigateToURLWithParams(params, false); 3255 NavigateToURLWithParams(params, false);
3250 } 3256 }
3251 3257
3252 } // namespace prerender 3258 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/database_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698