OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>base element test </title> | |
5 <script> | |
6 if (window.testRunner) | |
7 testRunner.dumpAsText(); | |
8 | |
9 function runTest() { | |
10 var image = document.getElementsByTagName('img')[1]; | |
Yoav Weiss
2016/07/04 07:18:14
I'm assuming you're using natural{Width, Height} a
| |
11 if (image.naturalHeight != 0 || image.naturalWidth != 0) | |
12 document.write('PASS'); | |
13 else | |
14 document.write('FAIL: <base> is added after reference image is set. '); | |
15 } | |
16 </script> | |
17 </head> | |
18 <body onload="runTest()"> | |
19 Test for bugs.chromium.org #569760: <br/> | |
20 <div id=""> | |
Yoav Weiss
2016/07/04 07:18:14
Why a div here?
| |
21 <img id="img1" src=""><br> | |
Yoav Weiss
2016/07/04 07:18:14
Is the empty "src" part of the test? If not, can y
| |
22 Reference<br> | |
Yoav Weiss
2016/07/04 07:18:14
Why is this indented?
| |
23 <img id="ref" src=" "> | |
24 </div> | |
25 <script> | |
26 document.getElementById('ref').src = 'resources/image1.png'; | |
Yoav Weiss
2016/07/04 07:18:14
Inconsistent indentation. 4 spaces as indentation
| |
27 | |
28 var base = document.createElement("base"); | |
29 base.setAttribute("href", "resources/"); | |
30 document.head.appendChild(base); | |
31 document.getElementById('img1').src = 'image1.png'; | |
32 </script> | |
33 </body> | |
34 </html> | |
OLD | NEW |