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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-constructor.html

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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <meta charset=windows-1252> 2 <meta charset=windows-1252>
3 <!-- Using windows-1252 to ensure that new Document() doesn't inherit utf-8 3 <!-- Using windows-1252 to ensure that new Document() doesn't inherit utf-8
4 from the parent document. --> 4 from the parent document. -->
5 <title>Document constructor</title> 5 <title>Document constructor</title>
6 <link rel=help href="https://dom.spec.whatwg.org/#dom-document"> 6 <link rel=help href="https://dom.spec.whatwg.org/#dom-document">
7 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script> 8 <script src="/resources/testharnessreport.js"></script>
9 <div id="log"></div> 9 <div id="log"></div>
10 <script> 10 <script>
(...skipping 15 matching lines...) Expand all
26 assert_array_equals(doc.childNodes, [], "childNodes"); 26 assert_array_equals(doc.childNodes, [], "childNodes");
27 }, "new Document(): children") 27 }, "new Document(): children")
28 28
29 test(function() { 29 test(function() {
30 var doc = new Document(); 30 var doc = new Document();
31 assert_equals(doc.URL, "about:blank"); 31 assert_equals(doc.URL, "about:blank");
32 assert_equals(doc.documentURI, "about:blank"); 32 assert_equals(doc.documentURI, "about:blank");
33 assert_equals(doc.compatMode, "CSS1Compat"); 33 assert_equals(doc.compatMode, "CSS1Compat");
34 assert_equals(doc.characterSet, "UTF-8"); 34 assert_equals(doc.characterSet, "UTF-8");
35 assert_equals(doc.contentType, "application/xml"); 35 assert_equals(doc.contentType, "application/xml");
36 assert_equals(doc.origin, document.origin);
36 assert_equals(doc.createElement("DIV").localName, "DIV"); 37 assert_equals(doc.createElement("DIV").localName, "DIV");
37 }, "new Document(): metadata") 38 }, "new Document(): metadata")
38 39
39 test(function() { 40 test(function() {
40 var doc = new Document(); 41 var doc = new Document();
41 assert_equals(doc.characterSet, "UTF-8", "characterSet"); 42 assert_equals(doc.characterSet, "UTF-8", "characterSet");
42 assert_equals(doc.charset, "UTF-8", "charset"); 43 assert_equals(doc.charset, "UTF-8", "charset");
43 assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding"); 44 assert_equals(doc.inputEncoding, "UTF-8", "inputEncoding");
44 }, "new Document(): characterSet aliases") 45 }, "new Document(): characterSet aliases")
45 46
46 test(function() { 47 test(function() {
47 var doc = new Document(); 48 var doc = new Document();
48 var a = doc.createElement("a"); 49 var a = doc.createElement("a");
49 // In UTF-8: 0xC3 0xA4 50 // In UTF-8: 0xC3 0xA4
50 a.href = "http://example.org/?\u00E4"; 51 a.href = "http://example.org/?\u00E4";
51 assert_equals(a.href, "http://example.org/?%C3%A4"); 52 assert_equals(a.href, "http://example.org/?%C3%A4");
52 }, "new Document(): URL parsing") 53 }, "new Document(): URL parsing")
53 </script> 54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698