Commit 226b4d9f authored by David Bertoni's avatar David Bertoni Committed by Commit Bot

[Extensions] Fix a flaky Open Window Open API test.

This CL moves the test to the interactive_ui_tests test suite.
This fixes the flakiness with the test since the main window
needs focus for the test to work properly.

Bug: 477691
Change-Id: I0d8ab99a80a47c11ed9cc676a5fde23fa21b4c26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252600Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Commit-Queue: David Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780190}
parent 9c8b3a27
......@@ -66,17 +66,6 @@ class WindowOpenApiTest : public ExtensionApiTest {
}
};
// The test uses the chrome.browserAction.openPopup API, which requires that the
// window can automatically be activated.
// See comments at BrowserActionInteractiveTest::ShouldRunPopupTest
// Fails flakily on all platforms. https://crbug.com/477691
IN_PROC_BROWSER_TEST_F(WindowOpenApiTest, DISABLED_WindowOpen) {
extensions::ResultCatcher catcher;
ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_
.AppendASCII("window_open").AppendASCII("spanning")));
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
bool WaitForTabsPopupsApps(Browser* browser,
int num_tabs,
int num_popups,
......
......@@ -6,6 +6,7 @@
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "content/public/test/browser_test.h"
#include "extensions/test/result_catcher.h"
namespace extensions {
......@@ -17,4 +18,13 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpenFocus) {
}
#endif
// The test uses the chrome.browserAction.openPopup API, which requires that the
// window can automatically be activated.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpen) {
extensions::ResultCatcher catcher;
ASSERT_TRUE(LoadExtensionIncognito(
test_data_dir_.AppendASCII("window_open").AppendASCII("spanning")));
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
} // namespace extensions
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment