Skip to content

Commit

Permalink
2008-06-13 Maciej Stachowiak <mjs@apple.com>
Browse files Browse the repository at this point in the history
        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
  • Loading branch information
mjs@apple.com committed Jun 13, 2008
1 parent f6b094c commit d7eeb24
Show file tree
Hide file tree
Showing 29 changed files with 155 additions and 67 deletions.
53 changes: 53 additions & 0 deletions LayoutTests/ChangeLog
@@ -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.
Expand Down
@@ -0,0 +1,2 @@
Test: http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement10
Status: Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement10
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement01
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement02
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement03
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement04
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement05
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement06
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement07
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement08
Status Success
@@ -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
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameSetElement01
Status Success
@@ -0,0 +1,2 @@
Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameSetElement02
Status Success
2 changes: 1 addition & 1 deletion LayoutTests/dom/xhtml/level2/html/resources/frame.xhtml
Expand Up @@ -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">
Expand Down
139 changes: 73 additions & 66 deletions LayoutTests/dom/xhtml/level2/html/selfxhtml.js
Expand Up @@ -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);
}
}


Expand All @@ -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++;
}
}
}
Expand Down Expand Up @@ -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
Expand All @@ -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]);
}
}
//
Expand Down Expand Up @@ -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) {
Expand All @@ -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";
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
//
//
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down

0 comments on commit d7eeb24

Please sign in to comment.