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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 #define MAYBE_TearDownTest DISABLED_TearDownTest | 962 #define MAYBE_TearDownTest DISABLED_TearDownTest |
963 #else | 963 #else |
964 #define MAYBE_TearDownTest TearDownTest | 964 #define MAYBE_TearDownTest TearDownTest |
965 #endif | 965 #endif |
966 | 966 |
967 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_TearDownTest) { | 967 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_TearDownTest) { |
968 ExtensionTestMessageListener first_loaded_listener("guest-loaded", false); | 968 ExtensionTestMessageListener first_loaded_listener("guest-loaded", false); |
969 const extensions::Extension* extension = | 969 const extensions::Extension* extension = |
970 LoadAndLaunchPlatformApp("web_view/teardown"); | 970 LoadAndLaunchPlatformApp("web_view/teardown"); |
971 ASSERT_TRUE(first_loaded_listener.WaitUntilSatisfied()); | 971 ASSERT_TRUE(first_loaded_listener.WaitUntilSatisfied()); |
972 ShellWindow* window = NULL; | 972 apps::ShellWindow* window = NULL; |
973 if (!GetShellWindowCount()) | 973 if (!GetShellWindowCount()) |
974 window = CreateShellWindow(extension); | 974 window = CreateShellWindow(extension); |
975 else | 975 else |
976 window = GetFirstShellWindow(); | 976 window = GetFirstShellWindow(); |
977 CloseShellWindow(window); | 977 CloseShellWindow(window); |
978 | 978 |
979 // Load the app again. | 979 // Load the app again. |
980 ExtensionTestMessageListener second_loaded_listener("guest-loaded", false); | 980 ExtensionTestMessageListener second_loaded_listener("guest-loaded", false); |
981 LoadAndLaunchPlatformApp("web_view/teardown"); | 981 LoadAndLaunchPlatformApp("web_view/teardown"); |
982 ASSERT_TRUE(second_loaded_listener.WaitUntilSatisfied()); | 982 ASSERT_TRUE(second_loaded_listener.WaitUntilSatisfied()); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 LoadExtension(test_data_dir_.AppendASCII( | 1086 LoadExtension(test_data_dir_.AppendASCII( |
1087 "platform_apps/web_view/legacy/content_script")); | 1087 "platform_apps/web_view/legacy/content_script")); |
1088 ASSERT_TRUE(content_script_whitelisted_extension); | 1088 ASSERT_TRUE(content_script_whitelisted_extension); |
1089 ASSERT_EQ(extension_id, content_script_whitelisted_extension->id()); | 1089 ASSERT_EQ(extension_id, content_script_whitelisted_extension->id()); |
1090 | 1090 |
1091 // Now load an app with <webview>. | 1091 // Now load an app with <webview>. |
1092 ExtensionTestMessageListener done_listener("DoneTest", false); | 1092 ExtensionTestMessageListener done_listener("DoneTest", false); |
1093 LoadAndLaunchPlatformApp("web_view/content_script_whitelisted"); | 1093 LoadAndLaunchPlatformApp("web_view/content_script_whitelisted"); |
1094 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); | 1094 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); |
1095 } | 1095 } |
OLD | NEW |