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

Unified Diff: chrome/test/data/prerender/plugin_delay_load.html

Issue 6255005: Browser test for prerendering in general (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
Index: chrome/test/data/prerender/plugin_delay_load.html
===================================================================
--- chrome/test/data/prerender/plugin_delay_load.html (revision 0)
+++ chrome/test/data/prerender/plugin_delay_load.html (revision 0)
@@ -0,0 +1,29 @@
+<html>
+<!--
+This test checks to make sure plugins aren't loaded when a page is prerendered,
+but are loaded once the page is displayed.
+-->
+<head>
+<title>Prerender Plugin Delay Loading</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.getURL;
+}
+
+// Make sure plugin loads once the page is displayed.
+function DidDisplayPass() {
+ var plugin = window.document['plugin'];
+ return plugin.getURL != undefined;
cbentzel 2011/01/21 18:37:02 Is there any race condition where the plugin isn't
mmenke 2011/01/21 20:12:20 I've spent a little time looking into this. Plugi
+}
+</script>
+
+</head>
+<body>
+<embed name="plugin" type="application/x-webkit-test-netscape"></embed>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698