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

Unified Diff: chrome/browser/apps/app_window_interactive_uitest.cc

Issue 958923004: Fix hiding behavior when creating app windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove changes to platform_apps/hidden/test.js Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/platform_apps/hidden_with_id/empty.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/app_window_interactive_uitest.cc
diff --git a/chrome/browser/apps/app_window_interactive_uitest.cc b/chrome/browser/apps/app_window_interactive_uitest.cc
index 30247d7e38b91a579c4c18932491ba6e0c8d3223..7319903443e36ba2d47717c840d856d4e7efd52a 100644
--- a/chrome/browser/apps/app_window_interactive_uitest.cc
+++ b/chrome/browser/apps/app_window_interactive_uitest.cc
@@ -461,6 +461,42 @@ IN_PROC_BROWSER_TEST_F(AppWindowInteractiveTest, TestDrawAttention) {
ASSERT_TRUE(RunAppWindowInteractiveTest("testDrawAttention")) << message_;
}
+IN_PROC_BROWSER_TEST_F(AppWindowInteractiveTest, TestCreateHidden) {
+ // Created hidden both times.
+ {
+ ExtensionTestMessageListener launched_listener("Launched", true);
+ LoadAndLaunchPlatformApp("hidden_with_id", &launched_listener);
+ EXPECT_TRUE(launched_listener.WaitUntilSatisfied());
+ ExtensionTestMessageListener create_listener_1("Launched", true);
+ launched_listener.Reply("createHidden");
+ EXPECT_TRUE(create_listener_1.WaitUntilSatisfied());
+ AppWindow* app_window = GetFirstAppWindow();
+ EXPECT_TRUE(app_window->is_hidden());
+ ExtensionTestMessageListener create_listener_2("Launched", false);
+ create_listener_1.Reply("createHidden");
+ EXPECT_TRUE(create_listener_2.WaitUntilSatisfied());
+ EXPECT_TRUE(app_window->is_hidden());
+ app_window->GetBaseWindow()->Close();
+ }
+
+ // Created hidden, then visible. The second create should show the window.
+ {
+ ExtensionTestMessageListener launched_listener("Launched", true);
+ LoadAndLaunchPlatformApp("hidden_with_id", &launched_listener);
+ EXPECT_TRUE(launched_listener.WaitUntilSatisfied());
+ ExtensionTestMessageListener create_listener_1("Launched", true);
+ launched_listener.Reply("createHidden");
+ EXPECT_TRUE(create_listener_1.WaitUntilSatisfied());
+ AppWindow* app_window = GetFirstAppWindow();
+ EXPECT_TRUE(app_window->is_hidden());
+ ExtensionTestMessageListener create_listener_2("Launched", false);
+ create_listener_1.Reply("createVisible");
+ EXPECT_TRUE(create_listener_2.WaitUntilSatisfied());
+ EXPECT_FALSE(app_window->is_hidden());
+ app_window->GetBaseWindow()->Close();
+ }
+}
+
// Only Linux and Windows use keep-alive to determine when to shut down.
#if defined(OS_LINUX) || defined(OS_WIN)
« no previous file with comments | « no previous file | chrome/test/data/extensions/platform_apps/hidden_with_id/empty.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698