| 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" |
| 11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/content_settings/host_content_settings_map.h" | |
| 13 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 16 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 15 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 17 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| 18 #include "chrome/browser/ui/browser_commands.h" | 17 #include "chrome/browser/ui/browser_commands.h" |
| 19 #include "chrome/browser/ui/browser_finder.h" | 18 #include "chrome/browser/ui/browser_finder.h" |
| 20 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| 21 #include "chrome/browser/ui/location_bar/location_bar.h" | 20 #include "chrome/browser/ui/location_bar/location_bar.h" |
| 22 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | 21 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
| 23 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 22 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 24 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 23 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 25 #include "chrome/common/chrome_paths.h" | 24 #include "chrome/common/chrome_paths.h" |
| 26 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 27 #include "chrome/test/base/in_process_browser_test.h" | 26 #include "chrome/test/base/in_process_browser_test.h" |
| 28 #include "chrome/test/base/test_switches.h" | 27 #include "chrome/test/base/test_switches.h" |
| 29 #include "chrome/test/base/ui_test_utils.h" | 28 #include "chrome/test/base/ui_test_utils.h" |
| 29 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 30 #include "components/omnibox/autocomplete_match.h" | 30 #include "components/omnibox/autocomplete_match.h" |
| 31 #include "components/omnibox/autocomplete_result.h" | 31 #include "components/omnibox/autocomplete_result.h" |
| 32 #include "content/public/browser/notification_registrar.h" | 32 #include "content/public/browser/notification_registrar.h" |
| 33 #include "content/public/browser/notification_service.h" | 33 #include "content/public/browser/notification_service.h" |
| 34 #include "content/public/browser/render_frame_host.h" | 34 #include "content/public/browser/render_frame_host.h" |
| 35 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
| 36 #include "content/public/browser/web_contents_observer.h" | 36 #include "content/public/browser/web_contents_observer.h" |
| 37 #include "content/public/common/url_constants.h" | 37 #include "content/public/common/url_constants.h" |
| 38 #include "content/public/test/browser_test_utils.h" | 38 #include "content/public/test/browser_test_utils.h" |
| 39 #include "content/public/test/test_navigation_observer.h" | 39 #include "content/public/test/test_navigation_observer.h" |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |