2010-07-21 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jul 2010 01:08:36 +0000 (01:08 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jul 2010 01:08:36 +0000 (01:08 +0000)
        Reviewed by Eric Seidel.

        Let's pass the doctype01.dat tests again, please
        https://bugs.webkit.org/show_bug.cgi?id=42794

        The upstream results check the publicId and the systemId, so we need to
        make dom2string smarter and print them.

        * html5lib/resources/dom2string.js:
        (dom2string):
        * html5lib/runner-expected-html5.txt:
        * html5lib/runner-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63871 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/html5lib/resources/dom2string.js
LayoutTests/html5lib/runner-expected-html5.txt
LayoutTests/html5lib/runner-expected.txt

index 69162c0..19f9ebf 100644 (file)
@@ -2,6 +2,21 @@
 
         Reviewed by Eric Seidel.
 
+        Let's pass the doctype01.dat tests again, please
+        https://bugs.webkit.org/show_bug.cgi?id=42794
+
+        The upstream results check the publicId and the systemId, so we need to
+        make dom2string smarter and print them.
+
+        * html5lib/resources/dom2string.js:
+        (dom2string):
+        * html5lib/runner-expected-html5.txt:
+        * html5lib/runner-expected.txt:
+
+2010-07-21  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
         Implement spec changes for basefont and bgsound
         https://bugs.webkit.org/show_bug.cgi?id=42792
 
index 45897fd..3deb658 100644 (file)
@@ -33,7 +33,12 @@ function dom2string(node, ancestors) {
     str += "\n| " + indent(ancestors);
     switch (current.nodeType) {
       case 10:
-        str += '<!DOCTYPE ' + current.nodeName + '>';
+        str += '<!DOCTYPE ' + current.nodeName;
+        if (current.publicId || current.systemId) {
+            str += ' "' + current.publicId + '"';
+            str += ' "' + current.systemId + '"';
+        }
+        str += '>';
         break;
       case 8:
         try {
index af7607c..39756b1 100644 (file)
@@ -65,7 +65,6 @@ resources/tests6.dat:
 37
 44
 45
-47
 
 Test 27 of 51 in resources/tests6.dat failed. Input:
 foo<col>
@@ -108,19 +107,6 @@ Got:
 Expected:
 | <head>
 | <body>
-
-Test 47 of 51 in resources/tests6.dat failed. Input:
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html></html>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "">
-| <html>
-|   <head>
-|   <body>
 resources/tests7.dat:
 24
 30
@@ -380,256 +366,8 @@ Expected:
 |         <table>
 resources/webkit01.dat: PASS
 
-resources/doctype01.dat:
-14
-15
-16
-23
-24
-25
-26
-27
-29
-30
-32
-33
-34
-35
-36
-37
+resources/doctype01.dat: PASS
 
-Test 14 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato SYSTEM 'taco"'>Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "" "taco"">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 15 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato SYSTEM "taco">Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "" "taco">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 16 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato SYSTEM "tai'co">Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "" "tai'co">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 23 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato PUBLIC "go'of">Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "go'of" "">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 24 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato PUBLIC 'go'of'>Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "go" "">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 25 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato PUBLIC 'go:hh   of' >Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "go:hh   of" "">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 26 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato PUBLIC "W3C-//dfdf" SYSTEM ggg>Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "W3C-//dfdf" "">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 27 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-   "http://www.w3.org/TR/html4/strict.dtd">Hello
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 29 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 30 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 32 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE html PUBLIC
-  "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
-    "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 33 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML SYSTEM "http://www.w3.org/DTD/HTML4-strict.dtd"><body><b>Mine!</b></body>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "Mine!"
-Expected:
-| <!DOCTYPE html "" "http://www.w3.org/DTD/HTML4-strict.dtd">
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "Mine!"
-
-Test 34 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 35 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 36 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 37 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC'-//W3C//DTD HTML 4.01//EN''http://www.w3.org/TR/html4/strict.dtd'>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
 resources/scriptdata01.dat: PASS
 
 resources/html5test-com.dat:
index 50be3b4..f834615 100644 (file)
@@ -1220,7 +1220,6 @@ resources/tests6.dat:
 44
 45
 46
-47
 48
 49
 50
@@ -1380,19 +1379,6 @@ Expected:
 |   <frameset>
 |   " "
 
-Test 47 of 51 in resources/tests6.dat failed. Input:
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html></html>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "">
-| <html>
-|   <head>
-|   <body>
-
 Test 48 of 51 in resources/tests6.dat failed. Input:
 <param><frameset></frameset>
 Got:
@@ -6566,172 +6552,7 @@ Expected:
 |           "a"
 |         <nobr>
 resources/doctype01.dat:
-14
-15
-16
-23
-24
-25
-26
-27
-29
-30
 31
-32
-33
-34
-35
-36
-37
-
-Test 14 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato SYSTEM 'taco"'>Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "" "taco"">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 15 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato SYSTEM "taco">Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "" "taco">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 16 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato SYSTEM "tai'co">Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "" "tai'co">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 23 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato PUBLIC "go'of">Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "go'of" "">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 24 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato PUBLIC 'go'of'>Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "go" "">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 25 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato PUBLIC 'go:hh   of' >Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "go:hh   of" "">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 26 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE potato PUBLIC "W3C-//dfdf" SYSTEM ggg>Hello
-Got:
-| <!DOCTYPE potato>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE potato "W3C-//dfdf" "">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 27 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-   "http://www.w3.org/TR/html4/strict.dtd">Hello
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
-|     "Hello"
-
-Test 29 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 30 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-| <html>
-|   <head>
-|   <body>
 
 Test 31 of 37 in resources/doctype01.dat failed. Input:
 <!DOCTYPE root-element [SYSTEM OR PUBLIC FPI] "uri" [ 
@@ -6750,90 +6571,6 @@ Expected:
 |   <head>
 |   <body>
 |     "]>"
-
-Test 32 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE html PUBLIC
-  "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
-    "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 33 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML SYSTEM "http://www.w3.org/DTD/HTML4-strict.dtd"><body><b>Mine!</b></body>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "Mine!"
-Expected:
-| <!DOCTYPE html "" "http://www.w3.org/DTD/HTML4-strict.dtd">
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "Mine!"
-
-Test 34 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 35 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 36 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
-
-Test 37 of 37 in resources/doctype01.dat failed. Input:
-<!DOCTYPE HTML PUBLIC'-//W3C//DTD HTML 4.01//EN''http://www.w3.org/TR/html4/strict.dtd'>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-| <html>
-|   <head>
-|   <body>
 resources/scriptdata01.dat: PASS
 
 resources/html5test-com.dat: