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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-base-element/base_href_data.html

Issue 2685843003: 'data:' may not be used as a document's base URL. (Closed)
Patch Set: Tests. 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="/common/get-host-info.sub.js"></script>
6
7 <base href="data:/,This is a data URL.">
8 </head>
9 <body>
10 <script>
11 async_test(t => {
12 var base = document.querySelector('base');
13 var img = new Image();
14 img.onload = t.step_func_done(_ => {
15 assert_equals(img.naturalWidth, 256, "Image loaded correctly.");
16 assert_equals(img.src, get_host_info().HTTP_ORIGIN + "/images/green-256x 256.png");
17 assert_equals(base.href, 'data:/,This is a data URL.');
18 });
19 img.onerror = t.unreached_func("Image should have loaded.");
20
21 img.src = "/images/green-256x256.png";
22 }, "'data:' is an invalid base URL.");
23 </script>
24 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698