Index: chrome/test/data/prerender/plugin_never_load.html |
diff --git a/chrome/test/data/prerender/plugin_never_load.html b/chrome/test/data/prerender/plugin_never_load.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b5f36e6c95ed5b4732d388b9b3a77d1847aec60c |
--- /dev/null |
+++ b/chrome/test/data/prerender/plugin_never_load.html |
@@ -0,0 +1,33 @@ |
+<html> |
+<!-- |
+This test checks to make sure plugins aren't loaded when a page is prerendered, |
+and are also not loaded once the page is displayed. This is used to test certain |
+content settings that do not allow plugin loading. |
+ |
+This test relies on the Pepper plugin (but not the placeholder) implementing |
+a the postMessage() function on the plugin object. |
raymes
2015/04/15 06:44:18
nit: the postMessage()
tommycli
2015/04/15 18:23:18
Done.
|
+--> |
+<head> |
+<title>Prerender Plugin Never Load</title> |
+ |
+<script> |
+// Make sure plugin was not loaded while prerendering. |
+function DidPrerenderPass() { |
+ // |plugin| should be the blocked plugin placeholder, rather than the |
+ // test plugin. |
+ var plugin = window.document['plugin']; |
+ return plugin.postMessage == undefined; |
+} |
+ |
+// Make sure plugin still does not load once the page is displayed. |
+function DidDisplayPass() { |
+ var plugin = window.document['plugin']; |
+ return plugin.postMessage == undefined; |
+} |
+</script> |
+ |
+</head> |
+<body> |
+<embed name="plugin" type="application/x-ppapi-tests"></embed> |
+</body> |
+</html> |