Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: chrome/browser/extensions/web_view_browsertest.cc

Issue 16702003: Move ShellWindow into apps component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 content::TitleWatcher title_watcher(guest_web_contents, expected_title); 963 content::TitleWatcher title_watcher(guest_web_contents, expected_title);
964 title_watcher.AlsoWaitForTitle(error_title); 964 title_watcher.AlsoWaitForTitle(error_title);
965 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); 965 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
966 } 966 }
967 967
968 IN_PROC_BROWSER_TEST_F(WebViewTest, TearDownTest) { 968 IN_PROC_BROWSER_TEST_F(WebViewTest, TearDownTest) {
969 ExtensionTestMessageListener first_loaded_listener("guest-loaded", false); 969 ExtensionTestMessageListener first_loaded_listener("guest-loaded", false);
970 const extensions::Extension* extension = 970 const extensions::Extension* extension =
971 LoadAndLaunchPlatformApp("web_view/teardown"); 971 LoadAndLaunchPlatformApp("web_view/teardown");
972 ASSERT_TRUE(first_loaded_listener.WaitUntilSatisfied()); 972 ASSERT_TRUE(first_loaded_listener.WaitUntilSatisfied());
973 ShellWindow* window = NULL; 973 apps::ShellWindow* window = NULL;
974 if (!GetShellWindowCount()) 974 if (!GetShellWindowCount())
975 window = CreateShellWindow(extension); 975 window = CreateShellWindow(extension);
976 else 976 else
977 window = GetFirstShellWindow(); 977 window = GetFirstShellWindow();
978 CloseShellWindow(window); 978 CloseShellWindow(window);
979 979
980 // Load the app again. 980 // Load the app again.
981 ExtensionTestMessageListener second_loaded_listener("guest-loaded", false); 981 ExtensionTestMessageListener second_loaded_listener("guest-loaded", false);
982 LoadAndLaunchPlatformApp("web_view/teardown"); 982 LoadAndLaunchPlatformApp("web_view/teardown");
983 ASSERT_TRUE(second_loaded_listener.WaitUntilSatisfied()); 983 ASSERT_TRUE(second_loaded_listener.WaitUntilSatisfied());
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 // Now load an app with <webview>. 1093 // Now load an app with <webview>.
1094 ExtensionTestMessageListener done_listener("DoneTest", false); 1094 ExtensionTestMessageListener done_listener("DoneTest", false);
1095 LoadAndLaunchPlatformApp("web_view/content_script_whitelisted"); 1095 LoadAndLaunchPlatformApp("web_view/content_script_whitelisted");
1096 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); 1096 ASSERT_TRUE(done_listener.WaitUntilSatisfied());
1097 } 1097 }
1098 1098
1099 IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentReady) { 1099 IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentReady) {
1100 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/document_ready")) 1100 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/document_ready"))
1101 << message_; 1101 << message_;
1102 } 1102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698