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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/core/loader/ImageLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e5124e19531c657d3bbabdf41c28e9f731933890
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/loader/image-loader-base.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>base element test </title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+function failed() {
+ test (function() {
Yoav Weiss 2016/07/12 08:39:48 You want to run an async test which is initiated g
+ assert_unreached(" This is onerror() of image. ");
+ }, "Image Loading");
+
+}
+function succeeded() {
+ test (function() {
+ assert_true(true, "reference image is loadec successfully");
Yoav Weiss 2016/07/12 08:39:48 s/loadec/loaded/
+ }, "Image Loading.");
+}
+
+</script>
+</head>
+<body>
+Test for bugs.chromium.org #569760: <br/>
+<img id="img1"><br/>
+Reference<br/>
+<img id="ref" onerror="failed()" onload="succeeded()">
+<script>
+var ref = document.getElementById('ref');
+ref.src = 'resources/image1.png';
Yoav Weiss 2016/07/12 08:39:48 You're testing the reference image rather than the
+
+var base = document.createElement("base");
+base.setAttribute("href", "resources/");
+document.head.appendChild(base);
+var img1 = document.getElementById('img1');
+img1.src = 'image1.png';
+</script>
+</body>
+</html>
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/core/loader/ImageLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698