OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 GURL main_url(embedded_test_server()->GetURL( | 47 GURL main_url(embedded_test_server()->GetURL( |
48 "a.com", | 48 "a.com", |
49 "/frame_tree/page_with_two_frames_remote_and_local.html")); | 49 "/frame_tree/page_with_two_frames_remote_and_local.html")); |
50 ui_test_utils::NavigateToURL(browser(), main_url); | 50 ui_test_utils::NavigateToURL(browser(), main_url); |
51 } | 51 } |
52 | 52 |
53 // Verify that origin replication allows JS access to localStorage, database, | 53 // Verify that origin replication allows JS access to localStorage, database, |
54 // and FileSystem APIs. These features involve a check on the | 54 // and FileSystem APIs. These features involve a check on the |
55 // WebSecurityOrigin of the topmost WebFrame in ContentSettingsObserver, and | 55 // WebSecurityOrigin of the topmost WebFrame in ContentSettingsObserver, and |
56 // this test ensures this check works when the top frame is remote. | 56 // this test ensures this check works when the top frame is remote. |
| 57 // |
| 58 // Disabled due to a shutdown race condition that can lead to UAF in the |
| 59 // renderer (https://crbug.com/470055). |
57 IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, | 60 IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, |
58 OriginReplicationAllowsAccessToStorage) { | 61 DISABLED_OriginReplicationAllowsAccessToStorage) { |
59 // Navigate to a page with a same-site iframe. | 62 // Navigate to a page with a same-site iframe. |
60 GURL main_url(embedded_test_server()->GetURL("a.com", "/iframe.html")); | 63 GURL main_url(embedded_test_server()->GetURL("a.com", "/iframe.html")); |
61 ui_test_utils::NavigateToURL(browser(), main_url); | 64 ui_test_utils::NavigateToURL(browser(), main_url); |
62 | 65 |
63 // Navigate subframe cross-site. | 66 // Navigate subframe cross-site. |
64 content::WebContents* active_web_contents = | 67 content::WebContents* active_web_contents = |
65 browser()->tab_strip_model()->GetActiveWebContents(); | 68 browser()->tab_strip_model()->GetActiveWebContents(); |
66 GURL cross_site_url(embedded_test_server()->GetURL("b.com", "/title2.html")); | 69 GURL cross_site_url(embedded_test_server()->GetURL("b.com", "/title2.html")); |
67 EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", cross_site_url)); | 70 EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", cross_site_url)); |
68 | 71 |
(...skipping 22 matching lines...) Expand all Loading... |
91 EXPECT_TRUE(ExecuteScriptAndExtractBool( | 94 EXPECT_TRUE(ExecuteScriptAndExtractBool( |
92 frame_host, | 95 frame_host, |
93 "window.domAutomationController.send(!!openDatabase(" | 96 "window.domAutomationController.send(!!openDatabase(" |
94 "'foodb', '1.0', 'Test DB', 1024));", | 97 "'foodb', '1.0', 'Test DB', 1024));", |
95 &is_object_created)); | 98 &is_object_created)); |
96 EXPECT_TRUE(is_object_created); | 99 EXPECT_TRUE(is_object_created); |
97 EXPECT_TRUE(ExecuteScript(frame_host, | 100 EXPECT_TRUE(ExecuteScript(frame_host, |
98 "window.webkitRequestFileSystem(" | 101 "window.webkitRequestFileSystem(" |
99 "window.TEMPORARY, 1024, function() {});")); | 102 "window.TEMPORARY, 1024, function() {});")); |
100 } | 103 } |
OLD | NEW |