OLD | NEW |
(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 } |
OLD | NEW |