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 "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" |
11 #include "content/public/browser/interstitial_page.h" | 11 #include "content/public/browser/interstitial_page.h" |
12 #include "content/public/browser/navigation_entry.h" | 12 #include "content/public/browser/navigation_entry.h" |
13 #include "content/public/browser/render_process_host.h" | 13 #include "content/public/browser/render_process_host.h" |
14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
15 #include "content/public/browser/web_contents_view.h" | 15 #include "content/public/browser/web_contents_view.h" |
16 #include "content/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
17 #include "content/test/web_contents_tester.h" | 17 #include "content/test/web_contents_tester.h" |
18 | 18 |
19 using content::BrowserThread; | 19 using content::BrowserThread; |
20 using content::InterstitialPage; | 20 using content::InterstitialPage; |
21 using content::NavigationEntry; | 21 using content::NavigationEntry; |
22 using content::WebContents; | 22 using content::WebContents; |
23 using content::WebContentsTester; | 23 using content::WebContentsTester; |
24 using content::WebContentsView; | 24 using content::WebContentsView; |
25 | 25 |
26 static const char* kGoogleURL = "http://www.google.com/"; | 26 static const char* kGoogleURL = "http://www.google.com/"; |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |