Commit ca23335e authored by benwells@chromium.org's avatar benwells@chromium.org

Fix flaky WindowsApiSetIcon test.

BUG=396466

Review URL: https://codereview.chromium.org/411253002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285545 0039d316-1c4b-4281-b951-d872f2087c98
parent e7df5ce3
......@@ -51,8 +51,13 @@ namespace extensions {
IN_PROC_BROWSER_TEST_F(ExperimentalPlatformAppBrowserTest, WindowsApiSetIcon) {
scoped_ptr<TestAppWindowRegistryObserver> test_observer(
new TestAppWindowRegistryObserver(browser()->profile()));
LoadAndLaunchPlatformApp("windows_api_set_icon", "IconSet");
ExtensionTestMessageListener listener("ready", true);
// Launch the app and wait for it to be ready.
LoadAndLaunchPlatformApp("windows_api_set_icon", &listener);
EXPECT_EQ(0, test_observer->icon_updates());
listener.Reply("");
// Now wait until the WebContent has decoded the icon and chrome has
// processed it. This needs to be in a loop since the renderer runs in a
// different process.
......
......@@ -3,9 +3,9 @@
// found in the LICENSE file.
chrome.app.runtime.onLaunched.addListener(function() {
chrome.test.sendMessage("Launched");
chrome.app.window.create('test.html', {}, function(win) {
win.setIcon("icon.png");
chrome.test.sendMessage('IconSet');
chrome.test.sendMessage('ready', function() {
win.setIcon("icon.png");
});
});
});
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