| 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..da10182c7b9152fb832d41fdacdbcc7943f1fbe7
|
| --- /dev/null
|
| +++ b/LayoutTests/plugins/plugin-persists.html
|
| @@ -0,0 +1,49 @@
|
| +<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.";
|
| +
|
| + // Grab a copy of the plugin's instance id ... it should not change if
|
| + // the plugin persists.
|
| + instanceId = plugin.instanceId;
|
| +
|
| + // Verify that the plugin is not destroyed.
|
| + plugin.setAttribute("display", "none");
|
| + // Force synchronous style recalc.
|
| + plugin.offsetTop;
|
| +
|
| + window.setTimeout(function () {
|
| + if (plugin.instanceId == instanceId)
|
| + result2.innerHTML = "Pass: plugin is persisting.";
|
| + else
|
| + result2.innerHTML = "Fail: plugin failed to persist.";
|
| + testRunner.notifyDone();
|
| + }, 50);
|
| + }
|
| +
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|