| OLD | NEW |
| 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 #include <list> | 5 #include <list> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "content/public/browser/render_view_host.h" | 37 #include "content/public/browser/render_view_host.h" |
| 38 #include "content/public/browser/render_widget_host.h" | 38 #include "content/public/browser/render_widget_host.h" |
| 39 #include "content/public/browser/resource_controller.h" | 39 #include "content/public/browser/resource_controller.h" |
| 40 #include "content/public/browser/resource_dispatcher_host.h" | 40 #include "content/public/browser/resource_dispatcher_host.h" |
| 41 #include "content/public/browser/resource_throttle.h" | 41 #include "content/public/browser/resource_throttle.h" |
| 42 #include "content/public/browser/web_contents.h" | 42 #include "content/public/browser/web_contents.h" |
| 43 #include "content/public/common/context_menu_params.h" | 43 #include "content/public/common/context_menu_params.h" |
| 44 #include "content/public/common/resource_type.h" | 44 #include "content/public/common/resource_type.h" |
| 45 #include "content/public/common/url_constants.h" | 45 #include "content/public/common/url_constants.h" |
| 46 #include "content/public/test/browser_test_utils.h" | 46 #include "content/public/test/browser_test_utils.h" |
| 47 #include "content/public/test/test_utils.h" |
| 47 #include "extensions/browser/extension_system.h" | 48 #include "extensions/browser/extension_system.h" |
| 48 #include "extensions/common/switches.h" | 49 #include "extensions/common/switches.h" |
| 49 #include "extensions/test/result_catcher.h" | 50 #include "extensions/test/result_catcher.h" |
| 50 #include "net/dns/mock_host_resolver.h" | 51 #include "net/dns/mock_host_resolver.h" |
| 51 #include "net/test/embedded_test_server/embedded_test_server.h" | 52 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 52 #include "third_party/WebKit/public/web/WebContextMenuData.h" | 53 #include "third_party/WebKit/public/web/WebContextMenuData.h" |
| 53 #include "third_party/WebKit/public/web/WebInputEvent.h" | 54 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 54 | 55 |
| 55 using content::ResourceType; | 56 using content::ResourceType; |
| 56 using content::WebContents; | 57 using content::WebContents; |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 DelayLoadStartAndExecuteJavascript call_script6( | 733 DelayLoadStartAndExecuteJavascript call_script6( |
| 733 test_navigation_listener(), | 734 test_navigation_listener(), |
| 734 embedded_test_server()->GetURL("/test6"), | 735 embedded_test_server()->GetURL("/test6"), |
| 735 "updateHistory()", | 736 "updateHistory()", |
| 736 "empty.html"); | 737 "empty.html"); |
| 737 | 738 |
| 738 ASSERT_TRUE(RunExtensionTest("webnavigation/crossProcessHistory")) | 739 ASSERT_TRUE(RunExtensionTest("webnavigation/crossProcessHistory")) |
| 739 << message_; | 740 << message_; |
| 740 } | 741 } |
| 741 | 742 |
| 743 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, CrossProcessIframe) { |
| 744 content::IsolateAllSitesForTesting(base::CommandLine::ForCurrentProcess()); |
| 745 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 746 ASSERT_TRUE(RunExtensionTest("webnavigation/crossProcessIframe")) << message_; |
| 747 } |
| 748 |
| 742 // TODO(jam): http://crbug.com/350550 | 749 // TODO(jam): http://crbug.com/350550 |
| 743 #if !(defined(OS_CHROMEOS) && defined(ADDRESS_SANITIZER)) | 750 #if !(defined(OS_CHROMEOS) && defined(ADDRESS_SANITIZER)) |
| 744 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Crash) { | 751 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Crash) { |
| 745 ASSERT_TRUE(StartEmbeddedTestServer()); | 752 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 746 | 753 |
| 747 // Wait for the extension to set itself up and return control to us. | 754 // Wait for the extension to set itself up and return control to us. |
| 748 ASSERT_TRUE(RunExtensionTest("webnavigation/crash")) << message_; | 755 ASSERT_TRUE(RunExtensionTest("webnavigation/crash")) << message_; |
| 749 | 756 |
| 750 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | 757 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); |
| 751 content::WaitForLoadStop(tab); | 758 content::WaitForLoadStop(tab); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 765 "extensions/api_test/webnavigation/crash/b.html", | 772 "extensions/api_test/webnavigation/crash/b.html", |
| 766 embedded_test_server()->port())); | 773 embedded_test_server()->port())); |
| 767 ui_test_utils::NavigateToURL(browser(), url); | 774 ui_test_utils::NavigateToURL(browser(), url); |
| 768 | 775 |
| 769 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 776 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 770 } | 777 } |
| 771 | 778 |
| 772 #endif | 779 #endif |
| 773 | 780 |
| 774 } // namespace extensions | 781 } // namespace extensions |
| OLD | NEW |