diff options
author | Russell Brenner <russellbrenner@google.com> | 2010-11-18 17:33:13 -0800 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2010-12-02 13:47:21 -0800 |
commit | 6b70adc33054f8aee8c54d0f460458a9df11b8a5 (patch) | |
tree | 103a13998c33944d6ab3b8318c509a037e639460 /LayoutTests | |
parent | bdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa (diff) | |
download | external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.zip external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.gz external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.bz2 |
Merge WebKit at r72274: Initial merge by git.
Change-Id: Ie51f0b4a16da82942bd516dce59cfb79ebbe25fb
Diffstat (limited to 'LayoutTests')
5 files changed, 61 insertions, 4 deletions
diff --git a/LayoutTests/fast/dom/Attr/access-after-element-destruction-expected.txt b/LayoutTests/fast/dom/Attr/access-after-element-destruction-expected.txt index 8c09132..dfbf96e 100644 --- a/LayoutTests/fast/dom/Attr/access-after-element-destruction-expected.txt +++ b/LayoutTests/fast/dom/Attr/access-after-element-destruction-expected.txt @@ -10,14 +10,12 @@ PASS attributes.item(0).name is 'a' PASS attributes.item(0).specified is true PASS attributes.item(0).value is 'b' PASS attributes.item(0).ownerElement.tagName is 'P' -PASS attributes.item(0).style is null PASS attributes.item(0).value is 'c' PASS attributes.length is 0 PASS attr.name is 'a' PASS attr.specified is true PASS attr.value is 'b' PASS attr.ownerElement.tagName is 'P' -PASS attr.style is null PASS attr.value is 'c' PASS successfullyParsed is true diff --git a/LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js b/LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js index 91588a3..b9f4e16 100644 --- a/LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js +++ b/LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js @@ -25,7 +25,6 @@ shouldBe("attributes.item(0).name", "'a'"); shouldBe("attributes.item(0).specified", "true"); shouldBe("attributes.item(0).value", "'b'"); shouldBe("attributes.item(0).ownerElement.tagName", "'P'"); -shouldBe("attributes.item(0).style", "null"); attributes.item(0).value = 'c'; @@ -46,7 +45,6 @@ shouldBe("attr.name", "'a'"); shouldBe("attr.specified", "true"); shouldBe("attr.value", "'b'"); shouldBe("attr.ownerElement.tagName", "'P'"); -shouldBe("attr.style", "null"); attr.value = 'c'; diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/timestamp.js b/LayoutTests/fast/dom/Geolocation/script-tests/timestamp.js new file mode 100644 index 0000000..b51ca43 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/script-tests/timestamp.js @@ -0,0 +1,34 @@ +description("Tests that Geoposition timestamps are well-formed (non-zero and in the same units as Date.getTime)."); + +var mockLatitude = 51.478; +var mockLongitude = -0.166; +var mockAccuracy = 100.0; + +if (window.layoutTestController) { + layoutTestController.setGeolocationPermission(true); + layoutTestController.setMockGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy); +} + +var now = new Date().getTime(); +shouldBeTrue('now != 0'); +var t = null; +var then = null; + +function checkPosition(p) { + t = p.timestamp; + var d = new Date(); + then = d.getTime(); + shouldBeTrue('t != 0'); + shouldBeTrue('then != 0'); + shouldBeTrue('now - 1 <= t'); // Avoid rounding errors + if (now - 1 > t) { + debug(" now - 1 = " + (now-1)); + debug(" t = " + t); + } + shouldBeTrue('t <= then + 1'); // Avoid rounding errors + finishJSTest(); +} + +navigator.geolocation.getCurrentPosition(checkPosition); +window.jsTestIsAsync = true; +window.successfullyParsed = true; diff --git a/LayoutTests/fast/dom/Geolocation/timestamp-expected.txt b/LayoutTests/fast/dom/Geolocation/timestamp-expected.txt new file mode 100644 index 0000000..e4e8c91 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/timestamp-expected.txt @@ -0,0 +1,14 @@ +Tests that Geoposition timestamps are well-formed (non-zero and in the same units as Date.getTime). + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS now != 0 is true +PASS t != 0 is true +PASS then != 0 is true +PASS now - 1 <= t is true +PASS t <= then + 1 is true +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Geolocation/timestamp.html b/LayoutTests/fast/dom/Geolocation/timestamp.html new file mode 100644 index 0000000..ce319a7 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/timestamp.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<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/timestamp.js"></script> +<script src="../../js/resources/js-test-post.js"></script> +</body> +</html> |