OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_host/test/test_render_view_host.h" | |
6 | 5 |
7 #include "chrome/browser/browser_thread.h" | 6 #include "chrome/browser/browser_thread.h" |
8 #include "chrome/browser/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/safe_browsing/malware_details.h" | 9 #include "chrome/browser/safe_browsing/malware_details.h" |
11 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
12 #include "chrome/browser/tab_contents/navigation_entry.h" | |
13 #include "chrome/browser/tab_contents/test_tab_contents.h" | |
14 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
15 #include "chrome/common/render_messages.h" | 12 #include "chrome/common/render_messages.h" |
16 #include "chrome/common/render_messages_params.h" | 13 #include "chrome/common/render_messages_params.h" |
| 14 #include "content/browser/renderer_host/test_render_view_host.h" |
| 15 #include "content/browser/tab_contents/navigation_entry.h" |
| 16 #include "content/browser/tab_contents/test_tab_contents.h" |
17 | 17 |
18 static const char* kGoogleURL = "http://www.google.com/"; | 18 static const char* kGoogleURL = "http://www.google.com/"; |
19 static const char* kGoodURL = "http://www.goodguys.com/"; | 19 static const char* kGoodURL = "http://www.goodguys.com/"; |
20 static const char* kBadURL = "http://www.badguys.com/"; | 20 static const char* kBadURL = "http://www.badguys.com/"; |
21 static const char* kBadURL2 = "http://www.badguys2.com/"; | 21 static const char* kBadURL2 = "http://www.badguys2.com/"; |
22 static const char* kBadURL3 = "http://www.badguys3.com/"; | 22 static const char* kBadURL3 = "http://www.badguys3.com/"; |
23 | 23 |
24 // A SafeBrowingBlockingPage class that does not create windows. | 24 // A SafeBrowingBlockingPage class that does not create windows. |
25 class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage { | 25 class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage { |
26 public: | 26 public: |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 | 573 |
574 EXPECT_TRUE(contents()->profile()->GetPrefs()->GetBoolean( | 574 EXPECT_TRUE(contents()->profile()->GetPrefs()->GetBoolean( |
575 prefs::kSafeBrowsingReportingEnabled)); | 575 prefs::kSafeBrowsingReportingEnabled)); |
576 | 576 |
577 // Simulate the user uncheck the report agreement checkbox. | 577 // Simulate the user uncheck the report agreement checkbox. |
578 sb_interstitial->SetReportingPreference(false); | 578 sb_interstitial->SetReportingPreference(false); |
579 | 579 |
580 EXPECT_FALSE(contents()->profile()->GetPrefs()->GetBoolean( | 580 EXPECT_FALSE(contents()->profile()->GetPrefs()->GetBoolean( |
581 prefs::kSafeBrowsingReportingEnabled)); | 581 prefs::kSafeBrowsingReportingEnabled)); |
582 } | 582 } |
OLD | NEW |