diff options
author | Steve Block <steveblock@google.com> | 2010-08-04 11:41:34 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-08-09 12:04:44 +0100 |
commit | db14019a23d96bc8a444b6576a5da8bd1cfbc8b0 (patch) | |
tree | 9f793c5b0f5e1f2aca8247158920e2c4bf962bbf /LayoutTests | |
parent | bf916837aa84f1e4b00e6ed6268516c2acd27545 (diff) | |
download | external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.zip external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.tar.gz external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.tar.bz2 |
Merge WebKit at r64523 : Initial merge by git.
Change-Id: Ibb796c6802e757b1d9b40f58205cfbe4da95fcd4
Diffstat (limited to 'LayoutTests')
3 files changed, 46 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/DeviceOrientation/basic-operation-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/basic-operation-expected.txt new file mode 100644 index 0000000..48dc123 --- /dev/null +++ b/LayoutTests/fast/dom/DeviceOrientation/basic-operation-expected.txt @@ -0,0 +1,12 @@ +Tests the basic operation of DeviceOrientation using the mock. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS deviceOrientationEvent.alpha is mockAlpha +PASS deviceOrientationEvent.beta is mockBeta +PASS deviceOrientationEvent.gamma is mockGamma +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html b/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html new file mode 100644 index 0000000..4bc77ce --- /dev/null +++ b/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html @@ -0,0 +1,12 @@ +<html> +<head> +<link rel="stylesheet" href="../../js/resources/js-test-style.css"> +<script src="../../js/resources/js-test-pre.js"></script> +</head> +<body> +<p id="description"></p> +<div id="console"></div> +<script src="script-tests/basic-operation.js"></script> +<script src="../../js/resources/js-test-post.js"></script> +</body> +</html> diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/basic-operation.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/basic-operation.js new file mode 100644 index 0000000..6e68b06 --- /dev/null +++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/basic-operation.js @@ -0,0 +1,22 @@ +description("Tests the basic operation of DeviceOrientation using the mock."); + +var mockAlpha = 1.1; +var mockBeta = 2.2; +var mockGamma = 3.3; + +if (window.layoutTestController) + layoutTestController.setMockDeviceOrientation(true, mockAlpha, true, mockBeta, true, mockGamma); +else + debug('This test can not be run without the LayoutTestController'); + +var deviceOrientationEvent; +window.addEventListener("deviceorientation", function(e) { + deviceOrientationEvent = e; + shouldBe('deviceOrientationEvent.alpha', 'mockAlpha'); + shouldBe('deviceOrientationEvent.beta', 'mockBeta'); + shouldBe('deviceOrientationEvent.gamma', 'mockGamma'); + finishJSTest(); +}); + +window.jsTestIsAsync = true; +window.successfullyParsed = true; |