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

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

Issue 685553002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 public: 337 public:
338 enum Visibility { 338 enum Visibility {
339 VISIBILITY_ERROR = -1, 339 VISIBILITY_ERROR = -1,
340 HIDDEN = 0, 340 HIDDEN = 0,
341 VISIBLE = 1 341 VISIBLE = 1
342 }; 342 };
343 343
344 SafeBrowsingBlockingPageBrowserTest() { 344 SafeBrowsingBlockingPageBrowserTest() {
345 } 345 }
346 346
347 virtual void SetUp() override { 347 void SetUp() override {
348 SafeBrowsingService::RegisterFactory(&factory_); 348 SafeBrowsingService::RegisterFactory(&factory_);
349 SafeBrowsingBlockingPage::RegisterFactory(&blocking_page_factory_); 349 SafeBrowsingBlockingPage::RegisterFactory(&blocking_page_factory_);
350 MalwareDetails::RegisterFactory(&details_factory_); 350 MalwareDetails::RegisterFactory(&details_factory_);
351 InProcessBrowserTest::SetUp(); 351 InProcessBrowserTest::SetUp();
352 } 352 }
353 353
354 virtual void TearDown() override { 354 void TearDown() override {
355 InProcessBrowserTest::TearDown(); 355 InProcessBrowserTest::TearDown();
356 SafeBrowsingBlockingPage::RegisterFactory(NULL); 356 SafeBrowsingBlockingPage::RegisterFactory(NULL);
357 SafeBrowsingService::RegisterFactory(NULL); 357 SafeBrowsingService::RegisterFactory(NULL);
358 MalwareDetails::RegisterFactory(NULL); 358 MalwareDetails::RegisterFactory(NULL);
359 } 359 }
360 360
361 void SetUpInProcessBrowserTestFixture() override { 361 void SetUpInProcessBrowserTestFixture() override {
362 ASSERT_TRUE(test_server()->Start()); 362 ASSERT_TRUE(test_server()->Start());
363 } 363 }
364 364
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest, PhishingLearnMore) { 837 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest, PhishingLearnMore) {
838 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); 838 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING);
839 EXPECT_TRUE(ClickAndWaitForDetach("help-link")); 839 EXPECT_TRUE(ClickAndWaitForDetach("help-link"));
840 AssertNoInterstitial(false); // Assert the interstitial is gone 840 AssertNoInterstitial(false); // Assert the interstitial is gone
841 841
842 // We are in the help page. 842 // We are in the help page.
843 EXPECT_EQ( 843 EXPECT_EQ(
844 "/transparencyreport/safebrowsing/", 844 "/transparencyreport/safebrowsing/",
845 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); 845 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path());
846 } 846 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698