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

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

Issue 10855260: Safe Browsing malware interstitial redesign field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile warning Created 8 years, 4 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 "chrome/browser/prefs/pref_service.h" 5 #include "chrome/browser/prefs/pref_service.h"
6 #include "chrome/browser/profiles/profile.h" 6 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/safe_browsing/malware_details.h" 7 #include "chrome/browser/safe_browsing/malware_details.h"
8 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 8 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
(...skipping 14 matching lines...) Expand all
25 25
26 static const char* kGoogleURL = "http://www.google.com/"; 26 static const char* kGoogleURL = "http://www.google.com/";
27 static const char* kGoodURL = "http://www.goodguys.com/"; 27 static const char* kGoodURL = "http://www.goodguys.com/";
28 static const char* kBadURL = "http://www.badguys.com/"; 28 static const char* kBadURL = "http://www.badguys.com/";
29 static const char* kBadURL2 = "http://www.badguys2.com/"; 29 static const char* kBadURL2 = "http://www.badguys2.com/";
30 static const char* kBadURL3 = "http://www.badguys3.com/"; 30 static const char* kBadURL3 = "http://www.badguys3.com/";
31 31
32 namespace { 32 namespace {
33 33
34 // A SafeBrowingBlockingPage class that does not create windows. 34 // A SafeBrowingBlockingPage class that does not create windows.
35 class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage { 35 class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPageV1 {
36 public: 36 public:
37 TestSafeBrowsingBlockingPage(SafeBrowsingService* service, 37 TestSafeBrowsingBlockingPage(SafeBrowsingService* service,
38 WebContents* web_contents, 38 WebContents* web_contents,
39 const UnsafeResourceList& unsafe_resources) 39 const UnsafeResourceList& unsafe_resources)
40 : SafeBrowsingBlockingPage(service, web_contents, unsafe_resources) { 40 : SafeBrowsingBlockingPageV1(service, web_contents, unsafe_resources) {
41 // Don't delay details at all for the unittest. 41 // Don't delay details at all for the unittest.
42 malware_details_proceed_delay_ms_ = 0; 42 malware_details_proceed_delay_ms_ = 0;
43 43
44 // Don't create a view. 44 // Don't create a view.
45 interstitial_page()->DontCreateViewForTesting(); 45 interstitial_page()->DontCreateViewForTesting();
46 } 46 }
47 }; 47 };
48 48
49 class TestSafeBrowsingService: public SafeBrowsingService { 49 class TestSafeBrowsingService: public SafeBrowsingService {
50 public: 50 public:
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 EXPECT_TRUE(profile->GetPrefs()->GetBoolean( 631 EXPECT_TRUE(profile->GetPrefs()->GetBoolean(
632 prefs::kSafeBrowsingReportingEnabled)); 632 prefs::kSafeBrowsingReportingEnabled));
633 633
634 // Simulate the user uncheck the report agreement checkbox. 634 // Simulate the user uncheck the report agreement checkbox.
635 sb_interstitial->SetReportingPreference(false); 635 sb_interstitial->SetReportingPreference(false);
636 636
637 EXPECT_FALSE(profile->GetPrefs()->GetBoolean( 637 EXPECT_FALSE(profile->GetPrefs()->GetBoolean(
638 prefs::kSafeBrowsingReportingEnabled)); 638 prefs::kSafeBrowsingReportingEnabled));
639 } 639 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698