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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/test/test_timeouts.h" | 8 #include "base/test/test_timeouts.h" |
9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // Tests that localStorage and WebSQL are disabled for platform apps. | 307 // Tests that localStorage and WebSQL are disabled for platform apps. |
308 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowStorage) { | 308 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowStorage) { |
309 ASSERT_TRUE(RunPlatformAppTest("platform_apps/storage")) << message_; | 309 ASSERT_TRUE(RunPlatformAppTest("platform_apps/storage")) << message_; |
310 } | 310 } |
311 | 311 |
312 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Restrictions) { | 312 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Restrictions) { |
313 ASSERT_TRUE(RunPlatformAppTest("platform_apps/restrictions")) << message_; | 313 ASSERT_TRUE(RunPlatformAppTest("platform_apps/restrictions")) << message_; |
314 } | 314 } |
315 | 315 |
316 // Tests that platform apps can use the chrome.app.window.* API. | 316 // Tests that platform apps can use the chrome.app.window.* API. |
317 // Flaky, http://crbug.com/167097. | 317 // It is flaky: http://crbug.com/223467 |
318 // Disabled on windows due to http://crbug.com/223467. | 318 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DISABLED_WindowsApi) { |
319 #if defined(OS_WIN) | |
320 #define MAYBE_WindowsApi DISABLED_WindowsApi | |
321 #else | |
322 #define MAYBE_WindowsApi WindowsApi | |
323 #endif | |
324 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_WindowsApi) { | |
325 ASSERT_TRUE(RunPlatformAppTest("platform_apps/windows_api")) << message_; | 319 ASSERT_TRUE(RunPlatformAppTest("platform_apps/windows_api")) << message_; |
326 } | 320 } |
327 | 321 |
328 // Tests that extensions can't use platform-app-only APIs. | 322 // Tests that extensions can't use platform-app-only APIs. |
329 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, PlatformAppsOnly) { | 323 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, PlatformAppsOnly) { |
330 ASSERT_TRUE(RunExtensionTestIgnoreManifestWarnings( | 324 ASSERT_TRUE(RunExtensionTestIgnoreManifestWarnings( |
331 "platform_apps/apps_only")) << message_; | 325 "platform_apps/apps_only")) << message_; |
332 } | 326 } |
333 | 327 |
334 // Tests that platform apps have isolated storage by default. | 328 // Tests that platform apps have isolated storage by default. |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); | 800 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
807 | 801 |
808 EXPECT_EQ(1LU, GetShellWindowCount()); | 802 EXPECT_EQ(1LU, GetShellWindowCount()); |
809 ShellWindowRegistry::ShellWindowSet shell_windows = ShellWindowRegistry::Get( | 803 ShellWindowRegistry::ShellWindowSet shell_windows = ShellWindowRegistry::Get( |
810 browser()->profile())->shell_windows(); | 804 browser()->profile())->shell_windows(); |
811 EXPECT_TRUE((*shell_windows.begin())->web_contents()-> | 805 EXPECT_TRUE((*shell_windows.begin())->web_contents()-> |
812 GetRenderWidgetHostView()->HasFocus()); | 806 GetRenderWidgetHostView()->HasFocus()); |
813 } | 807 } |
814 | 808 |
815 } // namespace extensions | 809 } // namespace extensions |
OLD | NEW |