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

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

Issue 2863763003: Remove EventSender from ImageLoader (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/resources/srcset-helper.js » ('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> 3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script> 4 <script src="../../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 var t = async_test("window.stop() can stop loading of multipart images"); 6 var t = async_test("window.stop() can stop loading of multipart images");
7 7
8 function firstPartLoaded() 8 function firstPartLoaded()
9 { 9 {
10 const url = "resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&im g2=abe.png"; 10 const url = "resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&im g2=abe.png";
11 if (window.internals) { 11 if (window.internals) {
12 assert_true(internals.isLoading(url), "The image should be loading befor e window.stop()."); 12 assert_true(internals.isLoading(url), "The image should be loading befor e window.stop().");
13 } 13 }
14 window.stop(); 14 window.stop();
15
16 // We emulate window load event to signal testharness.js that we don't
17 // have to wait for window load event (that will never occur because
18 // we've called window.stop()) before test completes.
19 dispatchEvent(new Event('load'));
20
15 window.setTimeout(t.step_func(function() { 21 window.setTimeout(t.step_func(function() {
16 if (window.internals) { 22 if (window.internals) {
17 assert_false(internals.isLoading(url), "The image should not be load ing after window.stop()."); 23 assert_false(internals.isLoading(url), "The image should not be load ing after window.stop().");
18 } 24 }
19 t.done(); 25 t.done();
20 }), 100); 26 }), 100);
21 } 27 }
22 </script> 28 </script>
23 </head> 29 </head>
24 <body> 30 <body>
25 <img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-gre en.png&img2=abe.png" onload="t.step(firstPartLoaded)"> 31 <img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-gre en.png&img2=abe.png" onload="t.step(firstPartLoaded)">
26 </body> 32 </body>
27 </html> 33 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/resources/srcset-helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698