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

Unified Diff: LayoutTests/http/tests/misc/resources/slow-frame-with-image.php

Issue 16140024: Fix resource scheduling on documents with <frameset>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Check inDocument Created 7 years, 6 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: LayoutTests/http/tests/misc/resources/slow-frame-with-image.php
diff --git a/LayoutTests/http/tests/misc/resources/slow-frame-with-image.php b/LayoutTests/http/tests/misc/resources/slow-frame-with-image.php
new file mode 100644
index 0000000000000000000000000000000000000000..9fbf355c0d86c32ba33a84f90589ef6aa92d7f1b
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/slow-frame-with-image.php
@@ -0,0 +1,49 @@
+<?
+header("Content-Type: text/html; charset=utf-8");
+?>
+<!-- If the scheduler has been disabled as it should, the image will load immediately rather than waiting for this frame to finish. -->
+<html>
+<head>
+<script src="/resources/js-test-pre.js"></script>
+<script>
+window.jsTestIsAsync = true;
+if (self.testRunner)
+ testRunner.waitUntilDone();
+
+var is_image_done = false;
+var is_dom_content_loaded = false;
+
+function imageDone() {
+ is_image_done = true;
+ shouldBeFalse("is_dom_content_loaded");
+ checkDone();
+}
+
+function bodyDone() {
+ is_dom_content_loaded = true;
+ shouldBeTrue("is_image_done");
+ checkDone();
+}
+
+function checkDone() {
+ if (is_image_done && is_dom_content_loaded) {
+ finishJSTest();
+ }
+}
+
+document.addEventListener("DOMContentLoaded", bodyDone);
+
+var successfullyParsed = true;
+</script>
+</head>
+<body>
+<div id="console"></div>
+<img src="compass.jpg" onload="imageDone()">
+<?php
+ob_flush();
+flush();
+sleep(2);
+?>
+<script src="/resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/http/tests/misc/frameset-disables-resource-scheduling-expected.txt ('k') | Source/core/html/HTMLFrameSetElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698