Commit b5cf863a authored by mrowe@apple.com's avatar mrowe@apple.com

Fix layout tests that incorrectly attempt to detect whether they're running...

Fix layout tests that incorrectly attempt to detect whether they're running inside DumpRenderTree using "if (layoutTestController)".

Rubber-stamped by Brady Eidson.

* editing/execCommand/25256.html:
* editing/execCommand/25320.html:
* fast/canvas/arc-crash.html:
* fast/css/emptyStyleTag.html:
* fast/events/js-keyboard-event-creation.html:
* fast/events/scrollbar-double-click.html:
* fast/forms/select-no-name.html:
* fast/history/window-open.html:
* platform/mac/fast/events/objc-event-api.html:
* platform/mac/fast/events/objc-keyboard-event-creation.html:
* scrollbars/scrollbar-miss-mousemove-disabled.html:
* scrollbars/scrollbar-miss-mousemove.html:
* storage/domstorage/localstorage/clear.html:
* storage/domstorage/localstorage/delete-removal.html:
* storage/domstorage/localstorage/enumerate-storage.html:
* storage/domstorage/localstorage/index-get-and-set.html:
* storage/domstorage/localstorage/onstorage-attribute-markup.html:
* storage/domstorage/localstorage/onstorage-attribute-setattribute.html:
* storage/domstorage/localstorage/private-browsing-affects-storage.html:
* storage/domstorage/localstorage/resources/window-open-second.html:
* storage/domstorage/localstorage/simple-events.html:
* storage/domstorage/localstorage/simple-usage.html:
* storage/domstorage/localstorage/string-conversion.html:
* storage/domstorage/localstorage/window-open.html:
* storage/domstorage/sessionstorage/clear.html:
* storage/domstorage/sessionstorage/delete-removal.html:
* storage/domstorage/sessionstorage/enumerate-storage.html:
* storage/domstorage/sessionstorage/index-get-and-set.html:
* storage/domstorage/sessionstorage/onstorage-attribute-markup.html:
* storage/domstorage/sessionstorage/onstorage-attribute-setattribute.html:
* storage/domstorage/sessionstorage/private-browsing-affects-storage.html:
* storage/domstorage/sessionstorage/resources/window-open-second.html:
* storage/domstorage/sessionstorage/simple-events.html:
* storage/domstorage/sessionstorage/simple-usage.html:
* storage/domstorage/sessionstorage/string-conversion.html:
* storage/domstorage/sessionstorage/window-open.html:
* storage/domstorage/window-attributes-exist.html:
* svg/custom/stop-crash.svg:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0e1ee81c
2009-07-23 Mark Rowe <mrowe@apple.com>
Rubber-stamped by Brady Eidson.
Fix layout tests that incorrectly attempt to detect whether they're running inside DumpRenderTree
using "if (layoutTestController)".
* editing/execCommand/25256.html:
* editing/execCommand/25320.html:
* fast/canvas/arc-crash.html:
* fast/css/emptyStyleTag.html:
* fast/events/js-keyboard-event-creation.html:
* fast/events/scrollbar-double-click.html:
* fast/forms/select-no-name.html:
* fast/history/window-open.html:
* platform/mac/fast/events/objc-event-api.html:
* platform/mac/fast/events/objc-keyboard-event-creation.html:
* scrollbars/scrollbar-miss-mousemove-disabled.html:
* scrollbars/scrollbar-miss-mousemove.html:
* storage/domstorage/localstorage/clear.html:
* storage/domstorage/localstorage/delete-removal.html:
* storage/domstorage/localstorage/enumerate-storage.html:
* storage/domstorage/localstorage/index-get-and-set.html:
* storage/domstorage/localstorage/onstorage-attribute-markup.html:
* storage/domstorage/localstorage/onstorage-attribute-setattribute.html:
* storage/domstorage/localstorage/private-browsing-affects-storage.html:
* storage/domstorage/localstorage/resources/window-open-second.html:
* storage/domstorage/localstorage/simple-events.html:
* storage/domstorage/localstorage/simple-usage.html:
* storage/domstorage/localstorage/string-conversion.html:
* storage/domstorage/localstorage/window-open.html:
* storage/domstorage/sessionstorage/clear.html:
* storage/domstorage/sessionstorage/delete-removal.html:
* storage/domstorage/sessionstorage/enumerate-storage.html:
* storage/domstorage/sessionstorage/index-get-and-set.html:
* storage/domstorage/sessionstorage/onstorage-attribute-markup.html:
* storage/domstorage/sessionstorage/onstorage-attribute-setattribute.html:
* storage/domstorage/sessionstorage/private-browsing-affects-storage.html:
* storage/domstorage/sessionstorage/resources/window-open-second.html:
* storage/domstorage/sessionstorage/simple-events.html:
* storage/domstorage/sessionstorage/simple-usage.html:
* storage/domstorage/sessionstorage/string-conversion.html:
* storage/domstorage/sessionstorage/window-open.html:
* storage/domstorage/window-attributes-exist.html:
* svg/custom/stop-crash.svg:
2009-07-23 Mark Rowe <mrowe@apple.com>
And now with some valid JavaScript syntax!
......
......@@ -5,7 +5,7 @@
edit = document.getElementById("edit");
edit.focus();
document.execCommand("JustifyRight");
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
document.body.innerText = document.getElementById("description").innerText + "\n\n" + edit.innerHTML;
}
......
......@@ -2,7 +2,7 @@
<head>
<script>
function runTest() {
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
document.body.focus();
document.execCommand("JustifyCenter");
......
......@@ -29,7 +29,7 @@ function runTests() {
context.fillStyle = '#0f0';
context.fillRect(0, 0, canvas.width, canvas.height);
debug("Test passed.");
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
}
</script>
......
......@@ -5,7 +5,7 @@ This tests that we support empty style sheets.
<div id="result">Test failed.</div>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
if (document.styleSheets[0]) {
......
......@@ -18,7 +18,7 @@ function init() {
layoutTestController.dumpAsText();
input.focus();
if (eventSender) {
if (window.eventSender) {
eventSender.keyDown("\t");
eventSender.keyDown("\t", new Array("shiftKey"));
}
......
<body style="margin:0">
<script>
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
......@@ -14,7 +14,7 @@ if (layoutTestController) {
<div id="console"></div>
<script>
if (eventSender) {
if (window.eventSender) {
eventSender.mouseMoveTo(390, 300);
eventSender.mouseDown();
eventSender.mouseUp();
......
......@@ -27,7 +27,7 @@ SELECT with no name generates invalid query string.</p>
<h2 id="pass">PASS</h2>
<h2 id="fail">FAIL</h2>
<script type="text/javascript">
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.waitUntilDone();
layoutTestController.dumpAsText();
}
......
......@@ -29,7 +29,7 @@
function childLoaded()
{
childWindow.close();
if (layoutTestController) {
if (window.layoutTestController) {
document.getElementById("result").innerText = layoutTestController.webHistoryItemCount === 1 ? "PASS" : "FAIL";
layoutTestController.notifyDone();
}
......
......@@ -2,7 +2,7 @@
<head>
<script>
function init() {
if (eventSender) {
if (window.eventSender) {
layoutTestController.dumpAsText();
eventSender.mouseMoveTo(1,1);
......
......@@ -14,10 +14,10 @@ function init() {
input.addEventListener("keypress", keyevent, true);
input.addEventListener("keyup", keyevent, true);
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
if (eventSender)
if (window.eventSender)
eventSender.fireKeyboardEventsToElement(input);
}
</script>
......
<html>
<body style="margin:0">
<script>
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
......@@ -116,7 +116,7 @@ properly even is there was no mouse move onto the scrollbar; this is the
disabled control case. On success, the text should begin with "zx".<p/>
<div id="console"></div>
<script>
if (eventSender) {
if (window.eventSender) {
document.form1.text1.disabled = true;
document.form1.style.display = "none";
eventSender.mouseMoveTo(390, 10);
......
<html>
<body style="margin:0">
<script>
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
......@@ -16,7 +16,7 @@ properly even is there was no mouse move onto the scrollbar; this is the
enabled control case. On success, the offset should be 0.<p/>
<div id="console"></div>
<script>
if (eventSender) {
if (window.eventSender) {
document.getElementById('overflow').style.display = "none";
eventSender.mouseMoveTo(390, 10);
document.getElementById('overflow').style.display = "";
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......@@ -13,7 +13,7 @@ function log(a)
function finish()
{
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.notifyDone()
}
......
......@@ -15,7 +15,7 @@ function log(a)
function finish()
{
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.notifyDone()
}
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -24,7 +24,7 @@ function runTest()
window.opener.log(secondWindowLog);
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.notifyDone();
}
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
......@@ -15,7 +15,7 @@ function log(a)
function finish()
{
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.notifyDone()
}
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearLocalStorage.js"></script>
<script>
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setCanOpenWindows();
layoutTestController.waitUntilDone();
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......@@ -13,7 +13,7 @@ function log(a)
function finish()
{
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.notifyDone()
}
......
......@@ -15,7 +15,7 @@ function log(a)
function finish()
{
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.notifyDone()
}
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -24,7 +24,7 @@ function runTest()
window.opener.log(secondWindowLog);
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.notifyDone();
}
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
......@@ -15,7 +15,7 @@ function log(a)
function finish()
{
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.notifyDone()
}
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
......@@ -3,7 +3,7 @@
<script src="resources/clearSessionStorage.js"></script>
<script>
if (layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setCanOpenWindows();
layoutTestController.waitUntilDone();
......
......@@ -2,7 +2,7 @@
<head>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
function log(a)
......
<svg xmlns="http://www.w3.org/2000/svg">
<stop/>
<script>
if (layoutTestController)
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<text x="10" y="25">PASS -- if this test doesn't crash it passes.</text>
</svg>
\ No newline at end of file
</svg>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment