diff options
author | Ben Murdoch <benm@google.com> | 2010-07-22 15:37:06 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-07-27 10:20:25 +0100 |
commit | 967717af5423377c967781471ee106e2bb4e11c8 (patch) | |
tree | 1e701dc0a12f7f07cce1df4a7681717de77a211b /LayoutTests/fast | |
parent | dcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff) | |
download | external_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2 |
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'LayoutTests/fast')
-rw-r--r-- | LayoutTests/fast/events/touch/touch-active-state-expected.txt | 9 | ||||
-rw-r--r-- | LayoutTests/fast/events/touch/touch-active-state.html | 48 | ||||
-rw-r--r-- | LayoutTests/fast/js/resources/js-test-pre.js | 23 |
3 files changed, 79 insertions, 1 deletions
diff --git a/LayoutTests/fast/events/touch/touch-active-state-expected.txt b/LayoutTests/fast/events/touch/touch-active-state-expected.txt new file mode 100644 index 0000000..1c9c36f --- /dev/null +++ b/LayoutTests/fast/events/touch/touch-active-state-expected.txt @@ -0,0 +1,9 @@ +Test touches set the active state. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/events/touch/touch-active-state.html b/LayoutTests/fast/events/touch/touch-active-state.html new file mode 100644 index 0000000..8b1fe29 --- /dev/null +++ b/LayoutTests/fast/events/touch/touch-active-state.html @@ -0,0 +1,48 @@ +<html> +<link rel="stylesheet" href="../../js/resources/js-test-style.css"> +<script src="../../js/resources/js-test-pre.js"></script> +<script src="../../js/resources/js-test-post-function.js"></script> +<style type="text/css"> +#box { + background-color:blue; + width:100px; + height:100px; +} + +#box:active { + visibility:hidden; +} + +</style> +<body onload="runTest();"> +<div id="box" ontouchstart="testComplete();">FAIL</div> + +<p id="description"></p> +<div id="console"></div> + +<script type="text/javascript"> +description('Test touches set the active state.'); + +function testComplete(event) +{ + isSuccessfullyParsed(); + layoutTestController.notifyDone(); +} + +function runTest() +{ + if (window.eventSender) { + // Touch the center of the div. + eventSender.addTouchPoint(50, 50); + eventSender.touchStart(); + } else + debug('This test requires DRT.'); +} + +if (window.layoutTestController) + layoutTestController.waitUntilDone(); + +var successfullyParsed = true; +</script> +</body> +</html> diff --git a/LayoutTests/fast/js/resources/js-test-pre.js b/LayoutTests/fast/js/resources/js-test-pre.js index 6647798..93c3cb6 100644 --- a/LayoutTests/fast/js/resources/js-test-pre.js +++ b/LayoutTests/fast/js/resources/js-test-pre.js @@ -1,5 +1,6 @@ +// svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump text + pixel results if (window.layoutTestController) - layoutTestController.dumpAsText(); + layoutTestController.dumpAsText(window.enablePixelTesting); function description(msg) { @@ -218,6 +219,26 @@ function shouldBeUndefined(_a) testFailed(_a + " should be undefined. Was " + _av); } +function shouldBeGreaterThanOrEqual(_a, _b) { + if (typeof _a != "string" || typeof _b != "string") + debug("WARN: shouldBeGreaterThanOrEqual expects string arguments"); + + var exception; + var _av; + try { + _av = eval(_a); + } catch (e) { + exception = e; + } + var _bv = eval(_b); + + if (exception) + testFailed(_a + " should be >= " + _b + ". Threw exception " + exception); + else if (typeof _av == "undefined" || _av < _bv) + testFailed(_a + " should be >= " + _b + ". Was " + _av + " (of type " + typeof _av + ")."); + else + testPassed(_a + " is >= " + _b); +} function shouldThrow(_a, _e) { |