| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "chrome/common/url_constants.h" | 34 #include "chrome/common/url_constants.h" |
| 35 #include "chrome/test/base/test_switches.h" | 35 #include "chrome/test/base/test_switches.h" |
| 36 #include "chrome/test/base/ui_test_utils.h" | 36 #include "chrome/test/base/ui_test_utils.h" |
| 37 #include "components/pref_registry/pref_registry_syncable.h" | 37 #include "components/pref_registry/pref_registry_syncable.h" |
| 38 #include "components/prefs/pref_service.h" | 38 #include "components/prefs/pref_service.h" |
| 39 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 39 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 40 #include "content/public/browser/devtools_agent_host.h" | 40 #include "content/public/browser/devtools_agent_host.h" |
| 41 #include "content/public/browser/host_zoom_map.h" | 41 #include "content/public/browser/host_zoom_map.h" |
| 42 #include "content/public/browser/render_process_host.h" | 42 #include "content/public/browser/render_process_host.h" |
| 43 #include "content/public/browser/render_widget_host_view.h" | 43 #include "content/public/browser/render_widget_host_view.h" |
| 44 #include "content/public/test/browser_test_utils.h" |
| 44 #include "content/public/test/test_utils.h" | 45 #include "content/public/test/test_utils.h" |
| 45 #include "extensions/browser/app_window/app_window.h" | 46 #include "extensions/browser/app_window/app_window.h" |
| 46 #include "extensions/browser/app_window/app_window_registry.h" | 47 #include "extensions/browser/app_window/app_window_registry.h" |
| 47 #include "extensions/browser/app_window/native_app_window.h" | 48 #include "extensions/browser/app_window/native_app_window.h" |
| 48 #include "extensions/browser/event_router.h" | 49 #include "extensions/browser/event_router.h" |
| 49 #include "extensions/browser/extension_prefs.h" | 50 #include "extensions/browser/extension_prefs.h" |
| 50 #include "extensions/browser/extension_registry.h" | 51 #include "extensions/browser/extension_registry.h" |
| 51 #include "extensions/browser/extension_registry_observer.h" | 52 #include "extensions/browser/extension_registry_observer.h" |
| 52 #include "extensions/browser/pref_names.h" | 53 #include "extensions/browser/pref_names.h" |
| 53 #include "extensions/common/api/app_runtime.h" | 54 #include "extensions/common/api/app_runtime.h" |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 // TODO(lazyboy): non-external urls also succeed right now because of | 445 // TODO(lazyboy): non-external urls also succeed right now because of |
| 445 // http://crbug.com/585570 not being fixed. Fix the test once the bug is | 446 // http://crbug.com/585570 not being fixed. Fix the test once the bug is |
| 446 // fixed. | 447 // fixed. |
| 447 // const size_t kExpectedNumberOfTabs = 2u; | 448 // const size_t kExpectedNumberOfTabs = 2u; |
| 448 const size_t kExpectedNumberOfTabs = 6u; | 449 const size_t kExpectedNumberOfTabs = 6u; |
| 449 TabsAddedNotificationObserver observer(kExpectedNumberOfTabs); | 450 TabsAddedNotificationObserver observer(kExpectedNumberOfTabs); |
| 450 ASSERT_TRUE(RunPlatformAppTest("platform_apps/background_page_navigation")) << | 451 ASSERT_TRUE(RunPlatformAppTest("platform_apps/background_page_navigation")) << |
| 451 message_; | 452 message_; |
| 452 observer.Wait(); | 453 observer.Wait(); |
| 453 ASSERT_EQ(kExpectedNumberOfTabs, observer.tabs().size()); | 454 ASSERT_EQ(kExpectedNumberOfTabs, observer.tabs().size()); |
| 455 content::WaitForLoadStop(observer.tabs()[kExpectedNumberOfTabs - 1]); |
| 454 EXPECT_EQ(GURL(kChromiumURL), | 456 EXPECT_EQ(GURL(kChromiumURL), |
| 455 observer.tabs()[kExpectedNumberOfTabs - 1]->GetURL()); | 457 observer.tabs()[kExpectedNumberOfTabs - 1]->GetURL()); |
| 458 content::WaitForLoadStop(observer.tabs()[kExpectedNumberOfTabs - 2]); |
| 456 EXPECT_EQ(GURL(kChromiumURL), | 459 EXPECT_EQ(GURL(kChromiumURL), |
| 457 observer.tabs()[kExpectedNumberOfTabs - 2]->GetURL()); | 460 observer.tabs()[kExpectedNumberOfTabs - 2]->GetURL()); |
| 458 } | 461 } |
| 459 | 462 |
| 460 // Failing on some Win and Linux buildbots. See crbug.com/354425. | 463 // Failing on some Win and Linux buildbots. See crbug.com/354425. |
| 461 #if defined(OS_WIN) || defined(OS_LINUX) | 464 #if defined(OS_WIN) || defined(OS_LINUX) |
| 462 #define MAYBE_Iframes DISABLED_Iframes | 465 #define MAYBE_Iframes DISABLED_Iframes |
| 463 #else | 466 #else |
| 464 #define MAYBE_Iframes Iframes | 467 #define MAYBE_Iframes Iframes |
| 465 #endif | 468 #endif |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 // https://crbug.com/620194. | 1385 // https://crbug.com/620194. |
| 1383 #define MAYBE_AppWindowIframe DISABLED_AppWindowIframe | 1386 #define MAYBE_AppWindowIframe DISABLED_AppWindowIframe |
| 1384 // Sends chrome.test.sendMessage from chrome.app.window.create's callback. | 1387 // Sends chrome.test.sendMessage from chrome.app.window.create's callback. |
| 1385 // The app window also adds an <iframe> to the page during window.onload. | 1388 // The app window also adds an <iframe> to the page during window.onload. |
| 1386 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWindowIframe) { | 1389 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWindowIframe) { |
| 1387 LoadAndLaunchPlatformApp("app_window_send_message", | 1390 LoadAndLaunchPlatformApp("app_window_send_message", |
| 1388 "APP_WINDOW_CREATE_CALLBACK"); | 1391 "APP_WINDOW_CREATE_CALLBACK"); |
| 1389 } | 1392 } |
| 1390 | 1393 |
| 1391 } // namespace extensions | 1394 } // namespace extensions |
| OLD | NEW |