OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/safe_browsing/ui_manager.h" | 5 #include "chrome/browser/safe_browsing/ui_manager.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.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/safe_browsing/safe_browsing_service.h" | 9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
10 #include "chrome/browser/safe_browsing/ui_manager.h" | 10 #include "chrome/browser/safe_browsing/ui_manager.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
344 web_contents, | 344 web_contents, |
345 main_frame_url, | 345 main_frame_url, |
346 unsafe_resources, | 346 unsafe_resources, |
347 BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( | 347 BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( |
348 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), | 348 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), |
349 false, | 349 false, |
350 false, | 350 false, |
351 false, | 351 false, |
352 false, | 352 false, |
353 false, | 353 false, |
354 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources))) { | 354 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), |
355 nullptr)) { | |
Jialiu Lin
2017/05/17 15:47:46
nit: add some inline comment.
Nate Fischer
2017/05/17 22:34:43
Acknowledged. I'm assigning the value from a funct
Nate Fischer
2017/05/19 00:13:32
I couldn't get the method to actually work nicely,
| |
355 // Don't delay details at all for the unittest. | 356 // Don't delay details at all for the unittest. |
356 SetThreatDetailsProceedDelayForTesting(0); | 357 SetThreatDetailsProceedDelayForTesting(0); |
357 DontCreateViewForTesting(); | 358 DontCreateViewForTesting(); |
358 } | 359 } |
359 }; | 360 }; |
360 | 361 |
361 // A factory that creates TestSafeBrowsingBlockingPages. | 362 // A factory that creates TestSafeBrowsingBlockingPages. |
362 class TestSafeBrowsingBlockingPageFactory | 363 class TestSafeBrowsingBlockingPageFactory |
363 : public SafeBrowsingBlockingPageFactory { | 364 : public SafeBrowsingBlockingPageFactory { |
364 public: | 365 public: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 SimulateBlockingPageDone(resources, true); | 415 SimulateBlockingPageDone(resources, true); |
415 EXPECT_TRUE(delegate.visible_security_state_changed()); | 416 EXPECT_TRUE(delegate.visible_security_state_changed()); |
416 | 417 |
417 waiter.WaitForCallback(); | 418 waiter.WaitForCallback(); |
418 EXPECT_TRUE(waiter.callback_called()); | 419 EXPECT_TRUE(waiter.callback_called()); |
419 EXPECT_TRUE(waiter.proceed()); | 420 EXPECT_TRUE(waiter.proceed()); |
420 EXPECT_TRUE(IsWhitelisted(resource)); | 421 EXPECT_TRUE(IsWhitelisted(resource)); |
421 } | 422 } |
422 | 423 |
423 } // namespace safe_browsing | 424 } // namespace safe_browsing |
OLD | NEW |