Commit 9f3bdaa8 authored by rniwa@webkit.org's avatar rniwa@webkit.org

Fonts, fullscreen, gamepad, and html5lib tests should use testRunner instead...

Fonts, fullscreen, gamepad, and html5lib tests should use testRunner instead of layoutTestController
https://bugs.webkit.org/show_bug.cgi?id=88959

Reviewed by Darin Adler.

* fonts/valid-standard-font.html:
* fullscreen/anonymous-block-merge-crash.html:
* fullscreen/full-screen-element-stack.html:
* fullscreen/full-screen-frameset.html:
* fullscreen/full-screen-iframe-zIndex.html:
* fullscreen/full-screen-keyboard-disabled.html:
* fullscreen/full-screen-keyboard-enabled.html:
* fullscreen/full-screen-remove-ancestor-during-transition.html:
* fullscreen/full-screen-remove-sibling.html:
* fullscreen/full-screen-render-inline.html:
* fullscreen/full-screen-request-rejected.html:
* fullscreen/full-screen-request-removed.html:
* fullscreen/full-screen-restrictions.html:
* fullscreen/full-screen-stacking-context.html:
* fullscreen/full-screen-test.js:
(runWithKeyDown):
(endTest):
* fullscreen/full-screen-zIndex-after.html:
* fullscreen/full-screen-zIndex.html:
* fullscreen/non-ancestor-iframe.html:
* fullscreen/parent-flow-inline-with-block-child.html:
* fullscreen/video-controls-override.html:
* html5lib/resources/runner.js:
(run):
* html5lib/webkit-resumer.html:
* platform/gtk/fonts/custom-font-missing-glyphs.html:
* platform/gtk/fonts/font-face-with-complex-text.html:
* platform/gtk/fonts/font-family-fallback.html:
* platform/gtk/fonts/synthetic-oblique-positioning.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 11c75f50
2012-06-13 Ryosuke Niwa <rniwa@webkit.org>
Fonts, fullscreen, gamepad, and html5lib tests should use testRunner instead of layoutTestController
https://bugs.webkit.org/show_bug.cgi?id=88959
Reviewed by Darin Adler.
* fonts/valid-standard-font.html:
* fullscreen/anonymous-block-merge-crash.html:
* fullscreen/full-screen-element-stack.html:
* fullscreen/full-screen-frameset.html:
* fullscreen/full-screen-iframe-zIndex.html:
* fullscreen/full-screen-keyboard-disabled.html:
* fullscreen/full-screen-keyboard-enabled.html:
* fullscreen/full-screen-remove-ancestor-during-transition.html:
* fullscreen/full-screen-remove-sibling.html:
* fullscreen/full-screen-render-inline.html:
* fullscreen/full-screen-request-rejected.html:
* fullscreen/full-screen-request-removed.html:
* fullscreen/full-screen-restrictions.html:
* fullscreen/full-screen-stacking-context.html:
* fullscreen/full-screen-test.js:
(runWithKeyDown):
(endTest):
* fullscreen/full-screen-zIndex-after.html:
* fullscreen/full-screen-zIndex.html:
* fullscreen/non-ancestor-iframe.html:
* fullscreen/parent-flow-inline-with-block-child.html:
* fullscreen/video-controls-override.html:
* html5lib/resources/runner.js:
(run):
* html5lib/webkit-resumer.html:
* platform/gtk/fonts/custom-font-missing-glyphs.html:
* platform/gtk/fonts/font-face-with-complex-text.html:
* platform/gtk/fonts/font-family-fallback.html:
* platform/gtk/fonts/synthetic-oblique-positioning.html:
2012-06-13 Kristóf Kosztyó <kkristof@inf.u-szeged.hu>
[Qt] Unreviewed gardening. Skip new failing tests.
......
......@@ -3,15 +3,15 @@
<!-- WebKit assumes that -webkit-body is a valid font. The font-family:inherit will crash on load if it isn't -->
<input style="font-family:inherit"/>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
window.setTimeout(runTest, 0);
function runTest() {
document.getElementById("result").innerText = "PASS";
if (window.layoutTestController) {
layoutTestController.notifyDone();
if (window.testRunner) {
testRunner.notifyDone();
}
}
</script>
......
......@@ -8,7 +8,7 @@
document.onwebkitfullscreenchange = function(event) {
document.body.appendChild(document.createElement('div'));
document.webkitCancelFullScreen();
layoutTestController.notifyDone();
testRunner.notifyDone();
};
runWithKeyDown(function(){span.webkitRequestFullScreen()});
......
......@@ -20,14 +20,14 @@
var oneEnteredFullscreen = function() {
testExpected("document.webkitFullscreenElement.id", "one");
callback = twoEnteredFullscreen;
if (window.layoutTestController)
if (window.testRunner)
runWithKeyDown(function() { two.webkitRequestFullscreen(); });
};
var twoEnteredFullscreen = function() {
testExpected("document.webkitFullscreenElement.id", "two");
callback = twoExitedFullscreen;
if (window.layoutTestController)
if (window.testRunner)
document.webkitExitFullscreen();
};
......@@ -37,7 +37,7 @@
};
callback = oneEnteredFullscreen;
if (window.layoutTestController)
if (window.testRunner)
runWithKeyDown(function() { one.webkitRequestFullscreen(); });
}
</script>
......@@ -54,4 +54,4 @@
<button onclick="document.webkitExitFullscreen()">Exit full screen (two)</button>
</div>
</div>
</body>
\ No newline at end of file
</body>
<script src="full-screen-test.js"></script>
<script>
if (window.layoutTestController)
layoutTestController.dumpChildFramesAsText();
if (window.testRunner)
testRunner.dumpChildFramesAsText();
var waitingFor = 2;
function runTest() {
......@@ -12,8 +12,8 @@ function runTest() {
waitForEvent(frame.contentDocument, 'webkitfullscreenchange', function() {
consoleWrite("FAIL - entered full screen!");
endTest();
if (layoutTestController)
layoutTestController.notifyDone();
if (testRunner)
testRunner.notifyDone();
});
runWithKeyDown(function() {
......@@ -21,8 +21,8 @@ function runTest() {
setTimeout(function() {
consoleWrite("SUCCEED - did not enter full screen!");
endTest();
if (layoutTestController)
layoutTestController.notifyDone();
if (testRunner)
testRunner.notifyDone();
}, 50);
frame.contentDocument.documentElement.webkitRequestFullScreen();
......
......@@ -49,4 +49,4 @@
Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div>
<div id="block2"></div>
<iframe webkitallowfullscreen src="resources/inner.html" id="block1"></iframe>
</body>
\ No newline at end of file
</body>
......@@ -19,7 +19,7 @@
var spanEnteredFullScreen = function() {
callback = null;
testExpected("document.webkitIsFullScreen", true);
if (window.layoutTestController && eventSender.keyDown) {
if (window.testRunner && eventSender.keyDown) {
waitForEvent(document, 'keypress', keyPressed);
eventSender.keyDown('a', []);
eventSender.keyDown(' ', []);
......
......@@ -19,7 +19,7 @@
var spanEnteredFullScreen = function() {
callback = null;
testExpected("document.webkitIsFullScreen", true);
if (window.layoutTestController && eventSender.keyDown) {
if (window.testRunner && eventSender.keyDown) {
waitForEvent(document, 'keypress', keyPressed);
eventSender.keyDown('a', []);
}
......
<script src="../fast/js/resources/js-test-pre.js"></script>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function runWithKeyDown(fn)
{
document.addEventListener('keydown', function() { fn(); }, false);
if (window.layoutTestController) {
if (window.testRunner) {
eventSender.keyDown('a');
}
}
......@@ -29,8 +29,8 @@ function goFullScreen() {
iframe.parentNode.removeChild(iframe);
gc();
setTimeout(function () {
if (window.layoutTestController) {
layoutTestController.notifyDone();
if (window.testRunner) {
testRunner.notifyDone();
}
}, 0);
}, 0);
......
......@@ -24,4 +24,4 @@ if (Element.prototype.webkitRequestFullScreen == undefined) {
}
runWithKeyDown(goFullScreen);
}
</script>
\ No newline at end of file
</script>
......@@ -7,8 +7,8 @@ body {
<summary>a<span>b<div>c</div>d</span>e</summary>
<script>
if ("webkitRequestFullScreen" in Element.prototype) {
if (window.layoutTestController)
layoutTestController.waitUntilDone();
if (window.testRunner)
testRunner.waitUntilDone();
document.body.offsetTop;
var span = document.getElementsByTagName('span')[0];
......@@ -18,8 +18,8 @@ body {
document.webkitCancelFullScreen();
}, 0)
} else {
if (window.layoutTestController)
layoutTestController.notifyDone();
if (window.testRunner)
testRunner.notifyDone();
}
};
......
......@@ -11,8 +11,8 @@
logResult("Entered full screen.", false);
endTest();
});
if (layoutTestController)
layoutTestController.setPopupBlockingEnabled(true);
if (testRunner)
testRunner.setPopupBlockingEnabled(true);
waitForEventAndEnd(document, 'webkitfullscreenerror');
document.documentElement.webkitRequestFullScreen();
}
......
......@@ -12,8 +12,8 @@ function runTest() {
consoleWrite("SUCCEED - did not enter full screen!");
});
if (layoutTestController)
layoutTestController.setPopupBlockingEnabled(true);
if (testRunner)
testRunner.setPopupBlockingEnabled(true);
var div = document.createElement('div');
document.documentElement.appendChild(div);
......
......@@ -61,7 +61,7 @@
div.webkitRequestFullscreen();
};
if (typeof(layoutTestController) != 'undefined')
layoutTestController.setPopupBlockingEnabled(true);
if (typeof(testRunner) != 'undefined')
testRunner.setPopupBlockingEnabled(true);
}
</script>
......@@ -59,4 +59,4 @@
<div id="zero">
<video id="video"></video>
</div>
</body>
\ No newline at end of file
</body>
......@@ -4,16 +4,16 @@ var runPixelTests;
logConsole();
if (window.layoutTestController) {
layoutTestController.dumpAsText(runPixelTests);
layoutTestController.waitUntilDone();
if (window.testRunner) {
testRunner.dumpAsText(runPixelTests);
testRunner.waitUntilDone();
}
function runWithKeyDown(fn)
{
// FIXME: WKTR does not yet support the keyDown() message. Do a mouseDown here
// instead until keyDown support is added.
var eventName = !window.layoutTestController || eventSender.keyDown ? 'keypress' : 'mousedown'
var eventName = !window.testRunner || eventSender.keyDown ? 'keypress' : 'mousedown'
function thunk() {
document.removeEventListener(eventName, thunk, false);
......@@ -21,7 +21,7 @@ function runWithKeyDown(fn)
}
document.addEventListener(eventName, thunk, false);
if (window.layoutTestController) {
if (window.testRunner) {
if (eventSender.keyDown)
eventSender.keyDown(" ", []);
else
......@@ -145,8 +145,8 @@ function endTest()
{
consoleWrite("END OF TEST");
testEnded = true;
if (window.layoutTestController)
layoutTestController.notifyDone();
if (window.testRunner)
testRunner.notifyDone();
}
function logResult(success, text)
......
......@@ -57,4 +57,4 @@
<div id="block3">
<div id="block1"></div>
</div>
</body>
\ No newline at end of file
</body>
......@@ -47,4 +47,4 @@
Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div>
<div id="block2"></div>
<div id="block1"></div>
</body>
\ No newline at end of file
</body>
......@@ -23,6 +23,6 @@
target.webkitRequestFullscreen();
};
if (window.layoutTestController)
if (window.testRunner)
runWithKeyDown(startTest);
</script>
\ No newline at end of file
</script>
......@@ -12,8 +12,8 @@ body {
<script>
if ("webkitRequestFullScreen" in Element.prototype) {
if (window.layoutTestController)
layoutTestController.waitUntilDone();
if (window.testRunner)
testRunner.waitUntilDone();
var callback;
var fullscreenChanged = function(event)
......@@ -31,8 +31,8 @@ body {
setTimeout(function () {
span.appendChild(document.createElement('div'));
callback = function() {
if (window.layoutTestController)
layoutTestController.notifyDone();
if (window.testRunner)
testRunner.notifyDone();
}
document.webkitCancelFullScreen();
}, 0);
......
......@@ -33,10 +33,10 @@
};
var cancelledFullScreen = function() {
if (window.layoutTestController)
if (window.testRunner)
testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none');
else
logResult(false, "window.layoutTestController == undefined");
logResult(false, "window.testRunner == undefined");
endTest();
};
......
......@@ -30,8 +30,8 @@ document.writeln("</style>");
document.writeln("<p>Script did not run</p>");
document.writeln("<iframe></iframe>");
if (window.layoutTestController)
layoutTestController.waitUntilDone();
if (window.testRunner)
testRunner.waitUntilDone();
Markup.noAutoDump();
Markup.useHTML5libOutputFormat();
......@@ -77,8 +77,8 @@ function run()
}
xhr.send(null);
} else {
if (window.layoutTestController)
layoutTestController.notifyDone();
if (window.testRunner)
testRunner.notifyDone();
}
}
......
......@@ -32,8 +32,8 @@ display: none;
<p>Script did not run</p>
<iframe></iframe>
<script>
if (window.layoutTestController)
layoutTestController.waitUntilDone();
if (window.testRunner)
testRunner.waitUntilDone();
Markup.noAutoDump();
Markup.useHTML5libOutputFormat();
......@@ -101,8 +101,8 @@ function run()
}
xhr.send(null);
} else {
if (window.layoutTestController)
layoutTestController.notifyDone();
if (window.testRunner)
testRunner.notifyDone();
}
}
......
......@@ -7,11 +7,11 @@
}
</style>
<script>
if (window.layoutTestController) {
layoutTestController.waitUntilDone();
if (window.testRunner) {
testRunner.waitUntilDone();
document.onreadystatechange = function() {
if (document.readyState === 'complete')
setTimeout(function() {layoutTestController.notifyDone();}, 100);
setTimeout(function() {testRunner.notifyDone();}, 100);
};
}
</script>
......
......@@ -9,11 +9,11 @@
body { text-rendering: geometricPrecision; }
</style>
<script>
if (window.layoutTestController) {
layoutTestController.waitUntilDone();
if (window.testRunner) {
testRunner.waitUntilDone();
document.onreadystatechange = function() {
if (document.readyState === 'complete')
setTimeout(function() {layoutTestController.notifyDone();}, 100);
setTimeout(function() {testRunner.notifyDone();}, 100);
};
}
</script>
......
<html>
<head>
<script language="javascript" type="text/javascript">
if (window.layoutTestController)
layoutTestController.dumpAsText();
if (window.testRunner)
testRunner.dumpAsText();
function test() {
var realWidth = document.getElementById("courier").offsetWidth;
......
......@@ -11,11 +11,11 @@
<body>
<script>
if (window.layoutTestController) {
layoutTestController.waitUntilDone();
if (window.testRunner) {
testRunner.waitUntilDone();
document.onreadystatechange = function() {
if (document.readyState === 'complete')
setTimeout(function() {layoutTestController.notifyDone();}, 100);
setTimeout(function() {testRunner.notifyDone();}, 100);
};
}
</script>
......
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