Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: chrome/test/data/npapi/npobject_released_on_destruction.html

Issue 332013: Add a regression test for the PluginChannel::CleanUp. My earlier speculative... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/ui/npapi_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/npapi/npobject_released_on_destruction.html
===================================================================
--- chrome/test/data/npapi/npobject_released_on_destruction.html (revision 0)
+++ chrome/test/data/npapi/npobject_released_on_destruction.html (revision 0)
@@ -0,0 +1,50 @@
+<html>
+
+<head>
+<script src="npapi.js"></script>
+<script>
+
+function returnedMethod() {
+}
+
+function dummyMethod() {
+ return returnedMethod;
+}
+
+var test_object;
+function Init() {
+ var plg = window.document["plg"];
+ // Create the NPObjectStub in the plugin process first. This object's
+ // deallocate function will release the NPObject below.
+ test_object = plg.testCreateTestObject();
+
+ // Then create an NPObjectProxy in the plugin process that holds on to the
+ // dummyMethod function above.
+ test_object.pageTestObject();
+}
+</script>
+</head>
+
+
+<body>
+<div id="statusPanel" style="border: 1px solid red; width: 100%">
+Test running....
+</div>
+
+
+NPObject released on destruction<p>
+
+Tests that if a plugin creates an NPObject and releases it on destruction,
+there's no crash when the plugin goes away.
+
+
+<DIV ID=PluginDiv>
+<embed name="plg" type="application/x-webkit-test-netscape"></embed>
+</DIV>
+<script>
+ Init();
+</script>
+
+</body>
+</html>
+
Property changes on: chrome\test\data\npapi\npobject_released_on_destruction.html
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « no previous file | chrome/test/ui/npapi_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698