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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html

Issue 1840933002: Do not rely on broken images in http/tests/multipart/ tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading-after-onload1.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
3 <script> 5 <script>
4 if (window.testRunner) { 6 var t = async_test("window.stop() can stop loading of multipart images");
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
7 }
8 7
9 function firstPartLoaded() 8 function firstPartLoaded()
10 { 9 {
10 const url = "resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&im g2=abe.png";
11 if (window.internals) {
12 assert_true(internals.isLoading(url), "The image should be loading befor e window.stop().");
13 }
11 window.stop(); 14 window.stop();
12 window.setTimeout(function() { 15 window.setTimeout(t.step_func(function() {
13 var broken = (testingImage.width != 2 && testingImage.width != 76); 16 if (window.internals) {
14 document.getElementById("results").innerHTML = broken ? "PASS" : "FAIL"; 17 assert_false(internals.isLoading(url), "The image should not be load ing after window.stop().");
15 if (window.testRunner) 18 }
16 testRunner.notifyDone(); 19 t.done();
17 }, 100); 20 }), 100);
18 } 21 }
19 </script> 22 </script>
20 </head> 23 </head>
21 <body> 24 <body>
22 <img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-gre en.png&img2=abe.png" onload="firstPartLoaded()"> 25 <img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-gre en.png&img2=abe.png" onload="t.step(firstPartLoaded)">
23 <p id="results"></p>
24 </body> 26 </body>
25 </html> 27 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading-after-onload1.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698