Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc

Issue 11818065: OK, here's john's patch plus my sync stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Redisable PlatformAppBrowserTest.WebContentsHasFocus on aura Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // This test creates a fake safebrowsing service, where we can inject 5 // This test creates a fake safebrowsing service, where we can inject
6 // malware and phishing urls. It then uses a real browser to go to 6 // malware and phishing urls. It then uses a real browser to go to
7 // these urls, and sends "goback" or "proceed" commands and verifies 7 // these urls, and sends "goback" or "proceed" commands and verifies
8 // they work. 8 // they work.
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 protected: 554 protected:
555 TestMalwareDetailsFactory details_factory_; 555 TestMalwareDetailsFactory details_factory_;
556 556
557 private: 557 private:
558 TestSafeBrowsingServiceFactory factory_; 558 TestSafeBrowsingServiceFactory factory_;
559 TestSafeBrowsingBlockingPageFactory blocking_page_factory_; 559 TestSafeBrowsingBlockingPageFactory blocking_page_factory_;
560 560
561 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageTest); 561 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageTest);
562 }; 562 };
563 563
564 // TODO(linux_aura) http://crbug.com/163931
565 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)
566 #define MAYBE_MalwareRedirectInIFrameCanceled DISABLED_MalwareRedirectInIFrameCa nceled
567 #else
568 #define MAYBE_MalwareRedirectInIFrameCanceled MalwareRedirectInIFrameCanceled
569 #endif
564 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, 570 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
565 MalwareRedirectInIFrameCanceled) { 571 MAYBE_MalwareRedirectInIFrameCanceled) {
566 // 1. Test the case that redirect is a subresource. 572 // 1. Test the case that redirect is a subresource.
567 MalwareRedirectCancelAndProceed("openWinIFrame"); 573 MalwareRedirectCancelAndProceed("openWinIFrame");
568 // If the redirect was from subresource but canceled, "proceed" will continue 574 // If the redirect was from subresource but canceled, "proceed" will continue
569 // with the rest of resources. 575 // with the rest of resources.
570 AssertNoInterstitial(true); 576 AssertNoInterstitial(true);
571 } 577 }
572 578
573 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, 579 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
574 MalwareRedirectCanceled) { 580 MalwareRedirectCanceled) {
575 // 2. Test the case that redirect is the only resource. 581 // 2. Test the case that redirect is the only resource.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); 787 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING);
782 788
783 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); 789 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link"));
784 AssertNoInterstitial(false); // Assert the interstitial is gone 790 AssertNoInterstitial(false); // Assert the interstitial is gone
785 791
786 // We are in the help page. 792 // We are in the help page.
787 EXPECT_EQ( 793 EXPECT_EQ(
788 "/goodtoknow/online-safety/phishing/", 794 "/goodtoknow/online-safety/phishing/",
789 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); 795 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path());
790 } 796 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698