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

Side by Side Diff: third_party/WebKit/LayoutTests/loader/image-loader-base.html

Issue 2105283002: <image>'s src URL is resolved incorrectly when <base> element dynamically added (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: <image>'s src URL is resolved incorrectly when <base> element dynamically added. Created 4 years, 5 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
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698