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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/DOMImplementation-createHTMLDocument.js

Issue 1988983002: Move the dom directory from web-platform-tests/ to wpt/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 function createHTMLDocuments(checkDoc) { 1 function createHTMLDocuments(checkDoc) {
2 var tests = [ 2 var tests = [
3 ["", "", ""], 3 ["", "", ""],
4 [null, "null", "null"], 4 [null, "null", "null"],
5 [undefined, undefined, ""], 5 [undefined, undefined, ""],
6 ["foo bar baz", "foo bar baz", "foo bar baz"], 6 ["foo bar baz", "foo bar baz", "foo bar baz"],
7 ["foo\t\tbar baz", "foo\t\tbar baz", "foo bar baz"], 7 ["foo\t\tbar baz", "foo\t\tbar baz", "foo bar baz"],
8 ["foo\n\nbar baz", "foo\n\nbar baz", "foo bar baz"], 8 ["foo\n\nbar baz", "foo\n\nbar baz", "foo bar baz"],
9 ["foo\f\fbar baz", "foo\f\fbar baz", "foo bar baz"], 9 ["foo\f\fbar baz", "foo\f\fbar baz", "foo bar baz"],
10 ["foo\r\rbar baz", "foo\r\rbar baz", "foo bar baz"], 10 ["foo\r\rbar baz", "foo\r\rbar baz", "foo bar baz"],
11 ] 11 ]
12 12
13 tests.forEach(function(t, i) { 13 tests.forEach(function(t, i) {
14 var title = t[0], expectedtitle = t[1], normalizedtitle = t[2] 14 var title = t[0], expectedtitle = t[1], normalizedtitle = t[2]
15 test(function() { 15 test(function() {
16 var doc = document.implementation.createHTMLDocument(title); 16 var doc = document.implementation.createHTMLDocument(title);
17 checkDoc(doc, expectedtitle, normalizedtitle) 17 checkDoc(doc, expectedtitle, normalizedtitle)
18 }, "createHTMLDocument test " + i + ": " + t.map(function(el) { return forma t_value(el) })) 18 }, "createHTMLDocument test " + i + ": " + t.map(function(el) { return forma t_value(el) }))
19 }) 19 })
20 20
21 test(function() { 21 test(function() {
22 var doc = document.implementation.createHTMLDocument(); 22 var doc = document.implementation.createHTMLDocument();
23 checkDoc(doc, undefined, "") 23 checkDoc(doc, undefined, "")
24 }, "Missing title argument"); 24 }, "Missing title argument");
25 } 25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698