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/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 base::StringPrintf("loadGuest(%d);\n", host_and_port.port()))); | 1273 base::StringPrintf("loadGuest(%d);\n", host_and_port.port()))); |
1274 ASSERT_TRUE(second.WaitUntilSatisfied()); | 1274 ASSERT_TRUE(second.WaitUntilSatisfied()); |
1275 | 1275 |
1276 // Wait for interstitial page to be shown in guest. | 1276 // Wait for interstitial page to be shown in guest. |
1277 content::WebContents* guest_web_contents = | 1277 content::WebContents* guest_web_contents = |
1278 GetGuestViewManager()->WaitForGuestCreated(); | 1278 GetGuestViewManager()->WaitForGuestCreated(); |
1279 ASSERT_TRUE(guest_web_contents->GetRenderProcessHost()->IsIsolatedGuest()); | 1279 ASSERT_TRUE(guest_web_contents->GetRenderProcessHost()->IsIsolatedGuest()); |
1280 WaitForInterstitial(guest_web_contents); | 1280 WaitForInterstitial(guest_web_contents); |
1281 | 1281 |
1282 // Now close the app while interstitial page being shown in guest. | 1282 // Now close the app while interstitial page being shown in guest. |
1283 apps::AppWindow* window = GetFirstAppWindow(); | 1283 extensions::AppWindow* window = GetFirstAppWindow(); |
1284 window->GetBaseWindow()->Close(); | 1284 window->GetBaseWindow()->Close(); |
1285 } | 1285 } |
1286 | 1286 |
1287 IN_PROC_BROWSER_TEST_F(WebViewTest, ShimSrcAttribute) { | 1287 IN_PROC_BROWSER_TEST_F(WebViewTest, ShimSrcAttribute) { |
1288 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/src_attribute")) | 1288 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/src_attribute")) |
1289 << message_; | 1289 << message_; |
1290 } | 1290 } |
1291 | 1291 |
1292 // This test verifies that prerendering has been disabled inside <webview>. | 1292 // This test verifies that prerendering has been disabled inside <webview>. |
1293 // This test is here rather than in PrerenderBrowserTest for testing convenience | 1293 // This test is here rather than in PrerenderBrowserTest for testing convenience |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1900 | 1900 |
1901 // Flaky on Windows. http://crbug.com/303966 | 1901 // Flaky on Windows. http://crbug.com/303966 |
1902 #if defined(OS_WIN) | 1902 #if defined(OS_WIN) |
1903 #define MAYBE_TearDownTest DISABLED_TearDownTest | 1903 #define MAYBE_TearDownTest DISABLED_TearDownTest |
1904 #else | 1904 #else |
1905 #define MAYBE_TearDownTest TearDownTest | 1905 #define MAYBE_TearDownTest TearDownTest |
1906 #endif | 1906 #endif |
1907 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_TearDownTest) { | 1907 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_TearDownTest) { |
1908 const extensions::Extension* extension = | 1908 const extensions::Extension* extension = |
1909 LoadAndLaunchPlatformApp("web_view/teardown", "guest-loaded"); | 1909 LoadAndLaunchPlatformApp("web_view/teardown", "guest-loaded"); |
1910 apps::AppWindow* window = NULL; | 1910 extensions::AppWindow* window = NULL; |
1911 if (!GetAppWindowCount()) | 1911 if (!GetAppWindowCount()) |
1912 window = CreateAppWindow(extension); | 1912 window = CreateAppWindow(extension); |
1913 else | 1913 else |
1914 window = GetFirstAppWindow(); | 1914 window = GetFirstAppWindow(); |
1915 CloseAppWindow(window); | 1915 CloseAppWindow(window); |
1916 | 1916 |
1917 // Load the app again. | 1917 // Load the app again. |
1918 LoadAndLaunchPlatformApp("web_view/teardown", "guest-loaded"); | 1918 LoadAndLaunchPlatformApp("web_view/teardown", "guest-loaded"); |
1919 } | 1919 } |
1920 | 1920 |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2305 // http://crbug.com/403325 | 2305 // http://crbug.com/403325 |
2306 #define MAYBE_WebViewInBackgroundPage \ | 2306 #define MAYBE_WebViewInBackgroundPage \ |
2307 DISABLED_WebViewInBackgroundPage | 2307 DISABLED_WebViewInBackgroundPage |
2308 #else | 2308 #else |
2309 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage | 2309 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage |
2310 #endif | 2310 #endif |
2311 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { | 2311 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { |
2312 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) | 2312 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) |
2313 << message_; | 2313 << message_; |
2314 } | 2314 } |
OLD | NEW |