Index: chrome/browser/extensions/window_open_apitest.cc |
diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc |
index 96e10e65b65e47729f9d69409f1337ff1e9cdf72..7b1ade13511a48e6ab8993812a4bfc415c188b29 100644 |
--- a/chrome/browser/extensions/window_open_apitest.cc |
+++ b/chrome/browser/extensions/window_open_apitest.cc |
@@ -195,8 +195,8 @@ class WindowOpenPanelTest : public ExtensionApiTest { |
} |
}; |
-#if defined(USE_AURA) |
-// On Aura, this currently fails because we're currently opening new panel |
+#if defined(USE_ASH) |
+// On Ash, this currently fails because we're currently opening new panel |
// windows as popup windows instead. |
#define MAYBE_WindowOpenPanel FAILS_WindowOpenPanel |
#else |
@@ -215,12 +215,20 @@ IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, WindowOpenFocus) { |
IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, |
CloseNonExtensionPanelsOnUninstall) { |
+#if defined(USE_ASH) |
+ int num_popups = 4; |
+ int num_panels = 0; |
+#else |
+ int num_popups = 2; |
+ int num_panels = 2; |
+#endif |
ASSERT_TRUE(StartTestServer()); |
// Setup listeners to wait on strings we expect the extension pages to send. |
std::vector<std::string> test_strings; |
test_strings.push_back("content_tab"); |
- test_strings.push_back("content_panel"); |
+ if (num_panels) |
+ test_strings.push_back("content_panel"); |
test_strings.push_back("content_popup"); |
ScopedVector<ExtensionTestMessageListener> listeners; |
@@ -237,7 +245,7 @@ IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, |
// Two tabs. One in extension domain and one in non-extension domain. |
// Two popups - one in extension domain and one in non-extension domain. |
// Two panels - one in extension domain and one in non-extension domain. |
- WaitForTabsAndPopups(browser(), 2, 2, 2); |
+ WaitForTabsAndPopups(browser(), 2, num_popups, num_panels); |
// Wait on test messages to make sure the pages loaded. |
for (size_t i = 0; i < listeners.size(); ++i) |
@@ -247,7 +255,13 @@ IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, |
// Wait for one tab and one popup in non-extension domain to stay open. |
// Expect everything else, including panels, to close. |
- WaitForTabsAndPopups(browser(), 1, 1, 0); |
+#if defined(USE_ASH) |
+ // In Ash and additional popup remains for the "panel" non-extension domain. |
+ num_popups = 2; |
+#else |
+ num_popups = 1; |
+#endif |
+ WaitForTabsAndPopups(browser(), 1, num_popups, 0); |
} |
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpener) { |