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

Unified Diff: third_party/WebKit/LayoutTests/fast/backgrounds/background-image-relative-url-in-iframe.html

Issue 2718273002: Resolve background image's url if absolute url is empty (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/LayoutTests/fast/backgrounds/background-image-relative-url-in-iframe.html
diff --git a/third_party/WebKit/LayoutTests/fast/backgrounds/background-image-relative-url-in-iframe.html b/third_party/WebKit/LayoutTests/fast/backgrounds/background-image-relative-url-in-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..f8376715786a025b044239cffdeb206872e9691c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/backgrounds/background-image-relative-url-in-iframe.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
rune 2017/02/28 09:29:05 Drop html and head tags.
+ <script>
+ function makeIframe() {
+ var iframe = document.getElementById('iframe');
+ iframe.contentDocument.body.innerHTML = `
+ <style>
+ .bg-img {
+ background: url('./resources/green-24x24.png') no-repeat #3D6AA2;
rune 2017/02/28 09:29:05 Looks like no-repeat or repeat should be enough.
+ width: 24px;
+ height:24px;
+ }
+ </style>
+ <div class='bg-img'></div>`;
+ }
+ </script>
+ </head>
+ <body onload="makeIframe()">
rune 2017/02/28 09:29:06 Do you really need to wait for onload? Can't you s
+ <iframe id="iframe"></iframe>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698