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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-constructor-svg.svg

Issue 2881323002: Support Document constructor. (Closed)
Patch Set: add svg/xml tests Created 3 years, 7 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/external/wpt/dom/nodes/Document-constructor-svg.svg
diff --git a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-constructor.html b/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-constructor-svg.svg
similarity index 75%
copy from third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-constructor.html
copy to third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-constructor-svg.svg
index 11549da4ab47dd5c5ff5c1f3e661474bd023ba84..28aaf16bdcd182f0a754e197d9b250475e59c762 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-constructor.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-constructor-svg.svg
@@ -1,13 +1,12 @@
-<!doctype html>
-<meta charset=windows-1252>
+<?xml version="1.0" encoding="windows-1252"?>
<!-- Using windows-1252 to ensure that new Document() doesn't inherit utf-8
from the parent document. -->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml"
+ width="100%" height="100%" viewBox="0 0 800 600">
<title>Document constructor</title>
-<link rel=help href="https://dom.spec.whatwg.org/#dom-document">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
+<html:script src="/resources/testharness.js"></html:script>
+<html:script src="/resources/testharnessreport.js"></html:script>
+<html:script><![CDATA[
test(function() {
var doc = new Document();
assert_true(doc instanceof Node, "Should be a Node");
@@ -33,6 +32,7 @@ test(function() {
assert_equals(doc.compatMode, "CSS1Compat");
assert_equals(doc.characterSet, "UTF-8");
assert_equals(doc.contentType, "application/xml");
+ assert_equals(doc.origin, document.origin);
assert_equals(doc.createElement("DIV").localName, "DIV");
}, "new Document(): metadata")
@@ -42,12 +42,6 @@ test(function() {
assert_equals(doc.charset, "UTF-8", "charset");
assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding");
}, "new Document(): characterSet aliases")
+]]></html:script>
+</svg>
-test(function() {
- var doc = new Document();
- var a = doc.createElement("a");
- // In UTF-8: 0xC3 0xA4
- a.href = "http://example.org/?\u00E4";
- assert_equals(a.href, "http://example.org/?%C3%A4");
-}, "new Document(): URL parsing")
-</script>

Powered by Google App Engine
This is Rietveld 408576698