2008-06-13 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jun 2008 22:05:58 +0000 (22:05 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jun 2008 22:05:58 +0000 (22:05 +0000)
        Reviewed by Darin.

        - enable a bunch of disabled layout tests which now run ok
        https://bugs.webkit.org/show_bug.cgi?id=19540

        I also made a minor change to selftxhtml.js to handle the case
        where the body is a frameset properly, and to frame.xhtml to match
        the HTML version of that file, and what the tests expect.

        * dom/html/level2/html/HTMLFormElement10-expected.txt: Added.
        * dom/html/level2/html/HTMLFormElement10.html: Copied from dom/html/level2/html/HTMLFormElement10.html-disabled.
        * dom/html/level2/html/HTMLFormElement10.html-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFormElement10-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFormElement10.xhtml: Copied from dom/xhtml/level2/html/HTMLFormElement10.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFormElement10.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement01-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement01.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement01.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement01.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement02-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement02.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement02.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement02.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement03-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement03.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement03.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement03.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement04-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement04.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement04.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement04.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement05-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement05.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement05.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement05.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement06-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement06.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement06.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement06.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement07-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement07.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement07.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement07.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement08-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement08.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement08.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement08.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameElement09-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameElement09.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement09.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameElement09.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameSetElement01-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameSetElement01.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameSetElement01.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameSetElement01.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/HTMLFrameSetElement02-expected.txt: Added.
        * dom/xhtml/level2/html/HTMLFrameSetElement02.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameSetElement02.xhtml-disabled.
        * dom/xhtml/level2/html/HTMLFrameSetElement02.xhtml-disabled: Removed.
        * dom/xhtml/level2/html/resources/frame.xhtml:
        * dom/xhtml/level2/html/selfxhtml.js:

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

29 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/html/level2/html/HTMLFormElement10-expected.txt [new file with mode: 0644]
LayoutTests/dom/html/level2/html/HTMLFormElement10.html [moved from LayoutTests/dom/html/level2/html/HTMLFormElement10.html-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFormElement10-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFormElement10.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFormElement10.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement01-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement01.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement01.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement02-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement02.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement02.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement03-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement03.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement03.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement04-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement04.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement04.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement05-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement05.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement05.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement06-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement06.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement06.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement07-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement07.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement07.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement08-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement08.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement08.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement09-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameElement09.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameElement09.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement01-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement01.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement01.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement02-expected.txt [new file with mode: 0644]
LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement02.xhtml [moved from LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement02.xhtml-disabled with 100% similarity]
LayoutTests/dom/xhtml/level2/html/resources/frame.xhtml
LayoutTests/dom/xhtml/level2/html/selfxhtml.js

index 9b71167302eafc8285859692456ef73b21efbc05..1250bca45522e0996b4db869c2f762ef635307b5 100644 (file)
@@ -1,3 +1,56 @@
+2008-06-13  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+        
+        - enable a bunch of disabled layout tests which now run ok
+        https://bugs.webkit.org/show_bug.cgi?id=19540
+        
+        I also made a minor change to selftxhtml.js to handle the case
+        where the body is a frameset properly, and to frame.xhtml to match
+        the HTML version of that file, and what the tests expect.
+
+        * dom/html/level2/html/HTMLFormElement10-expected.txt: Added.
+        * dom/html/level2/html/HTMLFormElement10.html: Copied from dom/html/level2/html/HTMLFormElement10.html-disabled.
+        * dom/html/level2/html/HTMLFormElement10.html-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFormElement10-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFormElement10.xhtml: Copied from dom/xhtml/level2/html/HTMLFormElement10.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFormElement10.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement01-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement01.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement01.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement01.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement02-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement02.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement02.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement02.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement03-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement03.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement03.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement03.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement04-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement04.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement04.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement04.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement05-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement05.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement05.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement05.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement06-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement06.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement06.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement06.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement07-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement07.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement07.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement07.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement08-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement08.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement08.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement08.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameElement09-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameElement09.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameElement09.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameElement09.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameSetElement01-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameSetElement01.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameSetElement01.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameSetElement01.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/HTMLFrameSetElement02-expected.txt: Added.
+        * dom/xhtml/level2/html/HTMLFrameSetElement02.xhtml: Copied from dom/xhtml/level2/html/HTMLFrameSetElement02.xhtml-disabled.
+        * dom/xhtml/level2/html/HTMLFrameSetElement02.xhtml-disabled: Removed.
+        * dom/xhtml/level2/html/resources/frame.xhtml:
+        * dom/xhtml/level2/html/selfxhtml.js:
+
 2008-06-12  Adam Barth  <abarth@webkit.org>
 
         Rubberstamped by Maciej.
diff --git a/LayoutTests/dom/html/level2/html/HTMLFormElement10-expected.txt b/LayoutTests/dom/html/level2/html/HTMLFormElement10-expected.txt
new file mode 100644 (file)
index 0000000..1d11f50
--- /dev/null
@@ -0,0 +1,2 @@
+Test:  http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement10
+Status:        Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFormElement10-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFormElement10-expected.txt
new file mode 100644 (file)
index 0000000..18b65da
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement10
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement01-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement01-expected.txt
new file mode 100644 (file)
index 0000000..589cbd3
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement02-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement02-expected.txt
new file mode 100644 (file)
index 0000000..e2309f2
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement02
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement03-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement03-expected.txt
new file mode 100644 (file)
index 0000000..8bd8dbf
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement03
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement04-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement04-expected.txt
new file mode 100644 (file)
index 0000000..343651b
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement04
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement05-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement05-expected.txt
new file mode 100644 (file)
index 0000000..cee235d
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement05
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement06-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement06-expected.txt
new file mode 100644 (file)
index 0000000..7ea84ec
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement06
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement07-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement07-expected.txt
new file mode 100644 (file)
index 0000000..d6b908d
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement07
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement08-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement08-expected.txt
new file mode 100644 (file)
index 0000000..e79ee16
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement08
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement09-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameElement09-expected.txt
new file mode 100644 (file)
index 0000000..c666ad6
--- /dev/null
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 722: Value complete does not allow function calls.
+CONSOLE MESSAGE: line 722: Value complete does not allow function calls.
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement09
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement01-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement01-expected.txt
new file mode 100644 (file)
index 0000000..cfe6b80
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameSetElement01
+Status Success
diff --git a/LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement02-expected.txt b/LayoutTests/dom/xhtml/level2/html/HTMLFrameSetElement02-expected.txt
new file mode 100644 (file)
index 0000000..5befeaf
--- /dev/null
@@ -0,0 +1,2 @@
+Test   http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameSetElement02
+Status Success
index bbe00fac1e9b68ebccc67512597d2bbcf19a40a5..e3e6aec618e5b396b20886d7a9ea05ff0e926803 100644 (file)
@@ -4,7 +4,7 @@
    "xhtml1-frameset.dtd">
 <html xmlns='http://www.w3.org/1999/xhtml'>
 <head>
-<title>NIST DOM HTML Test - FRAME</title>
+<title>NIST DOM HTML Test - FRAMESET</title>
 </head>
 <frameset cols="20, 80"  onload="parent.loadComplete()">
 <frameset rows="100, 200">
index 8976ccfaa2f5477db57ca666907f11c022b9d6ca..e7127f71a21991eef2f6dec23f52a1e7c24eba0c 100644 (file)
@@ -17,15 +17,15 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   }
 
   function assertEqualsAutoCase(context, descr, expected, actual) {
-       if (builder.contentType == "text/html") {
-           if(context == "attribute") {
-               assertEquals(descr, expected.toLowerCase(), actual.toLowerCase());
-           } else {
-               assertEquals(descr, expected.toUpperCase(), actual);
-           }
-       } else {
-               assertEquals(descr, expected, actual); 
-       }
+      if (builder.contentType == "text/html") {
+          if(context == "attribute") {
+              assertEquals(descr, expected.toLowerCase(), actual.toLowerCase());
+          } else {
+              assertEquals(descr, expected.toUpperCase(), actual);
+          }
+      } else {
+          assertEquals(descr, expected, actual); 
+      }
   }
   
 
@@ -47,19 +47,19 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
         matches = 0;
         expectedValue = expected[i];
         for(j = 0; j < actualLen; j++) {
-               if (builder.contentType == "text/html") {
-                       if (context == "attribute") {
-                               if (expectedValue.toLowerCase() == actual[j].toLowerCase()) {
-                                       matches++;
-                               }
-                       } else {
-                               if (expectedValue.toUpperCase() == actual[j]) {
-                                       matches++;
-                               }
-                       }
-               } else {
-               if(expectedValue == actual[j]) {
-                       matches++;
+            if (builder.contentType == "text/html") {
+                if (context == "attribute") {
+                    if (expectedValue.toLowerCase() == actual[j].toLowerCase()) {
+                        matches++;
+                    }
+                } else {
+                    if (expectedValue.toUpperCase() == actual[j]) {
+                        matches++;
+                    }
+                }
+            } else {
+                if(expectedValue == actual[j]) {
+                    matches++;
                 }
             }
         }
@@ -104,13 +104,13 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
   function assertEqualsListAutoCase(context, descr, expected, actual) {
-       var minLength = expected.length;
-       if (actual.length < minLength) {
-           minLength = actual.length;
-       }
+    var minLength = expected.length;
+    if (actual.length < minLength) {
+        minLength = actual.length;
+    }
     //
     for(var i = 0; i < minLength; i++) {
-               assertEqualsAutoCase(context, descr, expected[i], actual[i]);
+        assertEqualsAutoCase(context, descr, expected[i], actual[i]);
     }
     //
     //  if they aren't the same size, they aren't equal
@@ -119,14 +119,14 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
   function assertEqualsList(descr, expected, actual) {
-       var minLength = expected.length;
-       if (actual.length < minLength) {
-           minLength = actual.length;
-       }
+    var minLength = expected.length;
+    if (actual.length < minLength) {
+        minLength = actual.length;
+    }
     //
     for(var i = 0; i < minLength; i++) {
         if(expected[i] != actual[i]) {
-                       assertEquals(descr, expected[i], actual[i]);
+            assertEquals(descr, expected[i], actual[i]);
         }
     }
     //
@@ -240,13 +240,13 @@ function same(expected, actual)
 }
 
 function equalsAutoCase(context, expected, actual) {
-       if (builder.contentType == "text/html") {
-               if (context == "attribute") {
-                       return expected.toLowerCase() == actual;
-               }
-               return expected.toUpperCase() == actual;
-       }
-       return expected == actual;
+    if (builder.contentType == "text/html") {
+        if (context == "attribute") {
+            return expected.toLowerCase() == actual;
+        }
+        return expected.toUpperCase() == actual;
+    }
+    return expected == actual;
 }
 
 function toLowerArray(src) {
@@ -260,7 +260,7 @@ function toLowerArray(src) {
 
 function createTempURI(scheme) {
    if (scheme == "http") {
-         return "http://localhost:8080/webdav/tmp" + Math.floor(Math.random() * 100000) + ".xml";
+         return "http://localhost:8080/webdav/tmp" + Math.floor(Math.random() * 100000) + ".xml";
    }
    return "file:///tmp/domts" + Math.floor(Math.random() * 100000) + ".xml";
 }
@@ -328,7 +328,7 @@ function UserDataNotification(operation, key, data, src, dst) {
 }
 
 function UserDataMonitor() {
-       this.allNotifications = new Array();
+    this.allNotifications = new Array();
 }
 
 UserDataMonitor.prototype.handle = function(operation, key, data, src, dst) {
@@ -432,7 +432,7 @@ HTMLBuilder.prototype.cloneNode = function(srcNode, doc) {
 
 HTMLBuilder.prototype.load = function(frame, varname, url) {
   if (this.documentVarnames[0] == varname) {
-       return document;
+      return document;
   }
   //
   //
@@ -470,7 +470,7 @@ HTMLBuilder.prototype.load = function(frame, varname, url) {
       var srcNode = document.firstChild;
       while(srcNode != null && srcNode.nodeType != 1) {
           if (srcNode.nodeType != 10) {
-                var cloneNode = this.cloneNode(srcNode, clone);
+               var cloneNode = this.cloneNode(srcNode, clone);
              clone.insertBefore(cloneNode, clone.documentElement);
            }
            srcNode = srcNode.nextSibling; 
@@ -559,24 +559,31 @@ function setResult(resultType, message) {
    var statusDiv2 = statusRow.insertCell(-1);
    var style = "color:green";
    if (resultType == null) {
-               statusDiv2.appendChild(document.createTextNode("Success"));
+           statusDiv2.appendChild(document.createTextNode("Success"));
    } else {
-               statusDiv2.appendChild(document.createTextNode(resultType));
-               if (resultType == "skip") {
-                   style = "color:blue";
-               } else {
-                   style = "color:red";
-               }
+           statusDiv2.appendChild(document.createTextNode(resultType));
+           if (resultType == "skip") {
+               style = "color:blue";
+           } else {
+               style = "color:red";
+           }
    }
    newTable.setAttributeNS(null, "style", style);
    if (message != null) {
       var messageRow = newTable.insertRow(-1);
-         var messageDiv1 = messageRow.insertCell(-1);
+         var messageDiv1 = messageRow.insertCell(-1);
       messageDiv1.appendChild(document.createTextNode("Message"));
       var messageDiv2 = messageRow.insertCell(-1);
       messageDiv2.appendChild(document.createTextNode((message instanceof Error) ? ("Line " + message.line + ": " + message.name) : message));
    }
-   var oldBody = document.getElementsByTagName("body")[0];
+   //
+   //  WebKit modification: 18-August-2005
+   //
+   //  Use document.body instead of the line of code below, since this is wrong for a frameset.
+   //
+   // var oldBody = document.getElementsByTagName("body")[0];
+   var oldBody = document.body;
+
    oldBody.parentNode.replaceChild(newBody, oldBody);
    if (parent != window && typeof(parent.setResult) != 'undefined') {
        parent.setResult(testName, resultType, message);
@@ -686,7 +693,7 @@ function getResourceURI(name, scheme, contentType) {
     if (base == null) {
        base = "";
     } else {
-          base = base.substring(0, base.lastIndexOf('/') + 1) + "files/";
+       base = base.substring(0, base.lastIndexOf('/') + 1) + "files/";
     }
     return base + name + getSuffix(contentType);
 }
@@ -709,19 +716,19 @@ if (window.layoutTestController) {
 //  End WebKit modification
 //
 
-       //
-       //   invoke test setup
-       //
-       setUpPage();
-       try {
-           runTest();
-           if (builder.initializationError == null) {
-              setResult(null, null);
-           } else {
-              setResult("skip", builder.initializationError);
-           }
-       } catch(ex) {
-           if (typeof(ex.substring) != 'undefined' && ex.substring(0, 8) == "failure:") {
+    //
+    //   invoke test setup
+    //
+    setUpPage();
+    try {
+        runTest();
+        if (builder.initializationError == null) {
+           setResult(null, null);
+        } else {
+           setResult("skip", builder.initializationError);
+        }
+    } catch(ex) {
+        if (typeof(ex.substring) != 'undefined' && ex.substring(0, 8) == "failure:") {
             setResult("failure", ex.substring(8));
         } else {
             setResult("error", ex);