diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-22 00:35:28 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-22 00:35:28 +0000 |
commit | 8f981f0a2749d65aefcccfaeb32d79d6debfc0f7 (patch) | |
tree | 33d02d6854e5b4850440d6154fe821ef183d7634 /content/browser/plugin_browsertest.cc | |
parent | d254a73758d69791de7f6ea0c7e8b4ccd1925f3f (diff) | |
download | chromium_src-8f981f0a2749d65aefcccfaeb32d79d6debfc0f7.zip chromium_src-8f981f0a2749d65aefcccfaeb32d79d6debfc0f7.tar.gz chromium_src-8f981f0a2749d65aefcccfaeb32d79d6debfc0f7.tar.bz2 |
Fix flakiness in PluginTest.SelfDeletePluginInvokeAlert. The problem is that sometimes we missed the notification that an alert was shown because it came before we started watching for it. The fix is to navigate asynchronously.
BUG=46257
Review URL: https://chromiumcodereview.appspot.com/10162024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_browsertest.cc')
-rw-r--r-- | content/browser/plugin_browsertest.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/content/browser/plugin_browsertest.cc b/content/browser/plugin_browsertest.cc index 7c02bcd..6096e61 100644 --- a/content/browser/plugin_browsertest.cc +++ b/content/browser/plugin_browsertest.cc @@ -135,10 +135,12 @@ IN_PROC_BROWSER_TEST_F(PluginTest, GetURLRequest404Response) { // Tests if a plugin executing a self deleting script using Invoke with // a modal dialog showing works without crashing or hanging // Disabled, flakily exceeds timeout, http://crbug.com/46257. -#if !defined(OS_LINUX) // Times out on Linux. IN_PROC_BROWSER_TEST_F(PluginTest, SelfDeletePluginInvokeAlert) { - ui_test_utils::NavigateToURL( - browser(), GetURL("self_delete_plugin_invoke_alert.html")); + // Navigate asynchronously because if we waitd until it completes, there's a + // race condition where the alert can come up before we start watching for it. + ui_test_utils::NavigateToURLWithDisposition( + browser(), GetURL("self_delete_plugin_invoke_alert.html"), CURRENT_TAB, + 0); string16 expected_title(ASCIIToUTF16("OK")); ui_test_utils::TitleWatcher title_watcher( @@ -149,7 +151,6 @@ IN_PROC_BROWSER_TEST_F(PluginTest, SelfDeletePluginInvokeAlert) { EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); } -#endif // Test passing arguments to a plugin. IN_PROC_BROWSER_TEST_F(PluginTest, Arguments) { |