OLD | NEW |
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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 459 } |
460 | 460 |
461 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, WebUI) { | 461 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, WebUI) { |
462 WebContents* popup = | 462 WebContents* popup = |
463 RunCheckTest(browser(), | 463 RunCheckTest(browser(), |
464 "/popup_blocker/popup-webui.html", | 464 "/popup_blocker/popup-webui.html", |
465 ExpectPopup, | 465 ExpectPopup, |
466 DontCheckTitle); | 466 DontCheckTitle); |
467 | 467 |
468 // Check that the new popup displays about:blank. | 468 // Check that the new popup displays about:blank. |
469 EXPECT_EQ(GURL(content::kAboutBlankURL), popup->GetURL()); | 469 EXPECT_EQ(GURL(url::kAboutBlankURL), popup->GetURL()); |
470 } | 470 } |
471 | 471 |
472 // Verify that the renderer can't DOS the browser by creating arbitrarily many | 472 // Verify that the renderer can't DOS the browser by creating arbitrarily many |
473 // popups. | 473 // popups. |
474 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, DenialOfService) { | 474 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, DenialOfService) { |
475 GURL url(embedded_test_server()->GetURL("/popup_blocker/popup-dos.html")); | 475 GURL url(embedded_test_server()->GetURL("/popup_blocker/popup-dos.html")); |
476 ui_test_utils::NavigateToURL(browser(), url); | 476 ui_test_utils::NavigateToURL(browser(), url); |
477 ASSERT_EQ(25, GetBlockedContentsCount()); | 477 ASSERT_EQ(25, GetBlockedContentsCount()); |
478 } | 478 } |
479 | 479 |
480 } // namespace | 480 } // namespace |
OLD | NEW |