+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.
}
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);
+ }
}
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++;
}
}
}
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
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]);
}
}
//
}
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) {
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";
}
}
function UserDataMonitor() {
- this.allNotifications = new Array();
+ this.allNotifications = new Array();
}
UserDataMonitor.prototype.handle = function(operation, key, data, src, dst) {
HTMLBuilder.prototype.load = function(frame, varname, url) {
if (this.documentVarnames[0] == varname) {
- return document;
+ return document;
}
//
//
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;
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);
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);
}
// 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);