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

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..3d64b1334a7fea3993e5d6dadd241f9d40df9a66
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/loader/image-loader-base.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>base element test </title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+</head>
+<body>
+Test for bugs.chromium.org #569760: <br/>
+<img id="img1" ><br/>
+<script>
+var test = async_test('image loading should be loaded successfully regardless of base element');
+
+test.step(function () {
+ var elm = document.getElementById('img1');
+ elm.src = 'resources/image1.png';
+ elm.onerror = test.step_func(function () {
+ assert_unreached("onerror() of image.");
+ test.done();
+ });
+ elm.onload = test.step_func(function () {
+ assert_true(true, "Loaded successfully.");
+ test.done();
+ });
+
+ var base = document.createElement("base");
+ base.setAttribute("href", "resources/");
+ document.head.appendChild(base);
+});
+</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