OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |