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