From bec39347bb3bb5bf1187ccaf471d26247f28b585 Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Thu, 30 Sep 2010 15:42:16 +0100 Subject: Merge WebKit at r68651 : Initial merge by git. Change-Id: I3d6bff59f17eedd6722723354f386fec9be8ad12 --- .../change-id-via-attr-node-value-expected.txt | 170 ++++++++++++++++ .../dom/Attr/change-id-via-attr-node-value.html | 223 +++++++++++++++++++++ .../dom/DeviceMotion/create-event-expected.txt | 18 +- .../optional-event-properties-expected.txt | 130 +++++++----- .../dom/DeviceMotion/script-tests/create-event.js | 18 +- .../script-tests/optional-event-properties.js | 148 +++++++++----- .../encoding/charset-xuser-defined-expected.txt | 4 +- .../basic-multi-touch-events-limited-expected.txt | 97 +++++++++ .../touch/basic-multi-touch-events-limited.html | 19 ++ .../basic-multi-touch-events-limited.js | 108 ++++++++++ .../touch/script-tests/touch-target-limited.js | 103 ++++++++++ .../events/touch/touch-target-limited-expected.txt | 25 +++ .../fast/events/touch/touch-target-limited.html | 19 ++ LayoutTests/storage/indexeddb/basics-expected.txt | 2 - .../storage/indexeddb/database-basics-expected.txt | 9 +- .../storage/indexeddb/index-basics-expected.txt | 30 --- .../storage/indexeddb/index-cursor-expected.txt | 22 -- .../indexeddb/objectstore-basics-expected.txt | 28 ++- .../storage/indexeddb/objectstore-basics.html | 28 ++- .../indexeddb/objectstore-cursor-expected.txt | 18 -- .../objectstore-removeobjectstore-expected.txt | 24 +-- .../indexeddb/objectstore-removeobjectstore.html | 22 +- .../storage/indexeddb/open-cursor-expected.txt | 10 +- LayoutTests/storage/indexeddb/resources/shared.js | 2 - .../indexeddb/transaction-basics-expected.txt | 5 +- 25 files changed, 1026 insertions(+), 256 deletions(-) create mode 100644 LayoutTests/fast/dom/Attr/change-id-via-attr-node-value-expected.txt create mode 100644 LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html create mode 100644 LayoutTests/fast/events/touch/basic-multi-touch-events-limited-expected.txt create mode 100644 LayoutTests/fast/events/touch/basic-multi-touch-events-limited.html create mode 100644 LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events-limited.js create mode 100644 LayoutTests/fast/events/touch/script-tests/touch-target-limited.js create mode 100644 LayoutTests/fast/events/touch/touch-target-limited-expected.txt create mode 100644 LayoutTests/fast/events/touch/touch-target-limited.html (limited to 'LayoutTests') diff --git a/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value-expected.txt b/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value-expected.txt new file mode 100644 index 0000000..62fb9a8 --- /dev/null +++ b/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value-expected.txt @@ -0,0 +1,170 @@ +Test that different ways of changing an element's id all work properly. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + + +1. Check id after parsing. +PASS document.getElementById("a") is document.body +PASS document.body.id is "a" +PASS document.body.getAttributeNode("id").isId is true +PASS document.body.getAttributeNode("id").textContent is "a" + +2. Change Attr.value. +PASS document.getElementById("a") is null +PASS document.getElementById("b") is document.body +PASS document.body.getAttributeNode("id").textContent is "b" + +3. Change HTMLElement.id. +PASS document.getElementById("b") is null +PASS document.getElementById("c") is document.body +PASS document.body.getAttributeNode("id").textContent is "c" + +4. Change id attribute via setAttribute(). +PASS document.getElementById("c") is null +PASS document.getElementById("d") is document.body +PASS document.body.getAttributeNode("id").textContent is "d" + +5. Change id attribute via setAttributeNS(). +PASS document.getElementById("d") is null +PASS document.getElementById("e") is document.body +PASS document.body.getAttributeNode("id").textContent is "e" + +6. Change Attr.nodeValue. +PASS document.getElementById("e") is null +PASS document.getElementById("f") is document.body +PASS document.body.id is "f" +PASS document.body.getAttribute("id") is "f" +PASS attrNode.textContent is "f" +PASS attrNode.childNodes.length is 1 + +7. Attr.replaceChild(). +PASS document.getElementById("f") is null +PASS document.getElementById("g") is document.body +PASS document.body.id is "g" +PASS document.body.getAttribute("id") is "g" +PASS attrNode.textContent is "g" +PASS attrNode.childNodes.length is 1 + +8. Attr.insertBefore(). +PASS document.getElementById("g") is null +PASS document.getElementById("0g") is document.body +PASS document.body.id is "0g" +PASS document.body.getAttribute("id") is "0g" +PASS attrNode.textContent is "0g" +PASS attrNode.childNodes.length is 2 + +9. attr.appendChild(). +PASS document.getElementById("0g") is null +PASS document.getElementById("0g2") is document.body +PASS document.body.id is "0g2" +PASS document.body.getAttribute("id") is "0g2" +PASS attrNode.textContent is "0g2" +PASS attrNode.childNodes.length is 3 + +10. Attr.removeChild() +PASS document.body.getAttributeNode("id").childNodes.length is 0 +PASS document.getElementById("h") is null +PASS document.getElementById("") is null +PASS document.body.id is "" +PASS document.body.getAttribute("id") is "" +PASS document.body.getAttributeNode("id").textContent is "" + +11. Changing Text.nodeValue. +PASS attrNode.firstChild.nodeValue is "i" +PASS document.getElementById("i") is document.body +PASS document.body.id is "i" +PASS document.body.getAttribute("id") is "i" +PASS attrNode.textContent is "i" +PASS attrNode.childNodes.length is 1 + +12. Chnaging Attr.textContent. +PASS document.getElementById("i") is null +PASS document.getElementById("hi") is document.body +PASS document.body.id is "hi" +PASS document.body.getAttribute("id") is "hi" +PASS attrNode.textContent is "hi" +PASS attrNode.childNodes.length is 1 + +13. Text.splitText(). +PASS document.getElementById("hi") is document.body +PASS document.body.id is "hi" +PASS document.body.getAttribute("id") is "hi" +PASS document.body.getAttributeNode("id").textContent is "hi" +PASS document.body.getAttributeNode("id").childNodes.length is 2 + +14. Node.normalize(), joining text nodes. +PASS document.getElementById("hi") is document.body +PASS document.body.id is "hi" +PASS document.body.getAttribute("id") is "hi" +PASS document.body.getAttributeNode("id").textContent is "hi" +PASS document.body.getAttributeNode("id").childNodes.length is 1 + +15. Changing Attr.nodeValue. +PASS document.getElementById("hi") is null +PASS document.getElementById("j") is document.body +PASS document.body.id is "j" +PASS document.body.getAttribute("id") is "j" +PASS attrNode.textContent is "j" +PASS attrNode.childNodes.length is 1 + +16. Changing Text.data. +PASS document.getElementById("j") is null +PASS document.getElementById("k") is document.body +PASS document.body.id is "k" +PASS document.body.getAttribute("id") is "k" +PASS attrNode.textContent is "k" +PASS attrNode.childNodes.length is 1 + +17. Changing text child with appendData(). +PASS document.getElementById("k") is null +PASS document.getElementById("kl") is document.body +PASS document.body.id is "kl" +PASS document.body.getAttribute("id") is "kl" +PASS attrNode.textContent is "kl" +PASS attrNode.childNodes.length is 1 + +18. Changing text child with insertData(). +PASS document.getElementById("kl") is null +PASS document.getElementById("k1l") is document.body +PASS document.body.id is "k1l" +PASS document.body.getAttribute("id") is "k1l" +PASS attrNode.textContent is "k1l" +PASS attrNode.childNodes.length is 1 + +19. Changing text child with deleteData(). +PASS document.getElementById("k1l") is null +PASS document.getElementById("l") is document.body +PASS document.body.id is "l" +PASS document.body.getAttribute("id") is "l" +PASS attrNode.textContent is "l" +PASS attrNode.childNodes.length is 1 + +20. Changing text child with replaceData(). +PASS document.getElementById("l") is null +PASS document.getElementById("mn") is document.body +PASS document.body.id is "mn" +PASS document.body.getAttribute("id") is "mn" +PASS attrNode.textContent is "mn" +PASS attrNode.childNodes.length is 1 + +21. Remove an Attr node. +PASS document.body.id is "" +PASS document.getElementById("mn") is null +PASS document.body.getAttribute("id") is null +PASS document.body.getAttributeNode("id") is null + +22. Add an Attr node. +PASS document.getElementById("o") is document.body +PASS document.body.id is "o" +PASS document.body.getAttribute("id") is "o" + +23. Add an Attr node over an existing one. +PASS document.getElementById("o") is null +PASS document.getElementById("p") is document.body +PASS document.body.id is "p" +PASS document.body.getAttribute("id") is "p" +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html b/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html new file mode 100644 index 0000000..c4e97bd --- /dev/null +++ b/LayoutTests/fast/dom/Attr/change-id-via-attr-node-value.html @@ -0,0 +1,223 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/DeviceMotion/create-event-expected.txt b/LayoutTests/fast/dom/DeviceMotion/create-event-expected.txt index fdc40c4..f890861 100644 --- a/LayoutTests/fast/dom/DeviceMotion/create-event-expected.txt +++ b/LayoutTests/fast/dom/DeviceMotion/create-event-expected.txt @@ -7,22 +7,16 @@ PASS typeof event == 'object' is true PASS 'type' in event is true PASS 'bubbles' in event is true PASS 'cancelable' in event is true -PASS 'xAcceleration' in event is true -PASS 'yAcceleration' in event is true -PASS 'zAcceleration' in event is true -PASS 'xRotationRate' in event is true -PASS 'yRotationRate' in event is true -PASS 'zRotationRate' in event is true +PASS 'acceleration' in event is true +PASS 'accelerationIncludingGravity' in event is true +PASS 'rotationRate' in event is true PASS 'interval' in event is true PASS typeof event.type == 'string' is true PASS typeof event.bubbles == 'boolean' is true PASS typeof event.cancelable == 'boolean' is true -PASS typeof event.xAcceleration == 'object' is true -PASS typeof event.yAcceleration == 'object' is true -PASS typeof event.zAcceleration == 'object' is true -PASS typeof event.xRotationRate == 'object' is true -PASS typeof event.yRotationRate == 'object' is true -PASS typeof event.zRotationRate == 'object' is true +PASS typeof event.acceleration == 'object' is true +PASS typeof event.accelerationIncludingGravity == 'object' is true +PASS typeof event.rotationRate == 'object' is true PASS typeof event.interval == 'object' is true PASS successfullyParsed is true diff --git a/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt b/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt index 0eabe35..c2230b2 100644 --- a/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt +++ b/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt @@ -4,60 +4,94 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE event = document.createEvent('DeviceMotionEvent') -PASS event.xAcceleration == null is true -PASS event.yAcceleration == null is true -PASS event.zAcceleration == null is true -PASS event.xRotationRate == null is true -PASS event.yRotationRate == null is true -PASS event.zRotationRate == null is true +PASS event.acceleration == null is true +PASS event.accelerationIncludingGravity == null is true +PASS event.rotationRate == null is true PASS event.interval == null is true -event.initDeviceMotionEvent('', false, false, 0, 1, 2, 3, 4, 5, 6) -PASS event.xAcceleration == 0 is true -PASS event.yAcceleration == 1 is true -PASS event.zAcceleration == 2 is true -PASS event.xRotationRate == 3 is true -PASS event.yRotationRate == 4 is true -PASS event.zRotationRate == 5 is true -PASS event.interval == 6 is true +event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9) +PASS event.acceleration.x == 0 is true +PASS event.acceleration.y == 1 is true +PASS event.acceleration.z == 2 is true +PASS event.accelerationIncludingGravity.x == 3 is true +PASS event.accelerationIncludingGravity.y == 4 is true +PASS event.accelerationIncludingGravity.z == 5 is true +PASS event.rotationRate.alpha == 6 is true +PASS event.rotationRate.beta == 7 is true +PASS event.rotationRate.gamma == 8 is true +PASS event.interval == 9 is true +PASS event.initDeviceMotionEvent('', false, false, objectThrowingException, {x: 3, z: 5}, {gamma: 8, beta: 7}, 9) threw exception Error: x getter exception. +PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, objectThrowingException, {gamma: 8, beta: 7}, 9) threw exception Error: x getter exception. +PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, z: 5}, objectThrowingException, 9) threw exception Error: alpha getter exception. +PASS event.initDeviceMotionEvent('', false, false, {x: objectThrowingException, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9) threw exception Error: valueOf threw exception. +PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: objectThrowingException, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9) threw exception Error: valueOf threw exception. +PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: objectThrowingException}, 9) threw exception Error: valueOf threw exception. +event.initDeviceMotionEvent('', false, false, {y: 1, x: 0}, {x: 3, z: 5}, {gamma: 8, beta: 7}, 9) +PASS event.acceleration.x == 0 is true +PASS event.acceleration.y == 1 is true +PASS event.acceleration.z == null is true +PASS event.accelerationIncludingGravity.x == 3 is true +PASS event.accelerationIncludingGravity.y == null is true +PASS event.accelerationIncludingGravity.z == 5 is true +PASS event.rotationRate.alpha == null is true +PASS event.rotationRate.beta == 7 is true +PASS event.rotationRate.gamma == 8 is true +PASS event.interval == 9 is true event.initDeviceMotionEvent() -PASS event.xAcceleration == null is true -PASS event.yAcceleration == null is true -PASS event.zAcceleration == null is true -PASS event.xRotationRate == null is true -PASS event.yRotationRate == null is true -PASS event.zRotationRate == null is true +PASS event.acceleration == null is true +PASS event.accelerationIncludingGravity == null is true +PASS event.rotationRate == null is true PASS event.interval == null is true -event.initDeviceMotionEvent('', false, false, [], [], [], [], [], [], []) -PASS event.xAcceleration == 0 is true -PASS event.yAcceleration == 0 is true -PASS event.zAcceleration == 0 is true -PASS event.xRotationRate == 0 is true -PASS event.yRotationRate == 0 is true -PASS event.zRotationRate == 0 is true +event.initDeviceMotionEvent('', false, false, [], [], [], []) +PASS event.acceleration == null is true +PASS event.accelerationIncludingGravity == null is true +PASS event.rotationRate == null is true PASS event.interval == 0 is true -event.initDeviceMotionEvent('', false, false, undefined, undefined, undefined, undefined, undefined, undefined, undefined) -PASS event.xAcceleration == null is true -PASS event.yAcceleration == null is true -PASS event.zAcceleration == null is true -PASS event.xRotationRate == null is true -PASS event.yRotationRate == null is true -PASS event.zRotationRate == null is true +event.initDeviceMotionEvent('', false, false, undefined, undefined, undefined, undefined) +PASS event.acceleration == null is true +PASS event.accelerationIncludingGravity == null is true +PASS event.rotationRate == null is true PASS event.interval == null is true -event.initDeviceMotionEvent('', false, false, '', '', '', '', '', '', '') -PASS event.xAcceleration == 0 is true -PASS event.yAcceleration == 0 is true -PASS event.zAcceleration == 0 is true -PASS event.xRotationRate == 0 is true -PASS event.yRotationRate == 0 is true -PASS event.zRotationRate == 0 is true +event.initDeviceMotionEvent('', false, false, '', '', '', '') +PASS event.acceleration == null is true +PASS event.accelerationIncludingGravity == null is true +PASS event.rotationRate == null is true PASS event.interval == 0 is true -event.initDeviceMotionEvent('', false, false, null, null, null, null, null, null, null) -PASS event.xAcceleration == null is true -PASS event.yAcceleration == null is true -PASS event.zAcceleration == null is true -PASS event.xRotationRate == null is true -PASS event.yRotationRate == null is true -PASS event.zRotationRate == null is true +event.initDeviceMotionEvent('', false, false, null, null, null, null) +PASS event.acceleration == null is true +PASS event.accelerationIncludingGravity == null is true +PASS event.rotationRate == null is true +PASS event.interval == null is true +event.initDeviceMotionEvent('', false, false, {x: null, y: null, z: null}, {x: null, y: null, z: null}, {alpha: null, beta: null, gamma: null}, null) +PASS event.acceleration == null is true +PASS event.accelerationIncludingGravity == null is true +PASS event.rotationRate == null is true +PASS event.interval == null is true +event.initDeviceMotionEvent('', false, false, {x: null, y: null, z: 1}, {x: null, y: null, z: 2}, {alpha: null, beta: null, gamma: 3}, null) +PASS event.acceleration.x == null is true +PASS event.acceleration.y == null is true +PASS event.acceleration.z == 1 is true +PASS event.accelerationIncludingGravity.x == null is true +PASS event.accelerationIncludingGravity.y == null is true +PASS event.accelerationIncludingGravity.z == 2 is true +PASS event.rotationRate.alpha == null is true +PASS event.rotationRate.beta == null is true +PASS event.rotationRate.gamma == 3 is true +PASS event.interval == null is true +event.initDeviceMotionEvent('', false, false, {x: undefined, y: undefined, z: undefined}, {x: undefined, y: undefined, z: undefined}, {alpha: undefined, beta: undefined, gamma: undefined}, undefined) +PASS event.acceleration == null is true +PASS event.accelerationIncludingGravity == null is true +PASS event.rotationRate == null is true +PASS event.interval == null is true +event.initDeviceMotionEvent('', false, false, {x: undefined, y: undefined, z: 1}, {x: undefined, y: undefined, z: 2}, {alpha: undefined, beta: undefined, gamma: 3}, undefined) +PASS event.acceleration.x == null is true +PASS event.acceleration.y == null is true +PASS event.acceleration.z == 1 is true +PASS event.accelerationIncludingGravity.x == null is true +PASS event.accelerationIncludingGravity.y == null is true +PASS event.accelerationIncludingGravity.z == 2 is true +PASS event.rotationRate.alpha == null is true +PASS event.rotationRate.beta == null is true +PASS event.rotationRate.gamma == 3 is true PASS event.interval == null is true PASS successfullyParsed is true diff --git a/LayoutTests/fast/dom/DeviceMotion/script-tests/create-event.js b/LayoutTests/fast/dom/DeviceMotion/script-tests/create-event.js index 167329d..8b5aec8 100644 --- a/LayoutTests/fast/dom/DeviceMotion/script-tests/create-event.js +++ b/LayoutTests/fast/dom/DeviceMotion/script-tests/create-event.js @@ -7,23 +7,17 @@ shouldBeTrue("typeof event == 'object'"); shouldBeTrue("'type' in event"); shouldBeTrue("'bubbles' in event"); shouldBeTrue("'cancelable' in event"); -shouldBeTrue("'xAcceleration' in event"); -shouldBeTrue("'yAcceleration' in event"); -shouldBeTrue("'zAcceleration' in event"); -shouldBeTrue("'xRotationRate' in event"); -shouldBeTrue("'yRotationRate' in event"); -shouldBeTrue("'zRotationRate' in event"); +shouldBeTrue("'acceleration' in event"); +shouldBeTrue("'accelerationIncludingGravity' in event"); +shouldBeTrue("'rotationRate' in event"); shouldBeTrue("'interval' in event"); shouldBeTrue("typeof event.type == 'string'"); shouldBeTrue("typeof event.bubbles == 'boolean'"); shouldBeTrue("typeof event.cancelable == 'boolean'"); -shouldBeTrue("typeof event.xAcceleration == 'object'"); -shouldBeTrue("typeof event.yAcceleration == 'object'"); -shouldBeTrue("typeof event.zAcceleration == 'object'"); -shouldBeTrue("typeof event.xRotationRate == 'object'"); -shouldBeTrue("typeof event.yRotationRate == 'object'"); -shouldBeTrue("typeof event.zRotationRate == 'object'"); +shouldBeTrue("typeof event.acceleration == 'object'"); +shouldBeTrue("typeof event.accelerationIncludingGravity == 'object'"); +shouldBeTrue("typeof event.rotationRate == 'object'"); shouldBeTrue("typeof event.interval == 'object'"); window.successfullyParsed = true; diff --git a/LayoutTests/fast/dom/DeviceMotion/script-tests/optional-event-properties.js b/LayoutTests/fast/dom/DeviceMotion/script-tests/optional-event-properties.js index ab9b53b..5f5c88a 100644 --- a/LayoutTests/fast/dom/DeviceMotion/script-tests/optional-event-properties.js +++ b/LayoutTests/fast/dom/DeviceMotion/script-tests/optional-event-properties.js @@ -1,68 +1,120 @@ description("Tests the optional properties of DeviceMotionEvent. Each property should be null if not set, or set to null or undefined."); +function ObjectThrowingException() {}; +ObjectThrowingException.prototype.valueOf = function() { throw new Error('valueOf threw exception'); } +ObjectThrowingException.prototype.__defineGetter__("x", function() { throw new Error('x getter exception'); }); +ObjectThrowingException.prototype.__defineGetter__("alpha", function() { throw new Error('alpha getter exception'); }); +var objectThrowingException = new ObjectThrowingException(); + +function testException(expression, expectedException) +{ + shouldThrow(expression, '(function() { return "' + expectedException + '"; })();'); +} + var event; evalAndLog("event = document.createEvent('DeviceMotionEvent')"); -shouldBeTrue("event.xAcceleration == null"); -shouldBeTrue("event.yAcceleration == null"); -shouldBeTrue("event.zAcceleration == null"); -shouldBeTrue("event.xRotationRate == null"); -shouldBeTrue("event.yRotationRate == null"); -shouldBeTrue("event.zRotationRate == null"); +shouldBeTrue("event.acceleration == null"); +shouldBeTrue("event.accelerationIncludingGravity == null"); +shouldBeTrue("event.rotationRate == null"); shouldBeTrue("event.interval == null"); -evalAndLog("event.initDeviceMotionEvent('', false, false, 0, 1, 2, 3, 4, 5, 6)"); -shouldBeTrue("event.xAcceleration == 0"); -shouldBeTrue("event.yAcceleration == 1"); -shouldBeTrue("event.zAcceleration == 2"); -shouldBeTrue("event.xRotationRate == 3"); -shouldBeTrue("event.yRotationRate == 4"); -shouldBeTrue("event.zRotationRate == 5"); -shouldBeTrue("event.interval == 6"); +evalAndLog("event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9)"); +shouldBeTrue("event.acceleration.x == 0"); +shouldBeTrue("event.acceleration.y == 1"); +shouldBeTrue("event.acceleration.z == 2"); +shouldBeTrue("event.accelerationIncludingGravity.x == 3"); +shouldBeTrue("event.accelerationIncludingGravity.y == 4"); +shouldBeTrue("event.accelerationIncludingGravity.z == 5"); +shouldBeTrue("event.rotationRate.alpha == 6"); +shouldBeTrue("event.rotationRate.beta == 7"); +shouldBeTrue("event.rotationRate.gamma == 8"); +shouldBeTrue("event.interval == 9"); + +testException("event.initDeviceMotionEvent('', false, false, objectThrowingException, {x: 3, z: 5}, {gamma: 8, beta: 7}, 9)", "Error: x getter exception"); +testException("event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, objectThrowingException, {gamma: 8, beta: 7}, 9)", "Error: x getter exception"); +testException("event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, z: 5}, objectThrowingException, 9)", "Error: alpha getter exception"); + +testException("event.initDeviceMotionEvent('', false, false, {x: objectThrowingException, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9)", "Error: valueOf threw exception"); +testException("event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: objectThrowingException, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9)", "Error: valueOf threw exception"); +testException("event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: objectThrowingException}, 9)", "Error: valueOf threw exception"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, {y: 1, x: 0}, {x: 3, z: 5}, {gamma: 8, beta: 7}, 9)"); +shouldBeTrue("event.acceleration.x == 0"); +shouldBeTrue("event.acceleration.y == 1"); +shouldBeTrue("event.acceleration.z == null"); +shouldBeTrue("event.accelerationIncludingGravity.x == 3"); +shouldBeTrue("event.accelerationIncludingGravity.y == null"); +shouldBeTrue("event.accelerationIncludingGravity.z == 5"); +shouldBeTrue("event.rotationRate.alpha == null"); +shouldBeTrue("event.rotationRate.beta == 7"); +shouldBeTrue("event.rotationRate.gamma == 8"); +shouldBeTrue("event.interval == 9"); evalAndLog("event.initDeviceMotionEvent()"); -shouldBeTrue("event.xAcceleration == null"); -shouldBeTrue("event.yAcceleration == null"); -shouldBeTrue("event.zAcceleration == null"); -shouldBeTrue("event.xRotationRate == null"); -shouldBeTrue("event.yRotationRate == null"); -shouldBeTrue("event.zRotationRate == null"); +shouldBeTrue("event.acceleration == null"); +shouldBeTrue("event.accelerationIncludingGravity == null"); +shouldBeTrue("event.rotationRate == null"); shouldBeTrue("event.interval == null"); -evalAndLog("event.initDeviceMotionEvent('', false, false, [], [], [], [], [], [], [])"); -shouldBeTrue("event.xAcceleration == 0"); -shouldBeTrue("event.yAcceleration == 0"); -shouldBeTrue("event.zAcceleration == 0"); -shouldBeTrue("event.xRotationRate == 0"); -shouldBeTrue("event.yRotationRate == 0"); -shouldBeTrue("event.zRotationRate == 0"); +evalAndLog("event.initDeviceMotionEvent('', false, false, [], [], [], [])"); +shouldBeTrue("event.acceleration == null"); +shouldBeTrue("event.accelerationIncludingGravity == null"); +shouldBeTrue("event.rotationRate == null"); shouldBeTrue("event.interval == 0"); -evalAndLog("event.initDeviceMotionEvent('', false, false, undefined, undefined, undefined, undefined, undefined, undefined, undefined)"); -shouldBeTrue("event.xAcceleration == null"); -shouldBeTrue("event.yAcceleration == null"); -shouldBeTrue("event.zAcceleration == null"); -shouldBeTrue("event.xRotationRate == null"); -shouldBeTrue("event.yRotationRate == null"); -shouldBeTrue("event.zRotationRate == null"); +evalAndLog("event.initDeviceMotionEvent('', false, false, undefined, undefined, undefined, undefined)"); +shouldBeTrue("event.acceleration == null"); +shouldBeTrue("event.accelerationIncludingGravity == null"); +shouldBeTrue("event.rotationRate == null"); shouldBeTrue("event.interval == null"); -evalAndLog("event.initDeviceMotionEvent('', false, false, '', '', '', '', '', '', '')"); -shouldBeTrue("event.xAcceleration == 0"); -shouldBeTrue("event.yAcceleration == 0"); -shouldBeTrue("event.zAcceleration == 0"); -shouldBeTrue("event.xRotationRate == 0"); -shouldBeTrue("event.yRotationRate == 0"); -shouldBeTrue("event.zRotationRate == 0"); +evalAndLog("event.initDeviceMotionEvent('', false, false, '', '', '', '')"); +shouldBeTrue("event.acceleration == null"); +shouldBeTrue("event.accelerationIncludingGravity == null"); +shouldBeTrue("event.rotationRate == null"); shouldBeTrue("event.interval == 0"); -evalAndLog("event.initDeviceMotionEvent('', false, false, null, null, null, null, null, null, null)"); -shouldBeTrue("event.xAcceleration == null"); -shouldBeTrue("event.yAcceleration == null"); -shouldBeTrue("event.zAcceleration == null"); -shouldBeTrue("event.xRotationRate == null"); -shouldBeTrue("event.yRotationRate == null"); -shouldBeTrue("event.zRotationRate == null"); +evalAndLog("event.initDeviceMotionEvent('', false, false, null, null, null, null)"); +shouldBeTrue("event.acceleration == null"); +shouldBeTrue("event.accelerationIncludingGravity == null"); +shouldBeTrue("event.rotationRate == null"); +shouldBeTrue("event.interval == null"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, {x: null, y: null, z: null}, {x: null, y: null, z: null}, {alpha: null, beta: null, gamma: null}, null)"); +shouldBeTrue("event.acceleration == null"); +shouldBeTrue("event.accelerationIncludingGravity == null"); +shouldBeTrue("event.rotationRate == null"); +shouldBeTrue("event.interval == null"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, {x: null, y: null, z: 1}, {x: null, y: null, z: 2}, {alpha: null, beta: null, gamma: 3}, null)"); +shouldBeTrue("event.acceleration.x == null"); +shouldBeTrue("event.acceleration.y == null"); +shouldBeTrue("event.acceleration.z == 1"); +shouldBeTrue("event.accelerationIncludingGravity.x == null"); +shouldBeTrue("event.accelerationIncludingGravity.y == null"); +shouldBeTrue("event.accelerationIncludingGravity.z == 2"); +shouldBeTrue("event.rotationRate.alpha == null"); +shouldBeTrue("event.rotationRate.beta == null"); +shouldBeTrue("event.rotationRate.gamma == 3"); +shouldBeTrue("event.interval == null"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, {x: undefined, y: undefined, z: undefined}, {x: undefined, y: undefined, z: undefined}, {alpha: undefined, beta: undefined, gamma: undefined}, undefined)"); +shouldBeTrue("event.acceleration == null"); +shouldBeTrue("event.accelerationIncludingGravity == null"); +shouldBeTrue("event.rotationRate == null"); +shouldBeTrue("event.interval == null"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, {x: undefined, y: undefined, z: 1}, {x: undefined, y: undefined, z: 2}, {alpha: undefined, beta: undefined, gamma: 3}, undefined)"); +shouldBeTrue("event.acceleration.x == null"); +shouldBeTrue("event.acceleration.y == null"); +shouldBeTrue("event.acceleration.z == 1"); +shouldBeTrue("event.accelerationIncludingGravity.x == null"); +shouldBeTrue("event.accelerationIncludingGravity.y == null"); +shouldBeTrue("event.accelerationIncludingGravity.z == 2"); +shouldBeTrue("event.rotationRate.alpha == null"); +shouldBeTrue("event.rotationRate.beta == null"); +shouldBeTrue("event.rotationRate.gamma == 3"); shouldBeTrue("event.interval == null"); window.successfullyParsed = true; diff --git a/LayoutTests/fast/encoding/charset-xuser-defined-expected.txt b/LayoutTests/fast/encoding/charset-xuser-defined-expected.txt index b5ff20b..709fe62 100644 --- a/LayoutTests/fast/encoding/charset-xuser-defined-expected.txt +++ b/LayoutTests/fast/encoding/charset-xuser-defined-expected.txt @@ -1,4 +1,4 @@ Test bugzilla bug 18270 (Interpreting x-user-defined as windows-1252 when declared in meta tag). Two lines below should be identical. -€ ‚ƒ„…†‡ˆ‰Š‹Œ Ž ‘’“”•–—˜™š›œ žŸ ¡¢£¤¥¦§¨©ª«¬ ®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ -€ ‚ƒ„…†‡ˆ‰Š‹Œ Ž ‘’“”•–—˜™š›œ žŸ ¡¢£¤¥¦§¨©ª«¬ ®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ +€ ‚ƒ„…†‡ˆ‰Š‹Œ Ž ‘’“”•–—˜™š›œ žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ +€ ‚ƒ„…†‡ˆ‰Š‹Œ Ž ‘’“”•–—˜™š›œ žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ diff --git a/LayoutTests/fast/events/touch/basic-multi-touch-events-limited-expected.txt b/LayoutTests/fast/events/touch/basic-multi-touch-events-limited-expected.txt new file mode 100644 index 0000000..1e603fb --- /dev/null +++ b/LayoutTests/fast/events/touch/basic-multi-touch-events-limited-expected.txt @@ -0,0 +1,97 @@ +This tests basic multi touch event support. This is a limited version of test basic-multi-touch-events.html that avoids the situation where one touch point is released while another is maintained. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS lastEvent.type is "touchstart" +PASS lastEvent.touches.length is 2 +PASS lastEvent.changedTouches.length is 2 +PASS lastEvent.targetTouches.length is 2 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 +PASS lastEvent.touches[0].pageX is 10 +PASS lastEvent.touches[0].pageY is 10 +PASS lastEvent.touches[0].clientX is 10 +PASS lastEvent.touches[0].clientY is 10 +PASS lastEvent.touches[0].identifier is 0 +PASS lastEvent.touches[1].pageX is 20 +PASS lastEvent.touches[1].pageY is 30 +PASS lastEvent.touches[1].clientX is 20 +PASS lastEvent.touches[1].clientY is 30 +PASS lastEvent.touches[1].identifier is 1 +PASS lastEvent.changedTouches[0].pageX is 10 +PASS lastEvent.changedTouches[0].pageY is 10 +PASS lastEvent.changedTouches[0].clientX is 10 +PASS lastEvent.changedTouches[0].clientY is 10 +PASS lastEvent.changedTouches[0].identifier is 0 +PASS lastEvent.changedTouches[1].pageX is 20 +PASS lastEvent.changedTouches[1].pageY is 30 +PASS lastEvent.changedTouches[1].clientX is 20 +PASS lastEvent.changedTouches[1].clientY is 30 +PASS lastEvent.changedTouches[1].identifier is 1 +PASS lastEvent.targetTouches[0].pageX is 10 +PASS lastEvent.targetTouches[0].pageY is 10 +PASS lastEvent.targetTouches[0].clientX is 10 +PASS lastEvent.targetTouches[0].clientY is 10 +PASS lastEvent.targetTouches[0].identifier is 0 +PASS lastEvent.targetTouches[1].pageX is 20 +PASS lastEvent.targetTouches[1].pageY is 30 +PASS lastEvent.targetTouches[1].clientX is 20 +PASS lastEvent.targetTouches[1].clientY is 30 +PASS lastEvent.targetTouches[1].identifier is 1 +PASS lastEvent.type is "touchmove" +PASS lastEvent.touches.length is 2 +PASS lastEvent.changedTouches.length is 2 +PASS lastEvent.targetTouches.length is 2 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 +PASS lastEvent.touches[0].pageX is 15 +PASS lastEvent.touches[0].pageY is 15 +PASS lastEvent.touches[0].clientX is 15 +PASS lastEvent.touches[0].clientY is 15 +PASS lastEvent.touches[0].identifier is 0 +PASS lastEvent.touches[1].pageX is 25 +PASS lastEvent.touches[1].pageY is 35 +PASS lastEvent.touches[1].clientX is 25 +PASS lastEvent.touches[1].clientY is 35 +PASS lastEvent.touches[1].identifier is 1 +PASS lastEvent.changedTouches[0].pageX is 15 +PASS lastEvent.changedTouches[0].pageY is 15 +PASS lastEvent.changedTouches[0].clientX is 15 +PASS lastEvent.changedTouches[0].clientY is 15 +PASS lastEvent.changedTouches[0].identifier is 0 +PASS lastEvent.changedTouches[1].pageX is 25 +PASS lastEvent.changedTouches[1].pageY is 35 +PASS lastEvent.changedTouches[1].clientX is 25 +PASS lastEvent.changedTouches[1].clientY is 35 +PASS lastEvent.changedTouches[1].identifier is 1 +PASS lastEvent.targetTouches[0].pageX is 15 +PASS lastEvent.targetTouches[0].pageY is 15 +PASS lastEvent.targetTouches[0].clientX is 15 +PASS lastEvent.targetTouches[0].clientY is 15 +PASS lastEvent.targetTouches[0].identifier is 0 +PASS lastEvent.targetTouches[1].pageX is 25 +PASS lastEvent.targetTouches[1].pageY is 35 +PASS lastEvent.targetTouches[1].clientX is 25 +PASS lastEvent.targetTouches[1].clientY is 35 +PASS lastEvent.targetTouches[1].identifier is 1 +PASS lastEvent.type is "touchend" +PASS lastEvent.touches.length is 0 +PASS lastEvent.changedTouches.length is 2 +PASS lastEvent.targetTouches.length is 0 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 +PASS lastEvent.changedTouches[0].pageX is 15 +PASS lastEvent.changedTouches[0].pageY is 15 +PASS lastEvent.changedTouches[0].clientX is 15 +PASS lastEvent.changedTouches[0].clientY is 15 +PASS lastEvent.changedTouches[0].identifier is 0 +PASS lastEvent.changedTouches[1].pageX is 25 +PASS lastEvent.changedTouches[1].pageY is 35 +PASS lastEvent.changedTouches[1].clientX is 25 +PASS lastEvent.changedTouches[1].clientY is 35 +PASS lastEvent.changedTouches[1].identifier is 1 +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/events/touch/basic-multi-touch-events-limited.html b/LayoutTests/fast/events/touch/basic-multi-touch-events-limited.html new file mode 100644 index 0000000..7ba39a8 --- /dev/null +++ b/LayoutTests/fast/events/touch/basic-multi-touch-events-limited.html @@ -0,0 +1,19 @@ + + + + + + + + + +

