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/strings/stringprintf.h" | 5 #include "base/strings/stringprintf.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/automation/automation_util.h" | 7 #include "chrome/browser/automation/automation_util.h" |
8 #include "chrome/browser/extensions/extension_test_message_listener.h" | 8 #include "chrome/browser/extensions/extension_test_message_listener.h" |
9 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 9 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
10 #include "chrome/browser/prerender/prerender_link_manager.h" | 10 #include "chrome/browser/prerender/prerender_link_manager.h" |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 content::TitleWatcher title_watcher(guest_web_contents, expected_title); | 1079 content::TitleWatcher title_watcher(guest_web_contents, expected_title); |
1080 title_watcher.AlsoWaitForTitle(error_title); | 1080 title_watcher.AlsoWaitForTitle(error_title); |
1081 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 1081 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
1082 } | 1082 } |
1083 | 1083 |
1084 IN_PROC_BROWSER_TEST_F(WebViewTest, TearDownTest) { | 1084 IN_PROC_BROWSER_TEST_F(WebViewTest, TearDownTest) { |
1085 ExtensionTestMessageListener first_loaded_listener("guest-loaded", false); | 1085 ExtensionTestMessageListener first_loaded_listener("guest-loaded", false); |
1086 const extensions::Extension* extension = | 1086 const extensions::Extension* extension = |
1087 LoadAndLaunchPlatformApp("web_view/teardown"); | 1087 LoadAndLaunchPlatformApp("web_view/teardown"); |
1088 ASSERT_TRUE(first_loaded_listener.WaitUntilSatisfied()); | 1088 ASSERT_TRUE(first_loaded_listener.WaitUntilSatisfied()); |
1089 ShellWindow* window = NULL; | 1089 apps::ShellWindow* window = NULL; |
1090 if (!GetShellWindowCount()) | 1090 if (!GetShellWindowCount()) |
1091 window = CreateShellWindow(extension); | 1091 window = CreateShellWindow(extension); |
1092 else | 1092 else |
1093 window = GetFirstShellWindow(); | 1093 window = GetFirstShellWindow(); |
1094 CloseShellWindow(window); | 1094 CloseShellWindow(window); |
1095 | 1095 |
1096 // Load the app again. | 1096 // Load the app again. |
1097 ExtensionTestMessageListener second_loaded_listener("guest-loaded", false); | 1097 ExtensionTestMessageListener second_loaded_listener("guest-loaded", false); |
1098 LoadAndLaunchPlatformApp("web_view/teardown"); | 1098 LoadAndLaunchPlatformApp("web_view/teardown"); |
1099 ASSERT_TRUE(second_loaded_listener.WaitUntilSatisfied()); | 1099 ASSERT_TRUE(second_loaded_listener.WaitUntilSatisfied()); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 // Now load an app with <webview>. | 1226 // Now load an app with <webview>. |
1227 ExtensionTestMessageListener done_listener("DoneTest", false); | 1227 ExtensionTestMessageListener done_listener("DoneTest", false); |
1228 LoadAndLaunchPlatformApp("web_view/content_script_whitelisted"); | 1228 LoadAndLaunchPlatformApp("web_view/content_script_whitelisted"); |
1229 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); | 1229 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); |
1230 } | 1230 } |
1231 | 1231 |
1232 IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentReady) { | 1232 IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentReady) { |
1233 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/document_ready")) | 1233 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/document_ready")) |
1234 << message_; | 1234 << message_; |
1235 } | 1235 } |
OLD | NEW |