Index: LayoutTests/plugins/plugin-persists.html |
diff --git a/LayoutTests/plugins/plugin-persists.html b/LayoutTests/plugins/plugin-persists.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..13be0e124610545e5736a9f3c3f011c6b9ea965c |
--- /dev/null |
+++ b/LayoutTests/plugins/plugin-persists.html |
@@ -0,0 +1,45 @@ |
+<html> |
+<head> |
+<style> |
+ #plugin { |
+ width: 150px; |
+ height: 150px; |
+ } |
+</style> |
+</head> |
+ |
+<body> |
+<embed id="plugin" type="application/x-webkit-test-webplugin-persistent" primitive="triangle" background-color="green" primitive-color="blue"></embed> |
+<div>Each line below should start with 'Pass':</div> |
+<div id="result1"></div> |
+<div id="result2"></div> |
+<script> |
+ |
+ if (!window.testRunner) { |
+ document.write("This test does not work in manual mode."); |
+ } else { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+ |
+ if (plugin.isPersistent) |
+ result1.innerHTML = "Pass: plugin identifies itself as persistent."; |
+ else |
+ result1.innerHTML = "Fail: plugin identifies itself as not-persistent."; |
+ |
+ // Verify that the plugin is not destroyed. |
+ plugin.setAttribute("display", "none"); |
+ // Force synchronous style recalc. |
+ plugin.offsetTop; |
+ |
+ window.setTimeout(function () { |
+ if (plugin.instanceId == 1) |
+ result2.innerHTML = "Pass: plugin is persisting."; |
+ else |
+ result2.innerHTML = "Fail: plugin failed to persist."; |
+ testRunner.notifyDone(); |
+ }, 50); |
+ } |
+ |
+</script> |
+</body> |
+</html> |