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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 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
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 <list> 5 #include <list>
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
(...skipping 12 matching lines...) Expand all
23 using content::NavigationEntry; 23 using content::NavigationEntry;
24 using content::WebContents; 24 using content::WebContents;
25 using content::WebContentsTester; 25 using content::WebContentsTester;
26 26
27 static const char* kGoogleURL = "http://www.google.com/"; 27 static const char* kGoogleURL = "http://www.google.com/";
28 static const char* kGoodURL = "http://www.goodguys.com/"; 28 static const char* kGoodURL = "http://www.goodguys.com/";
29 static const char* kBadURL = "http://www.badguys.com/"; 29 static const char* kBadURL = "http://www.badguys.com/";
30 static const char* kBadURL2 = "http://www.badguys2.com/"; 30 static const char* kBadURL2 = "http://www.badguys2.com/";
31 static const char* kBadURL3 = "http://www.badguys3.com/"; 31 static const char* kBadURL3 = "http://www.badguys3.com/";
32 32
33 namespace safe_browsing {
34
33 namespace { 35 namespace {
34 36
35 // A SafeBrowingBlockingPage class that does not create windows. 37 // A SafeBrowingBlockingPage class that does not create windows.
36 class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage { 38 class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage {
37 public: 39 public:
38 TestSafeBrowsingBlockingPage(SafeBrowsingUIManager* manager, 40 TestSafeBrowsingBlockingPage(SafeBrowsingUIManager* manager,
39 WebContents* web_contents, 41 WebContents* web_contents,
40 const UnsafeResourceList& unsafe_resources) 42 const UnsafeResourceList& unsafe_resources)
41 : SafeBrowsingBlockingPage(manager, web_contents, unsafe_resources) { 43 : SafeBrowsingBlockingPage(manager, web_contents, unsafe_resources) {
42 // Don't delay details at all for the unittest. 44 // Don't delay details at all for the unittest.
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 679
678 EXPECT_TRUE(profile->GetPrefs()->GetBoolean( 680 EXPECT_TRUE(profile->GetPrefs()->GetBoolean(
679 prefs::kSafeBrowsingExtendedReportingEnabled)); 681 prefs::kSafeBrowsingExtendedReportingEnabled));
680 682
681 // Simulate the user uncheck the report agreement checkbox. 683 // Simulate the user uncheck the report agreement checkbox.
682 sb_interstitial->SetReportingPreference(false); 684 sb_interstitial->SetReportingPreference(false);
683 685
684 EXPECT_FALSE(profile->GetPrefs()->GetBoolean( 686 EXPECT_FALSE(profile->GetPrefs()->GetBoolean(
685 prefs::kSafeBrowsingExtendedReportingEnabled)); 687 prefs::kSafeBrowsingExtendedReportingEnabled));
686 } 688 }
689
690 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698