+
+ + + diff --git a/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events-limited.js b/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events-limited.js new file mode 100644 index 0000000..c807ae5 --- /dev/null +++ b/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events-limited.js @@ -0,0 +1,108 @@ +var div = document.createElement("div"); +div.id = "touchtarget"; +div.style.width = "100px"; +div.style.height = "100px"; +div.style.backgroundColor = "blue"; + +var lastEvent = null; +var touchEventsReceived = 0; +var EXPECTED_TOUCH_EVENTS_TOTAL = 3; + +function touchEventCallback() { + if (window.eventSender) { + lastEvent = event; + verifyTouch(touchEventsReceived++); + } else { + debug(event.type); + } + + if (window.layoutTestController && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) { + // If we've got here, we can safely say we were successfully parsed :) We need to + // call the isSucccessfullyParsed function to output the correct TEST COMPLETE + // footer message. + successfullyParsed = true; + isSuccessfullyParsed(); + layoutTestController.notifyDone(); + } +} + +div.addEventListener("touchstart", touchEventCallback, false); +div.addEventListener("touchmove", touchEventCallback, false); +div.addEventListener("touchend", touchEventCallback, false); +document.body.insertBefore(div, document.body.firstChild); + +function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount) +{ + shouldBeEqualToString("lastEvent.type", type); + shouldBe("lastEvent.touches.length", totalTouchCount.toString()); + shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString()); + shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString()); + shouldBe("lastEvent.pageX", "0"); + shouldBe("lastEvent.pageY", "0"); +} + +function verifyTouchPoint(list, point, x, y, id) +{ + shouldBe("lastEvent." + list + "[" + point + "].pageX", x.toString()); + shouldBe("lastEvent." + list + "[" + point + "].pageY", y.toString()); + shouldBe("lastEvent." + list + "[" + point + "].clientX", x.toString()); + shouldBe("lastEvent." + list + "[" + point + "].clientY", y.toString()); + shouldBe("lastEvent." + list + "[" + point + "].identifier", id.toString()); +} + +function verifyTouch(which) { + switch (which) { + case 0: + verifyTouchEvent("touchstart", 2, 2, 2); + verifyTouchPoint("touches", 0, 10, 10, 0); + verifyTouchPoint("touches", 1, 20, 30, 1); + verifyTouchPoint("changedTouches", 0, 10, 10, 0); + verifyTouchPoint("changedTouches", 1, 20, 30, 1); + verifyTouchPoint("targetTouches", 0, 10, 10, 0); + verifyTouchPoint("targetTouches", 1, 20, 30, 1); + break; + case 1: + verifyTouchEvent("touchmove", 2, 2, 2); + verifyTouchPoint("touches", 0, 15, 15, 0); + verifyTouchPoint("touches", 1, 25, 35, 1); + verifyTouchPoint("changedTouches", 0, 15, 15, 0); + verifyTouchPoint("changedTouches", 1, 25, 35, 1); + verifyTouchPoint("targetTouches", 0, 15, 15, 0); + verifyTouchPoint("targetTouches", 1, 25, 35, 1); + break; + case 2: + verifyTouchEvent("touchend", 0, 2, 0); + verifyTouchPoint("changedTouches", 0, 15, 15, 0); + verifyTouchPoint("changedTouches", 1, 25, 35, 1); + break; + + default: testFailed("Wrong number of touch events! (" + which + ")"); + } +} + +function multiTouchSequence() +{ + eventSender.addTouchPoint(10, 10); + eventSender.addTouchPoint(20, 30); + eventSender.touchStart(); + + eventSender.updateTouchPoint(0, 15, 15); + eventSender.updateTouchPoint(1, 25, 35); + eventSender.touchMove(); + + eventSender.releaseTouchPoint(0); + eventSender.releaseTouchPoint(1); + eventSender.touchEnd(); +} + +if (window.eventSender) { + description("This tests basic multi touch event support. This is a limited version of test basic-multi-touch-events.html that avoids the situation where one touch point is released while another is maintained."); + + lastEvent = null; + eventSender.clearTouchPoints(); + multiTouchSequence(); +} else { + debug("This test requires DumpRenderTree. Tap on the blue rect to log.") +} + +var successfullyParsed = true; diff --git a/LayoutTests/fast/events/touch/script-tests/touch-target-limited.js b/LayoutTests/fast/events/touch/script-tests/touch-target-limited.js new file mode 100644 index 0000000..fd3400c --- /dev/null +++ b/LayoutTests/fast/events/touch/script-tests/touch-target-limited.js @@ -0,0 +1,103 @@ +var targetsDiv = document.createElement("div"); +targetsDiv.id = "targetsDiv"; + +var div1 = document.createElement("div"); +div1.id = "targetA"; +div1.style.width = "100px"; +div1.style.height = "100px"; +div1.style.backgroundColor = "blue"; + +var div2 = document.createElement("div"); +div2.id = "targetB"; +div2.style.width = "100px"; +div2.style.height = "100px"; +div2.style.backgroundColor = "green"; + +var touchStartCount = 0; +var touchMoveCount = 0; + +document.body.insertBefore(targetsDiv, document.getElementById('console')); +targetsDiv.appendChild(div1); +targetsDiv.appendChild(document.createElement('br')); +targetsDiv.appendChild(div2); + +function touchStartHandler() +{ + shouldBeEqualToString('event.type', 'touchstart'); + switch (touchStartCount) { + case 0: + shouldBeEqualToString('event.touches[0].target.id', div1.id); + shouldBeEqualToString('event.touches[1].target.id', div2.id); + break; + case 1: + shouldBeEqualToString('event.touches[0].target.id', div2.id); + shouldBeEqualToString('event.touches[1].target.id', div1.id); + break; + } + + touchStartCount++; +} + +function touchMoveHandler() +{ + shouldBeEqualToString('event.type', 'touchmove'); + switch (touchMoveCount) { + case 0: + case 1: + shouldBeEqualToString('event.touches[0].target.id', div1.id); + shouldBeEqualToString('event.touches[1].target.id', div2.id); + break; + case 2: + shouldBeEqualToString('event.touches[0].target.id', div2.id); + shouldBeEqualToString('event.touches[1].target.id', div1.id); + break; + } + + if (++touchMoveCount == 3) + { + successfullyParsed = true; + layoutTestController.notifyDone(); + isSuccessfullyParsed(); + } +} + +div1.addEventListener("touchstart", touchStartHandler, false); +div1.addEventListener("touchmove", touchMoveHandler, false); + +div2.addEventListener("touchstart", touchStartHandler, false); +div2.addEventListener("touchmove", touchMoveHandler, false); + +description("Tests that the target of touches match the element where the event originated, not where the touch is currently occurring. This is a limited version of test touch-target.html that avoids the situation where one touch point is released while another is maintained."); + +if (window.layoutTestController) { + layoutTestController.waitUntilDone(); +} + +if (window.eventSender) { + eventSender.clearTouchPoints(); + eventSender.addTouchPoint(50, 150); + eventSender.addTouchPoint(50, 250); + eventSender.touchStart(); + + eventSender.updateTouchPoint(0, 50, 250); + eventSender.updateTouchPoint(1, 50, 150); + eventSender.touchMove(); + + eventSender.updateTouchPoint(0, 1000, 1000); + eventSender.updateTouchPoint(1, 1000, 1000); + eventSender.touchMove(); + + eventSender.releaseTouchPoint(0); + eventSender.releaseTouchPoint(1); + eventSender.touchEnd(); + + eventSender.addTouchPoint(50, 250); + eventSender.addTouchPoint(50, 150); + eventSender.touchStart(); + + eventSender.updateTouchPoint(0, 500, 500); + eventSender.updateTouchPoint(1, 500, 500); + eventSender.touchMove(); +} else + debug('This test requires DRT.'); + diff --git a/LayoutTests/fast/events/touch/touch-target-limited-expected.txt b/LayoutTests/fast/events/touch/touch-target-limited-expected.txt new file mode 100644 index 0000000..0c1efd0 --- /dev/null +++ b/LayoutTests/fast/events/touch/touch-target-limited-expected.txt @@ -0,0 +1,25 @@ +Tests that the target of touches match the element where the event originated, not where the touch is currently occurring. This is a limited version of test touch-target.html that avoids the situation where one touch point is released while another is maintained. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + + +PASS event.type is "touchstart" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.type is "touchstart" +PASS event.touches[0].target.id is "targetB" +PASS event.touches[1].target.id is "targetA" +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetB" +PASS event.touches[1].target.id is "targetA" +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/events/touch/touch-target-limited.html b/LayoutTests/fast/events/touch/touch-target-limited.html new file mode 100644 index 0000000..f903842 --- /dev/null +++ b/LayoutTests/fast/events/touch/touch-target-limited.html @@ -0,0 +1,19 @@ + + + + + + + + + +

+
+ + + diff --git a/LayoutTests/storage/indexeddb/basics-expected.txt b/LayoutTests/storage/indexeddb/basics-expected.txt index 5365901..7632e40 100644 --- a/LayoutTests/storage/indexeddb/basics-expected.txt +++ b/LayoutTests/storage/indexeddb/basics-expected.txt @@ -8,7 +8,6 @@ PASS indexedDB == null is false indexedDB.open('name', 'description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -20,7 +19,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE diff --git a/LayoutTests/storage/indexeddb/database-basics-expected.txt b/LayoutTests/storage/indexeddb/database-basics-expected.txt index fc224cc..42c9879 100644 --- a/LayoutTests/storage/indexeddb/database-basics-expected.txt +++ b/LayoutTests/storage/indexeddb/database-basics-expected.txt @@ -6,7 +6,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE indexedDB.open('name', 'description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -18,7 +17,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -27,7 +25,6 @@ Testing setVersion. db.setVersion("version a") PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -39,14 +36,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE db.setVersion("version b") PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -58,7 +53,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -70,7 +64,6 @@ PASS db.objectStores.contains('') is false db.createObjectStore("test123") PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -82,7 +75,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -94,3 +86,4 @@ PASS db.objectStores.contains('test123') is true PASS successfullyParsed is true TEST COMPLETE + diff --git a/LayoutTests/storage/indexeddb/index-basics-expected.txt b/LayoutTests/storage/indexeddb/index-basics-expected.txt index a99bc86..564bdc8 100644 --- a/LayoutTests/storage/indexeddb/index-basics-expected.txt +++ b/LayoutTests/storage/indexeddb/index-basics-expected.txt @@ -6,7 +6,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE indexedDB.open('name', 'description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -18,7 +17,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -26,7 +24,6 @@ db = event.result db.createObjectStore('storeName', null) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -38,7 +35,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -46,7 +42,6 @@ store = event.result event.result.createIndex('indexName', 'x') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -58,7 +53,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -79,7 +73,6 @@ PASS 'get' in indexObject is true event.source.add({x: 'value', y: 'zzz'}, 'key') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -91,14 +84,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE event.source.add({x: 'value2', y: 'zzz2'}, 'key2') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -110,14 +101,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE indexObject.get('value') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -129,7 +118,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -137,7 +125,6 @@ PASS event.result is "key" indexObject.getObject('value') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -149,7 +136,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -158,7 +144,6 @@ PASS event.result.y is "zzz" indexObject.get('does not exist') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -170,7 +155,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -178,7 +162,6 @@ PASS event.code is IDBDatabaseException.NOT_FOUND_ERR indexObject.getObject('does not exist') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -190,7 +173,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -198,7 +180,6 @@ PASS event.code is IDBDatabaseException.NOT_FOUND_ERR indexObject.openCursor() PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -210,7 +191,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -220,7 +200,6 @@ PASS event.result.value is "key" event.result.continue() PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -232,7 +211,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -242,7 +220,6 @@ PASS event.result.value is "key2" event.result.continue() PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -254,7 +231,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -262,7 +238,6 @@ PASS event.result === null is true indexObject.openObjectCursor() PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -274,7 +249,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -285,7 +259,6 @@ PASS event.result.value.y is "zzz" event.result.continue() PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -297,7 +270,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -308,7 +280,6 @@ PASS event.result.value.y is "zzz2" event.result.continue() PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -320,7 +291,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE diff --git a/LayoutTests/storage/indexeddb/index-cursor-expected.txt b/LayoutTests/storage/indexeddb/index-cursor-expected.txt index 1442ad4..6d1417f 100644 --- a/LayoutTests/storage/indexeddb/index-cursor-expected.txt +++ b/LayoutTests/storage/indexeddb/index-cursor-expected.txt @@ -6,7 +6,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE indexedDB.open('someDB', 'some description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -18,7 +17,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -26,7 +24,6 @@ db = event.result db.createObjectStore('someObjectStore') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -38,7 +35,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -46,7 +42,6 @@ objectStore = event.result objectStore.createIndex('someIndex', 'x') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -58,7 +53,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -71,14 +65,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add({'x': testData[nextToAdd]}, nextToAdd) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -90,14 +82,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add({'x': testData[nextToAdd]}, nextToAdd) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -109,14 +99,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add({'x': testData[nextToAdd]}, nextToAdd) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -128,14 +116,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add({'x': testData[nextToAdd]}, nextToAdd) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -147,14 +133,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add({'x': testData[nextToAdd]}, nextToAdd) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -166,14 +150,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add({'x': testData[nextToAdd]}, nextToAdd) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -185,14 +167,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add({'x': testData[nextToAdd]}, nextToAdd) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -204,14 +184,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add({'x': testData[nextToAdd]}, nextToAdd) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... diff --git a/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt index 890c00f..7b5439a 100644 --- a/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt +++ b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt @@ -6,7 +6,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE indexedDB.open('name', 'description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -19,7 +18,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -27,7 +25,6 @@ db = event.result db.createObjectStore('storeName', null) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -40,7 +37,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -50,10 +46,13 @@ PASS store.name is "storeName" PASS store.keyPath is null PASS storeNames.contains('storeName') is true PASS storeNames.length is 1 +Ask for a store that doesn't exist: +index = store.index('asdf') +PASS index is null +FAIL Asking for a store that doesn't exist should have thrown. event.result.createIndex('indexName', 'x', true) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -66,15 +65,20 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE +PASS event.result !== null is true PASS event.source.indexNames.contains('indexName') is true +index = event.source.index('indexName') +PASS index !== null is true +Ask for a store that doesn't exist: +index = store.index('asdf') +PASS index is null +FAIL Asking for a store that doesn't exist should have thrown. event.source.add({x: 'value'}, 'key') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -87,7 +91,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -95,7 +98,6 @@ PASS event.result is "key" event.source.add({x: 'value'}, 'zzz') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -108,16 +110,15 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE PASS event.code is IDBDatabaseException.UNKNOWN_ERR -store = event.source +db.transaction() +store = transaction.objectStore('storeName') store.get('key') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -130,7 +131,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -139,7 +139,6 @@ store = event.source store.remove('key') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -152,7 +151,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE diff --git a/LayoutTests/storage/indexeddb/objectstore-basics.html b/LayoutTests/storage/indexeddb/objectstore-basics.html index 731d421..b2d383a 100644 --- a/LayoutTests/storage/indexeddb/objectstore-basics.html +++ b/LayoutTests/storage/indexeddb/objectstore-basics.html @@ -49,6 +49,16 @@ function createSuccess() shouldBe("storeNames.length", "1"); // FIXME: test all of object store's methods. + debug("Ask for a store that doesn't exist:"); + try { + index = evalAndLog("index = store.index('asdf')"); + shouldBeNull("index"); // Returning null is wrong, but less wrong than returning an actual object! + testFailed("Asking for a store that doesn't exist should have thrown."); + } catch (err) { + testPassed("Error thrown."); + // FIXME: Verify the correct exception thrown. + } + result = evalAndLog("event.result.createIndex('indexName', 'x', true)"); // true == unique requirement. verifyResult(result); result.onsuccess = addIndexSuccess; @@ -59,7 +69,20 @@ function addIndexSuccess() { debug("addIndexSuccess():"); verifySuccessEvent(event); + shouldBeTrue("event.result !== null"); shouldBeTrue("event.source.indexNames.contains('indexName')"); + index = evalAndLog("index = event.source.index('indexName')"); + shouldBeTrue("index !== null"); + + debug("Ask for a store that doesn't exist:"); + try { + index = evalAndLog("index = store.index('asdf')"); + shouldBeNull("index"); // Returning null is wrong, but less wrong than returning an actual object! + testFailed("Asking for a store that doesn't exist should have thrown."); + } catch (err) { + testPassed("Error thrown."); + // FIXME: Verify the correct exception thrown. + } result = evalAndLog("event.source.add({x: 'value'}, 'key')"); verifyResult(result); @@ -85,7 +108,10 @@ function addAgainFailure() verifyErrorEvent(event); // FIXME: This error code needs to be specced. shouldBe("event.code", "IDBDatabaseException.UNKNOWN_ERR"); - var store = evalAndLog("store = event.source"); + + transaction = evalAndLog("db.transaction()"); + transaction.onabort = unexpectedErrorCallback; + var store = evalAndLog("store = transaction.objectStore('storeName')"); result = evalAndLog("store.get('key')"); verifyResult(result); diff --git a/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt b/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt index ce5514a..e7211f6 100644 --- a/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt +++ b/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt @@ -6,7 +6,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE indexedDB.open('someDB', 'some description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -18,7 +17,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -26,7 +24,6 @@ db = event.result db.createObjectStore('someObjectStore') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -38,7 +35,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -51,14 +47,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add('', testData[nextToAdd]) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -70,14 +64,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add('', testData[nextToAdd]) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -89,14 +81,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add('', testData[nextToAdd]) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -108,14 +98,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add('', testData[nextToAdd]) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -127,14 +115,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add('', testData[nextToAdd]) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -146,14 +132,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add('', testData[nextToAdd]) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -165,14 +149,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE objectStore.add('', testData[nextToAdd]) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... diff --git a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt index 0a3d938..b7ba473 100644 --- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt +++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt @@ -6,7 +6,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE indexedDB.open('name', 'description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -18,7 +17,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -26,7 +24,6 @@ db = event.result db.createObjectStore('storeName', null) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -38,14 +35,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE event.result.add('value', 'key') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -57,14 +52,14 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE -event.source.get('key') +db.transaction() +store = transaction.objectStore('storeName') +store.get('key') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -76,7 +71,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -84,7 +78,6 @@ PASS event.result is "value" event.source.createIndex('indexName', '') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -96,7 +89,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -104,7 +96,6 @@ PASS event.source.indexNames.contains('indexName') is true db.removeObjectStore('storeName') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -116,14 +107,12 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE db.createObjectStore('storeName', null) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -135,14 +124,14 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE -event.result.get('key') +db.transaction() +store = transaction.objectStore('storeName') +store.get('key') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -154,7 +143,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE diff --git a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html index e842f5b..7878c7f 100644 --- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html +++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html @@ -49,7 +49,11 @@ function getValue() { verifySuccessEvent(event); - result = evalAndLog("event.source.get('key')"); + transaction = evalAndLog("db.transaction()"); + transaction.onabort = unexpectedErrorCallback; + var store = evalAndLog("store = transaction.objectStore('storeName')"); + + result = evalAndLog("store.get('key')"); verifyResult(result); result.onsuccess = addIndex; result.onerror = unexpectedErrorCallback; @@ -62,15 +66,20 @@ function addIndex() result = evalAndLog("event.source.createIndex('indexName', '')"); verifyResult(result); - result.onsuccess = removeObjectStore; + result.onsuccess = commitTransaction; result.onerror = unexpectedErrorCallback; } -function removeObjectStore() +function commitTransaction() { verifySuccessEvent(event); shouldBeTrue("event.source.indexNames.contains('indexName')"); + // Let the transaction commit. + window.setTimeout('removeObjectStore()', 0); +} +function removeObjectStore() +{ result = evalAndLog("db.removeObjectStore('storeName')"); verifyResult(result); result.onsuccess = createObjectStoreAgain; @@ -91,7 +100,11 @@ function getValueAgain() { verifySuccessEvent(event); - result = evalAndLog("event.result.get('key')"); + transaction = evalAndLog("db.transaction()"); + transaction.onabort = unexpectedErrorCallback; + var store = evalAndLog("store = transaction.objectStore('storeName')"); + + result = evalAndLog("store.get('key')"); verifyResult(result); result.onsuccess = unexpectedSuccessCallback; result.onerror = verifyError; @@ -100,7 +113,6 @@ function getValueAgain() function verifyError() { verifyErrorEvent(event); - // FIXME: Should just be IDBDatabaseException.NOT_FOUND_ERR but that doesn't work yet. shouldBe("event.code", "2"); shouldBeFalse("event.source.indexNames.contains('indexName')"); diff --git a/LayoutTests/storage/indexeddb/open-cursor-expected.txt b/LayoutTests/storage/indexeddb/open-cursor-expected.txt index e4ddc69..bda103f 100644 --- a/LayoutTests/storage/indexeddb/open-cursor-expected.txt +++ b/LayoutTests/storage/indexeddb/open-cursor-expected.txt @@ -6,7 +6,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE indexedDB.open('name', 'description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -18,7 +17,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -26,7 +24,6 @@ db = event.result db.createObjectStore('test') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -38,7 +35,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -46,7 +42,6 @@ objectStore = event.result objectStore.add('myValue', 'myKey') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -54,7 +49,6 @@ Opening cursor objectStore.openCursor(keyRange) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -67,7 +61,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -79,7 +72,6 @@ Opening an empty cursor. objectStore.openCursor(keyRange) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -92,10 +84,10 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE PASS successfullyParsed is true TEST COMPLETE + diff --git a/LayoutTests/storage/indexeddb/resources/shared.js b/LayoutTests/storage/indexeddb/resources/shared.js index 112bf18..65da3bf 100644 --- a/LayoutTests/storage/indexeddb/resources/shared.js +++ b/LayoutTests/storage/indexeddb/resources/shared.js @@ -11,7 +11,6 @@ function verifyEventCommon(event) shouldBeTrue("event.source != null"); shouldBeTrue("'onsuccess' in event.target"); shouldBeTrue("'onerror' in event.target"); - shouldBeTrue("'abort' in event.target"); shouldBeTrue("'readyState' in event.target"); shouldBe("event.target.readyState", "event.target.DONE"); debug(""); @@ -45,7 +44,6 @@ function verifyResult(result) { shouldBeTrue("'onsuccess' in result"); shouldBeTrue("'onerror' in result"); - shouldBeTrue("'abort' in result"); shouldBeTrue("'readyState' in result"); debug("An event should fire shortly..."); debug(""); diff --git a/LayoutTests/storage/indexeddb/transaction-basics-expected.txt b/LayoutTests/storage/indexeddb/transaction-basics-expected.txt index 25d0694..bba62f0 100644 --- a/LayoutTests/storage/indexeddb/transaction-basics-expected.txt +++ b/LayoutTests/storage/indexeddb/transaction-basics-expected.txt @@ -8,7 +8,6 @@ PASS indexedDB == null is false indexedDB.open('name', 'description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -21,7 +20,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -29,7 +27,6 @@ db = event.result db.createObjectStore('storeName', null) PASS 'onsuccess' in result is true PASS 'onerror' in result is true -PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... @@ -41,7 +38,6 @@ PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true PASS 'onerror' in event.target is true -PASS 'abort' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE @@ -53,3 +49,4 @@ PASS event.type is "abort" PASS successfullyParsed is true TEST COMPLETE + -- cgit v1.1