| Index: third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html b/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html
|
| index 31383c786d877efd8849bad27efb24badd8db683..6235b355d0ed1e235dccb4910501b8e4a5bf332f 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html
|
| @@ -1,25 +1,27 @@
|
| <html>
|
| <head>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| <script>
|
| -if (window.testRunner) {
|
| - testRunner.dumpAsText();
|
| - testRunner.waitUntilDone();
|
| -}
|
| +var t = async_test("window.stop() can stop loading of multipart images");
|
|
|
| function firstPartLoaded()
|
| {
|
| + const url = "resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png";
|
| + if (window.internals) {
|
| + assert_true(internals.isLoading(url), "The image should be loading before window.stop().");
|
| + }
|
| window.stop();
|
| - window.setTimeout(function() {
|
| - var broken = (testingImage.width != 2 && testingImage.width != 76);
|
| - document.getElementById("results").innerHTML = broken ? "PASS" : "FAIL";
|
| - if (window.testRunner)
|
| - testRunner.notifyDone();
|
| - }, 100);
|
| + window.setTimeout(t.step_func(function() {
|
| + if (window.internals) {
|
| + assert_false(internals.isLoading(url), "The image should not be loading after window.stop().");
|
| + }
|
| + t.done();
|
| + }), 100);
|
| }
|
| </script>
|
| </head>
|
| <body>
|
| -<img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png" onload="firstPartLoaded()">
|
| -<p id="results"></p>
|
| +<img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png" onload="t.step(firstPartLoaded)">
|
| </body>
|
| </html>
|
|
|