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

Unified Diff: apps/app_shim/app_shim_interactive_uitest_mac.mm

Issue 597113003: [Mac] Re-enable AppShimInteractiveTest.Launch (again). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_shim/app_shim_interactive_uitest_mac.mm
diff --git a/apps/app_shim/app_shim_interactive_uitest_mac.mm b/apps/app_shim/app_shim_interactive_uitest_mac.mm
index 6802cb73cae837005000c7c5cb54f9bde79f2014..051914361ce972bba802b8100e97c31083a43334 100644
--- a/apps/app_shim/app_shim_interactive_uitest_mac.mm
+++ b/apps/app_shim/app_shim_interactive_uitest_mac.mm
@@ -226,8 +226,7 @@ namespace apps {
#define MAYBE_Launch DISABLED_Launch
#define MAYBE_RebuildShim DISABLED_RebuildShim
#else
-// Launch is flaky http://crbug.com/415422.
-#define MAYBE_Launch DISABLED_Launch
+#define MAYBE_Launch Launch
#define MAYBE_RebuildShim RebuildShim
#endif
@@ -258,31 +257,7 @@ IN_PROC_BROWSER_TEST_F(AppShimInteractiveTest, MAYBE_Launch) {
ASSERT_TRUE(base::PathExists(shim_path));
NSString* bundle_id = GetBundleID(shim_path);
- // Case 1: Launch the shim, it should start the app.
- {
- ExtensionTestMessageListener launched_listener("Launched", false);
- CommandLine shim_cmdline(CommandLine::NO_PROGRAM);
- shim_cmdline.AppendSwitch(app_mode::kLaunchedForTest);
- ProcessSerialNumber shim_psn;
- ASSERT_TRUE(base::mac::OpenApplicationWithPath(
- shim_path, shim_cmdline, kLSLaunchDefaults, &shim_psn));
- ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
-
- ASSERT_TRUE(GetFirstAppWindow());
- EXPECT_TRUE(HasAppShimHost(profile(), app->id()));
-
- // If the window is closed, the shim should quit.
- pid_t shim_pid;
- EXPECT_EQ(noErr, GetProcessPID(&shim_psn, &shim_pid));
- GetFirstAppWindow()->GetBaseWindow()->Close();
- ASSERT_TRUE(
- base::WaitForSingleProcess(shim_pid, TestTimeouts::action_timeout()));
-
- EXPECT_FALSE(GetFirstAppWindow());
- EXPECT_FALSE(HasAppShimHost(profile(), app->id()));
- }
-
- // Case 2: Launch the app, it should start the shim.
+ // Case 1: Launch the app, it should start the shim.
{
base::scoped_nsobject<WindowedNSNotificationObserver> ns_observer;
ns_observer.reset([[WindowedNSNotificationObserver alloc]
@@ -315,6 +290,30 @@ IN_PROC_BROWSER_TEST_F(AppShimInteractiveTest, MAYBE_Launch) {
EXPECT_FALSE(GetFirstAppWindow());
EXPECT_FALSE(HasAppShimHost(profile(), app->id()));
}
+
+ // Case 2: Launch the shim, it should start the app.
+ {
+ ExtensionTestMessageListener launched_listener("Launched", false);
+ CommandLine shim_cmdline(CommandLine::NO_PROGRAM);
+ shim_cmdline.AppendSwitch(app_mode::kLaunchedForTest);
+ ProcessSerialNumber shim_psn;
+ ASSERT_TRUE(base::mac::OpenApplicationWithPath(
+ shim_path, shim_cmdline, kLSLaunchDefaults, &shim_psn));
+ ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
+
+ ASSERT_TRUE(GetFirstAppWindow());
+ EXPECT_TRUE(HasAppShimHost(profile(), app->id()));
+
+ // If the window is closed, the shim should quit.
+ pid_t shim_pid;
+ EXPECT_EQ(noErr, GetProcessPID(&shim_psn, &shim_pid));
+ GetFirstAppWindow()->GetBaseWindow()->Close();
+ ASSERT_TRUE(
+ base::WaitForSingleProcess(shim_pid, TestTimeouts::action_timeout()));
+
+ EXPECT_FALSE(GetFirstAppWindow());
+ EXPECT_FALSE(HasAppShimHost(profile(), app->id()));
+ }
}
#if defined(ARCH_CPU_64_BITS)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698