OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>base element test </title> | |
5 <script src="../resources/testharness.js"></script> | |
6 <script src="../resources/testharnessreport.js"></script> | |
7 <script> | |
8 function failed() { | |
9 test (function() { | |
Yoav Weiss
2016/07/12 08:39:48
You want to run an async test which is initiated g
| |
10 assert_unreached(" This is onerror() of image. "); | |
11 }, "Image Loading"); | |
12 | |
13 } | |
14 function succeeded() { | |
15 test (function() { | |
16 assert_true(true, "reference image is loadec successfully"); | |
Yoav Weiss
2016/07/12 08:39:48
s/loadec/loaded/
| |
17 }, "Image Loading."); | |
18 } | |
19 | |
20 </script> | |
21 </head> | |
22 <body> | |
23 Test for bugs.chromium.org #569760: <br/> | |
24 <img id="img1"><br/> | |
25 Reference<br/> | |
26 <img id="ref" onerror="failed()" onload="succeeded()"> | |
27 <script> | |
28 var ref = document.getElementById('ref'); | |
29 ref.src = 'resources/image1.png'; | |
Yoav Weiss
2016/07/12 08:39:48
You're testing the reference image rather than the
| |
30 | |
31 var base = document.createElement("base"); | |
32 base.setAttribute("href", "resources/"); | |
33 document.head.appendChild(base); | |
34 var img1 = document.getElementById('img1'); | |
35 img1.src = 'image1.png'; | |
36 </script> | |
37 </body> | |
38 </html> | |
OLD | NEW |