diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 20:09:46 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 20:09:46 +0000 |
commit | 6d98bcf2015ef0bd8ce67f79afe9d48225e59ed7 (patch) | |
tree | 5b6a3505ac52b3cab763b4045bd1fa036d86e5de /chrome | |
parent | 1a9ae172dde1aed6720c7f00110d720eb1d0088f (diff) | |
download | chromium_src-6d98bcf2015ef0bd8ce67f79afe9d48225e59ed7.zip chromium_src-6d98bcf2015ef0bd8ce67f79afe9d48225e59ed7.tar.gz chromium_src-6d98bcf2015ef0bd8ce67f79afe9d48225e59ed7.tar.bz2 |
Ensure that NPN_PluginThreadAsyncCall callbacks are not invoked after NPP_Destroy.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/338050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30628 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/test/data/npapi/plugin_thread_async_call.html | 42 | ||||
-rw-r--r-- | chrome/test/ui/npapi_uitest.cc | 7 |
2 files changed, 49 insertions, 0 deletions
diff --git a/chrome/test/data/npapi/plugin_thread_async_call.html b/chrome/test/data/npapi/plugin_thread_async_call.html new file mode 100644 index 0000000..156c844 --- /dev/null +++ b/chrome/test/data/npapi/plugin_thread_async_call.html @@ -0,0 +1,42 @@ +<html> + +<head> +<script src="npapi.js"></script> +<script> + function deleteShortLivedInstance() { + var shortLivedDiv = document.getElementById("short_lived_div"); + shortLivedDiv.innerHTML = "Instance deleted"; + } +</script> +</head> + + +<body> +<div id="statusPanel" style="border: 1px solid red; width: 100%"> +Test running.... +</div> + + +NPAPI NPN_PluginThreadAsyncCall test<p> +Tests that a plugin can schedule async callbacks.<P> + +<embed type="application/vnd.npapi-test" + src="foo" + name="plugin_thread_async_call" + id="1" + short_lived="false" + mode="np_embed" +> + +<div id="short_lived_div"> + <embed type="application/vnd.npapi-test" + src="foo" + name="plugin_thread_async_call" + id="2" + short_lived="true" + mode="np_embed" + > +</div> + +</body> +</html> diff --git a/chrome/test/ui/npapi_uitest.cc b/chrome/test/ui/npapi_uitest.cc index 206fdd2..e68bf7f 100644 --- a/chrome/test/ui/npapi_uitest.cc +++ b/chrome/test/ui/npapi_uitest.cc @@ -300,6 +300,13 @@ TEST_F(NPAPITester, ScheduleTimer) { kTestCompleteSuccess, kShortWaitTimeout); } +TEST_F(NPAPITester, PluginThreadAsyncCall) { + GURL url = GetTestUrl(L"npapi", L"plugin_thread_async_call.html"); + NavigateToURL(url); + WaitForFinish("plugin_thread_async_call", "1", url, kTestCompleteCookie, + kTestCompleteSuccess, kShortWaitTimeout); +} + // Test checking the privacy mode is on. TEST_F(NPAPIIncognitoTester, PrivateEnabled) { if (UITest::in_process_renderer()) |