Chromium Code Reviews| 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..297ff1ee3c3ee552cba7db724d001b38998349de 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,26 @@ |
| <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() |
| { |
| + if (window.internals) { |
| + assert_true(internals.isLoading("resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png"), "The image should be loading before window.stop()."); |
|
yhirano
2016/11/29 01:59:39
Is it a good idea to have a constant for the url i
hiroshige
2016/11/29 07:57:00
Done.
|
| + } |
| 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("resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png"), "The image should not be loading before window.stop()."); |
|
yhirano
2016/11/29 01:59:39
after
hiroshige
2016/11/29 07:57:00
Done.
|
| + } |
| + 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> |