| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |