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

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

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

Powered by Google App Engine
This is Rietveld 408576698