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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/fallback-image-moved-across-documents.html

Issue 2593263003: Use a non-replaced inline container for image alt text (Closed)
Patch Set: Use a non-replaced inline container for image alt text Created 3 years, 8 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script> 2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 <body> 4 <body>
5 <iframe src="about:blank" id="nested"></iframe> 5 <iframe src="about:blank" id="nested"></iframe>
6 <script type="text/javascript"> 6 <script type="text/javascript">
7 // Fallback content is implemented by means of shadow DOM, using a dumbed-down 7 // Fallback content is implemented by means of shadow DOM, using a dumbed-down
8 // HTMLImageElement instance inside to render the broken image icon. This inner 8 // HTMLImageElement instance inside to render the broken image icon. This inner
9 // image element displays a hard-coded ImageResource, and has no 'src' attribute 9 // image element displays a hard-coded ImageResource, and has no 'src' attribute
10 // so normally the `update image data` [1] algorithm is never invoked. 10 // so normally the `update image data` [1] algorithm is never invoked.
(...skipping 19 matching lines...) Expand all
30 30
31 promise_test(t => { 31 promise_test(t => {
32 let i = nestedDocument.createElement("img"); 32 let i = nestedDocument.createElement("img");
33 i.src = "non-existent/gives-404.png"; 33 i.src = "non-existent/gives-404.png";
34 window.setTimeout(_ => nestedDocument.body.append(i)); 34 window.setTimeout(_ => nestedDocument.body.append(i));
35 35
36 let eventWatcher = new EventWatcher(t, i, [ "load", "error" ]); 36 let eventWatcher = new EventWatcher(t, i, [ "load", "error" ]);
37 return eventWatcher.wait_for("error").then(_ => { 37 return eventWatcher.wait_for("error").then(_ => {
38 window.setTimeout(_ => document.body.append(i)); 38 window.setTimeout(_ => document.body.append(i));
39 return eventWatcher.wait_for("error").then(_ => { 39 return eventWatcher.wait_for("error").then(_ => {
40 assert_equals(i.clientWidth, 20, "Fallback content should be displayed."); 40 assert_equals(i.clientWidth, 0, "Fallback content will not be displayed, f allback content is treated as display:none.");
41 }); 41 });
42 }); 42 });
43 }, "Infinitely nested fallback content shadow trees should not be created, or th is test will never terminate."); 43 }, "Infinitely nested fallback content shadow trees should not be created, or th is test will never terminate.");
44 44
45 </script> 45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698