| 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/path_service.h" | 5 #include "base/path_service.h" |
| 6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/apps/app_browsertest_util.h" | 8 #include "chrome/browser/apps/app_browsertest_util.h" |
| 9 #include "chrome/browser/chrome_content_browser_client.h" | 9 #include "chrome/browser/chrome_content_browser_client.h" |
| 10 #include "chrome/browser/prerender/prerender_link_manager.h" | 10 #include "chrome/browser/prerender/prerender_link_manager.h" |
| (...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 ui_test_utils::GetCookies(GURL("http://localhost"), | 1540 ui_test_utils::GetCookies(GURL("http://localhost"), |
| 1541 persistent_partition_contents3, | 1541 persistent_partition_contents3, |
| 1542 &cookie_size, &cookie_value); | 1542 &cookie_size, &cookie_value); |
| 1543 EXPECT_EQ("persist2=true", cookie_value); | 1543 EXPECT_EQ("persist2=true", cookie_value); |
| 1544 } | 1544 } |
| 1545 | 1545 |
| 1546 // This tests DOM storage isolation for packaged apps with webview tags. It | 1546 // This tests DOM storage isolation for packaged apps with webview tags. It |
| 1547 // loads an app with multiple webview tags and each tag sets DOM storage | 1547 // loads an app with multiple webview tags and each tag sets DOM storage |
| 1548 // entries, which the test checks to ensure proper storage isolation is | 1548 // entries, which the test checks to ensure proper storage isolation is |
| 1549 // enforced. | 1549 // enforced. |
| 1550 IN_PROC_BROWSER_TEST_F(WebViewTest, DOMStorageIsolation) { | 1550 // Times out regularly on Windows. See http://crbug.com/248873. |
| 1551 #if defined(OS_WIN) |
| 1552 #define MAYBE_DOMStorageIsolation DISABLED_DOMStorageIsolation |
| 1553 #else |
| 1554 #define MAYBE_DOMStorageIsolation DOMStorageIsolation |
| 1555 #endif |
| 1556 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_DOMStorageIsolation) { |
| 1551 ASSERT_TRUE(StartEmbeddedTestServer()); | 1557 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 1552 GURL regular_url = embedded_test_server()->GetURL("/title1.html"); | 1558 GURL regular_url = embedded_test_server()->GetURL("/title1.html"); |
| 1553 | 1559 |
| 1554 std::string output; | 1560 std::string output; |
| 1555 std::string get_local_storage("window.domAutomationController.send(" | 1561 std::string get_local_storage("window.domAutomationController.send(" |
| 1556 "window.localStorage.getItem('foo') || 'badval')"); | 1562 "window.localStorage.getItem('foo') || 'badval')"); |
| 1557 std::string get_session_storage("window.domAutomationController.send(" | 1563 std::string get_session_storage("window.domAutomationController.send(" |
| 1558 "window.sessionStorage.getItem('bar') || 'badval')"); | 1564 "window.sessionStorage.getItem('bar') || 'badval')"); |
| 1559 | 1565 |
| 1560 content::WebContents* default_tag_contents1; | 1566 content::WebContents* default_tag_contents1; |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2301 // http://crbug.com/403325 | 2307 // http://crbug.com/403325 |
| 2302 #define MAYBE_WebViewInBackgroundPage \ | 2308 #define MAYBE_WebViewInBackgroundPage \ |
| 2303 DISABLED_WebViewInBackgroundPage | 2309 DISABLED_WebViewInBackgroundPage |
| 2304 #else | 2310 #else |
| 2305 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage | 2311 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage |
| 2306 #endif | 2312 #endif |
| 2307 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { | 2313 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { |
| 2308 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) | 2314 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) |
| 2309 << message_; | 2315 << message_; |
| 2310 } | 2316 } |
| OLD | NEW |