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" | 5 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
6 | 6 |
7 #include "chrome/browser/chrome_thread.h" | 7 #include "chrome/browser/chrome_thread.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/browser/tab_contents/navigation_entry.h" | 9 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 10 #include "chrome/common/render_messages_params.h" |
10 | 11 |
11 static const char* kGoogleURL = "http://www.google.com/"; | 12 static const char* kGoogleURL = "http://www.google.com/"; |
12 static const char* kGoodURL = "http://www.goodguys.com/"; | 13 static const char* kGoodURL = "http://www.goodguys.com/"; |
13 static const char* kBadURL = "http://www.badguys.com/"; | 14 static const char* kBadURL = "http://www.badguys.com/"; |
14 static const char* kBadURL2 = "http://www.badguys2.com/"; | 15 static const char* kBadURL2 = "http://www.badguys2.com/"; |
15 static const char* kBadURL3 = "http://www.badguys3.com/"; | 16 static const char* kBadURL3 = "http://www.badguys3.com/"; |
16 | 17 |
17 // A SafeBrowingBlockingPage class that does not create windows. | 18 // A SafeBrowingBlockingPage class that does not create windows. |
18 class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage { | 19 class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage { |
19 public: | 20 public: |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 sb_interstitial->Proceed(); | 406 sb_interstitial->Proceed(); |
406 sb_interstitial->DontProceed(); | 407 sb_interstitial->DontProceed(); |
407 // Proceed() and DontProceed() post a task to update the | 408 // Proceed() and DontProceed() post a task to update the |
408 // SafeBrowsingService::Client. | 409 // SafeBrowsingService::Client. |
409 MessageLoop::current()->RunAllPending(); | 410 MessageLoop::current()->RunAllPending(); |
410 | 411 |
411 // The interstitial should be gone. | 412 // The interstitial should be gone. |
412 EXPECT_EQ(OK, user_response()); | 413 EXPECT_EQ(OK, user_response()); |
413 EXPECT_FALSE(GetSafeBrowsingBlockingPage()); | 414 EXPECT_FALSE(GetSafeBrowsingBlockingPage()); |
414 } | 415 } |
OLD | NEW |