| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "apps/launcher.h" | 9 #include "apps/launcher.h" |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 observer.Wait(); | 443 observer.Wait(); |
| 444 ASSERT_EQ(kExpectedNumberOfTabs, observer.tabs().size()); | 444 ASSERT_EQ(kExpectedNumberOfTabs, observer.tabs().size()); |
| 445 content::WaitForLoadStop(observer.tabs()[kExpectedNumberOfTabs - 1]); | 445 content::WaitForLoadStop(observer.tabs()[kExpectedNumberOfTabs - 1]); |
| 446 EXPECT_EQ(GURL(kChromiumURL), | 446 EXPECT_EQ(GURL(kChromiumURL), |
| 447 observer.tabs()[kExpectedNumberOfTabs - 1]->GetURL()); | 447 observer.tabs()[kExpectedNumberOfTabs - 1]->GetURL()); |
| 448 content::WaitForLoadStop(observer.tabs()[kExpectedNumberOfTabs - 2]); | 448 content::WaitForLoadStop(observer.tabs()[kExpectedNumberOfTabs - 2]); |
| 449 EXPECT_EQ(GURL(kChromiumURL), | 449 EXPECT_EQ(GURL(kChromiumURL), |
| 450 observer.tabs()[kExpectedNumberOfTabs - 2]->GetURL()); | 450 observer.tabs()[kExpectedNumberOfTabs - 2]->GetURL()); |
| 451 } | 451 } |
| 452 | 452 |
| 453 // Failing on some Win and Linux buildbots. See crbug.com/354425. | 453 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Iframes) { |
| 454 #if defined(OS_WIN) || defined(OS_LINUX) | |
| 455 #define MAYBE_Iframes DISABLED_Iframes | |
| 456 #else | |
| 457 #define MAYBE_Iframes Iframes | |
| 458 #endif | |
| 459 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_Iframes) { | |
| 460 ASSERT_TRUE(StartEmbeddedTestServer()); | 454 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 461 ASSERT_TRUE(RunPlatformAppTest("platform_apps/iframes")) << message_; | 455 ASSERT_TRUE(RunPlatformAppTest("platform_apps/iframes")) << message_; |
| 462 } | 456 } |
| 463 | 457 |
| 464 // Tests that localStorage and WebSQL are disabled for platform apps. | 458 // Tests that localStorage and WebSQL are disabled for platform apps. |
| 465 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowStorage) { | 459 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowStorage) { |
| 466 ASSERT_TRUE(RunPlatformAppTest("platform_apps/storage")) << message_; | 460 ASSERT_TRUE(RunPlatformAppTest("platform_apps/storage")) << message_; |
| 467 } | 461 } |
| 468 | 462 |
| 469 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Restrictions) { | 463 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Restrictions) { |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 EXPECT_EQ(0, app_host_zoom_map->GetZoomLevel(web_contents)); | 1354 EXPECT_EQ(0, app_host_zoom_map->GetZoomLevel(web_contents)); |
| 1361 } | 1355 } |
| 1362 | 1356 |
| 1363 // Sends chrome.test.sendMessage from chrome.app.window.create's callback. | 1357 // Sends chrome.test.sendMessage from chrome.app.window.create's callback. |
| 1364 // The app window also adds an <iframe> to the page during window.onload. | 1358 // The app window also adds an <iframe> to the page during window.onload. |
| 1365 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, AppWindowIframe) { | 1359 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, AppWindowIframe) { |
| 1366 LoadAndLaunchPlatformApp("app_window_send_message", | 1360 LoadAndLaunchPlatformApp("app_window_send_message", |
| 1367 "APP_WINDOW_CREATE_CALLBACK"); | 1361 "APP_WINDOW_CREATE_CALLBACK"); |
| 1368 } | 1362 } |
| 1369 | 1363 |
| 1364 |
| 1370 } // namespace extensions | 1365 } // namespace extensions |
| OLD | NEW |