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