Index: third_party/WebKit/LayoutTests/loader/image-loader-base.html |
diff --git a/third_party/WebKit/LayoutTests/loader/image-loader-base.html b/third_party/WebKit/LayoutTests/loader/image-loader-base.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..68e7e1fdcfda418199738f08f1cde6657de82f85 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/loader/image-loader-base.html |
@@ -0,0 +1,34 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<title>base element test </title> |
+<script> |
+if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+function runTest() { |
+ var image = document.getElementsByTagName('img')[1]; |
Yoav Weiss
2016/07/04 07:18:14
I'm assuming you're using natural{Width, Height} a
|
+ if (image.naturalHeight != 0 || image.naturalWidth != 0) |
+ document.write('PASS'); |
+ else |
+ document.write('FAIL: <base> is added after reference image is set. '); |
+} |
+</script> |
+</head> |
+<body onload="runTest()"> |
+Test for bugs.chromium.org #569760: <br/> |
+ <div id=""> |
Yoav Weiss
2016/07/04 07:18:14
Why a div here?
|
+ <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
|
+ Reference<br> |
Yoav Weiss
2016/07/04 07:18:14
Why is this indented?
|
+ <img id="ref" src=" "> |
+ </div> |
+<script> |
+ document.getElementById('ref').src = 'resources/image1.png'; |
Yoav Weiss
2016/07/04 07:18:14
Inconsistent indentation. 4 spaces as indentation
|
+ |
+ var base = document.createElement("base"); |
+ base.setAttribute("href", "resources/"); |
+ document.head.appendChild(base); |
+ document.getElementById('img1').src = 'image1.png'; |
+</script> |
+</body> |
+</html> |