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

Side by Side Diff: chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc

Issue 681823004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 private: 86 private:
87 base::RunLoop close_loop_; 87 base::RunLoop close_loop_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(CloseObserver); 89 DISALLOW_COPY_AND_ASSIGN(CloseObserver);
90 }; 90 };
91 91
92 class PopupBlockerBrowserTest : public InProcessBrowserTest { 92 class PopupBlockerBrowserTest : public InProcessBrowserTest {
93 public: 93 public:
94 PopupBlockerBrowserTest() {} 94 PopupBlockerBrowserTest() {}
95 virtual ~PopupBlockerBrowserTest() {} 95 ~PopupBlockerBrowserTest() override {}
96 96
97 void SetUpOnMainThread() override { 97 void SetUpOnMainThread() override {
98 InProcessBrowserTest::SetUpOnMainThread(); 98 InProcessBrowserTest::SetUpOnMainThread();
99 99
100 host_resolver()->AddRule("*", "127.0.0.1"); 100 host_resolver()->AddRule("*", "127.0.0.1");
101 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 101 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
102 } 102 }
103 103
104 int GetBlockedContentsCount() { 104 int GetBlockedContentsCount() {
105 // Do a round trip to the renderer first to flush any in-flight IPCs to 105 // Do a round trip to the renderer first to flush any in-flight IPCs to
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 479
480 // Verify that the renderer can't DOS the browser by creating arbitrarily many 480 // Verify that the renderer can't DOS the browser by creating arbitrarily many
481 // popups. 481 // popups.
482 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, DenialOfService) { 482 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, DenialOfService) {
483 GURL url(embedded_test_server()->GetURL("/popup_blocker/popup-dos.html")); 483 GURL url(embedded_test_server()->GetURL("/popup_blocker/popup-dos.html"));
484 ui_test_utils::NavigateToURL(browser(), url); 484 ui_test_utils::NavigateToURL(browser(), url);
485 ASSERT_EQ(25, GetBlockedContentsCount()); 485 ASSERT_EQ(25, GetBlockedContentsCount());
486 } 486 }
487 487
488 } // namespace 488 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698