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 <queue> | 5 #include <queue> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2040 } | 2040 } |
2041 #endif | 2041 #endif |
2042 | 2042 |
2043 // Flaky on Windows. http://crbug.com/303966 | 2043 // Flaky on Windows. http://crbug.com/303966 |
2044 #if defined(OS_WIN) | 2044 #if defined(OS_WIN) |
2045 #define MAYBE_TearDownTest DISABLED_TearDownTest | 2045 #define MAYBE_TearDownTest DISABLED_TearDownTest |
2046 #else | 2046 #else |
2047 #define MAYBE_TearDownTest TearDownTest | 2047 #define MAYBE_TearDownTest TearDownTest |
2048 #endif | 2048 #endif |
2049 IN_PROC_BROWSER_TEST_P(WebViewTest, MAYBE_TearDownTest) { | 2049 IN_PROC_BROWSER_TEST_P(WebViewTest, MAYBE_TearDownTest) { |
2050 const extensions::Extension* extension = | 2050 LoadAndLaunchPlatformApp("web_view/simple", "WebViewTest.LAUNCHED"); |
2051 LoadAndLaunchPlatformApp("web_view/simple", "WebViewTest.LAUNCHED"); | 2051 ASSERT_TRUE(GetAppWindowCount()); |
2052 extensions::AppWindow* window = NULL; | 2052 CloseAppWindow(GetFirstAppWindow()); |
2053 if (!GetAppWindowCount()) | |
2054 window = CreateAppWindow(extension); | |
2055 else | |
2056 window = GetFirstAppWindow(); | |
2057 CloseAppWindow(window); | |
2058 | 2053 |
2059 // Load the app again. | 2054 // Load the app again. |
2060 LoadAndLaunchPlatformApp("web_view/simple", "WebViewTest.LAUNCHED"); | 2055 LoadAndLaunchPlatformApp("web_view/simple", "WebViewTest.LAUNCHED"); |
2061 } | 2056 } |
2062 | 2057 |
2063 // In following GeolocationAPIEmbedderHasNoAccess* tests, embedder (i.e. the | 2058 // In following GeolocationAPIEmbedderHasNoAccess* tests, embedder (i.e. the |
2064 // platform app) does not have geolocation permission for this test. | 2059 // platform app) does not have geolocation permission for this test. |
2065 // No matter what the API does, geolocation permission would be denied. | 2060 // No matter what the API does, geolocation permission would be denied. |
2066 // Note that the test name prefix must be "GeolocationAPI". | 2061 // Note that the test name prefix must be "GeolocationAPI". |
2067 IN_PROC_BROWSER_TEST_P(WebViewTest, GeolocationAPIEmbedderHasNoAccessAllow) { | 2062 IN_PROC_BROWSER_TEST_P(WebViewTest, GeolocationAPIEmbedderHasNoAccessAllow) { |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3115 // 4 tasks expected. The order is arbitrary. | 3110 // 4 tasks expected. The order is arbitrary. |
3116 // Tab: about:blank, | 3111 // Tab: about:blank, |
3117 // Background Page: <webview> task manager test, | 3112 // Background Page: <webview> task manager test, |
3118 // App: <webview> task manager test, | 3113 // App: <webview> task manager test, |
3119 // Webview: WebViewed test content. | 3114 // Webview: WebViewed test content. |
3120 EXPECT_EQ(4U, task_manager.tasks().size()); | 3115 EXPECT_EQ(4U, task_manager.tasks().size()); |
3121 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); | 3116 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); |
3122 } | 3117 } |
3123 | 3118 |
3124 #endif // defined(ENABLE_TASK_MANAGER) | 3119 #endif // defined(ENABLE_TASK_MANAGER) |
OLD | NEW |