diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-12 22:18:18 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-12 22:18:18 +0000 |
commit | 937e4c7b4b4744353ea2dc6d01749146664e3e76 (patch) | |
tree | 65cbce58cbad33d3b380f071f1f29840ed2c0f83 /chrome/test/ui | |
parent | 13a8adfee148682b7f9489e34c428b37f465675d (diff) | |
download | chromium_src-937e4c7b4b4744353ea2dc6d01749146664e3e76.zip chromium_src-937e4c7b4b4744353ea2dc6d01749146664e3e76.tar.gz chromium_src-937e4c7b4b4744353ea2dc6d01749146664e3e76.tar.bz2 |
Fix http://code.google.com/p/chromium/issues/detail?id=4270. Test case added.
BUG=4270
Review URL: http://codereview.chromium.org/10620
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r-- | chrome/test/ui/npapi_uitest.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/test/ui/npapi_uitest.cpp b/chrome/test/ui/npapi_uitest.cpp index 2657220..1da15c46 100644 --- a/chrome/test/ui/npapi_uitest.cpp +++ b/chrome/test/ui/npapi_uitest.cpp @@ -48,6 +48,7 @@ #include "base/file_util.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/automation/tab_proxy.h" +#include "chrome/test/automation/window_proxy.h" #include "chrome/test/ui/npapi_test_helper.h" #include "net/base/net_util.h" @@ -167,6 +168,24 @@ TEST_F(NPAPITester, SelfDeletePluginInvoke) { kShortWaitTimeout); } +// Tests if a plugin executing a self deleting script using Invoke with +// a modal dialog showing works without crashing or hanging +TEST_F(NPAPITester, SelfDeletePluginInvokeAlert) { + std::wstring test_case = L"self_delete_plugin_invoke_alert.html"; + GURL url = GetTestUrl(L"npapi", test_case); + NavigateToURL(url); + + // Wait for the alert dialog and then close it. + automation()->WaitForAppModalDialog(5000); + scoped_ptr<WindowProxy> window(automation()->GetActiveWindow()); + ASSERT_TRUE(window.get()); + ASSERT_TRUE(window->SimulateOSKeyPress(VK_ESCAPE, 0)); + + WaitForFinish("self_delete_plugin_invoke_alert", "1", url, + kTestCompleteCookie, kTestCompleteSuccess, + kShortWaitTimeout); +} + // Tests if a plugin executing a self deleting script in the context of // a synchronous paint event works correctly TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousPaint) { |