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

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

Issue 7806020: Add DeletePluginInDeallocate UI test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct Copyright header. Created 9 years, 3 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_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/npapi/plugin_delete_in_deallocate.html
diff --git a/chrome/test/data/npapi/plugin_delete_in_deallocate.html b/chrome/test/data/npapi/plugin_delete_in_deallocate.html
new file mode 100644
index 0000000000000000000000000000000000000000..4904469e7a17c60eafc3a06647adb9b1a4948664
--- /dev/null
+++ b/chrome/test/data/npapi/plugin_delete_in_deallocate.html
@@ -0,0 +1,55 @@
+<html>
+<head>
+<script src="npapi.js"></script>
+<script>
+function setTestObject(object) {
+ window.testObject = object;
+ setTimeout("deleteTestObject()", 0);
+ var statusPanel = document.getElementById("statusPanel");
+ statusPanel.innerText = "Received test object...";
+}
+
+function deleteTestObject() {
+ window.testObject = null;
+ var statusPanel = document.getElementById("statusPanel");
+ statusPanel.innerText = "Deleted test object...";
+ gc();
+}
+
+function deletePlugin() {
+ var statusPanel = document.getElementById("statusPanel");
+ statusPanel.innerText = "Deleting plugin...";
+ var plugin = document.getElementById("delete_plugin_in_deallocate_test");
+ if (plugin.parentNode && plugin.parentNode.removeChild) {
+ plugin.parentNode.removeChild(plugin);
+ }
+}
+</script>
+</head>
+
+<body>
+<div id="statusPanel" style="border: 1px solid red; width: 100%">
+Test running....
+</div>
+
+NPObject Delete in Deallocate<p>
+
+Tests the case where deallocation of an NPObject belonging to the plugin
+triggers scripting which causes the whole plugin to be torn down, and verifies
+that the object being deallocated is not deallocated a second time.
+
+
+<embed type="application/vnd.npapi-test"
+ src="foo"
+ name="delete_plugin_in_deallocate_test"
+ id="signaller"
+ mode="np_embed">
+
+<embed type="application/vnd.npapi-test"
+ src="foo"
+ name="delete_plugin_in_deallocate_test"
+ id="delete_plugin_in_deallocate_test"
+ mode="np_embed">
+
+</body>
+</html>
« no previous file with comments | « no previous file | chrome/test/ui/npapi_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698