From 0617145a89917ae7735fe1c9538688ab9a577df5 Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Fri, 30 Jul 2010 10:46:49 +0100 Subject: Merge WebKit at r64264 : Initial merge by git. Change-Id: Ic42bef02efef8217a0f84c47176a9c617c28d1f1 --- .../script-tests/window-property.js | 5 +- .../DeviceOrientation/window-property-expected.txt | 5 +- .../DeviceOrientation/window-property-expected.txt | 18 ++++ .../fast/text/hyphenate-character-expected.txt | 118 ++++++++++++++++++++ .../android/fast/text/hyphens-expected.txt | 115 ++++++++++++++++++++ LayoutTests/storage/change-version.html | 6 +- LayoutTests/storage/indexeddb/basics-expected.txt | 30 ++++++ LayoutTests/storage/indexeddb/basics.html | 13 +++ .../storage/indexeddb/database-basics-expected.txt | 35 ++++++ LayoutTests/storage/indexeddb/database-basics.html | 13 +++ .../indexeddb/idb-database-request-expected.txt | 35 ------ .../storage/indexeddb/idb-database-request.html | 13 --- .../storage/indexeddb/idb-keyrange-expected.txt | 119 -------------------- LayoutTests/storage/indexeddb/idb-keyrange.html | 13 --- .../indexeddb/idb-objectstore-request-expected.txt | 118 -------------------- .../storage/indexeddb/idb-objectstore-request.html | 13 --- .../indexed-database-request-expected.txt | 30 ------ .../indexeddb/indexed-database-request.html | 13 --- .../storage/indexeddb/keyrange-expected.txt | 119 ++++++++++++++++++++ LayoutTests/storage/indexeddb/keyrange.html | 13 +++ .../indexeddb/objectstore-basics-expected.txt | 120 +++++++++++++++++++++ .../storage/indexeddb/objectstore-basics.html | 13 +++ LayoutTests/storage/indexeddb/resources/shared.js | 1 - .../storage/indexeddb/script-tests/basics.js | 26 +++++ .../indexeddb/script-tests/database-basics.js | 33 ++++++ .../indexeddb/script-tests/idb-database-request.js | 31 ------ .../storage/indexeddb/script-tests/idb-keyrange.js | 75 ------------- .../script-tests/idb-objectstore-request.js | 78 -------------- .../script-tests/indexed-database-request.js | 24 ----- .../storage/indexeddb/script-tests/keyrange.js | 76 +++++++++++++ .../indexeddb/script-tests/objectstore-basics.js | 83 ++++++++++++++ 31 files changed, 836 insertions(+), 568 deletions(-) create mode 100644 LayoutTests/platform/android-v8/fast/dom/DeviceOrientation/window-property-expected.txt create mode 100644 LayoutTests/platform/android/fast/text/hyphenate-character-expected.txt create mode 100644 LayoutTests/platform/android/fast/text/hyphens-expected.txt create mode 100644 LayoutTests/storage/indexeddb/basics-expected.txt create mode 100644 LayoutTests/storage/indexeddb/basics.html create mode 100644 LayoutTests/storage/indexeddb/database-basics-expected.txt create mode 100644 LayoutTests/storage/indexeddb/database-basics.html delete mode 100644 LayoutTests/storage/indexeddb/idb-database-request-expected.txt delete mode 100644 LayoutTests/storage/indexeddb/idb-database-request.html delete mode 100644 LayoutTests/storage/indexeddb/idb-keyrange-expected.txt delete mode 100644 LayoutTests/storage/indexeddb/idb-keyrange.html delete mode 100644 LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt delete mode 100644 LayoutTests/storage/indexeddb/idb-objectstore-request.html delete mode 100644 LayoutTests/storage/indexeddb/indexed-database-request-expected.txt delete mode 100644 LayoutTests/storage/indexeddb/indexed-database-request.html create mode 100644 LayoutTests/storage/indexeddb/keyrange-expected.txt create mode 100644 LayoutTests/storage/indexeddb/keyrange.html create mode 100644 LayoutTests/storage/indexeddb/objectstore-basics-expected.txt create mode 100644 LayoutTests/storage/indexeddb/objectstore-basics.html create mode 100644 LayoutTests/storage/indexeddb/script-tests/basics.js create mode 100644 LayoutTests/storage/indexeddb/script-tests/database-basics.js delete mode 100644 LayoutTests/storage/indexeddb/script-tests/idb-database-request.js delete mode 100644 LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js delete mode 100644 LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js delete mode 100644 LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js create mode 100644 LayoutTests/storage/indexeddb/script-tests/keyrange.js create mode 100644 LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js (limited to 'LayoutTests') diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js index e7458b4..8e65059 100644 --- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js +++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js @@ -9,7 +9,8 @@ function hasDeviceOrientationEventProperty() return false; } -shouldBeTrue("typeof window.DeviceOrientationEvent == 'function'"); +shouldBeTrue("typeof window.DeviceOrientationEvent == 'object'"); +shouldBeFalse("typeof window.DeviceOrientationEvent == 'function'"); shouldBeTrue("hasDeviceOrientationEventProperty()"); shouldBeTrue("'DeviceOrientationEvent' in window"); shouldBeTrue("window.hasOwnProperty('DeviceOrientationEvent')"); @@ -26,6 +27,6 @@ function hasOnDeviceOrientationProperty() shouldBeTrue("typeof window.ondeviceorientation == 'object'"); shouldBeTrue("hasOnDeviceOrientationProperty()"); shouldBeTrue("'ondeviceorientation' in window"); -shouldBeFalse("window.hasOwnProperty('ondeviceorientation')"); +shouldBeTrue("window.hasOwnProperty('ondeviceorientation')"); window.successfullyParsed = true; diff --git a/LayoutTests/fast/dom/DeviceOrientation/window-property-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/window-property-expected.txt index 95075a0..308ab7a 100644 --- a/LayoutTests/fast/dom/DeviceOrientation/window-property-expected.txt +++ b/LayoutTests/fast/dom/DeviceOrientation/window-property-expected.txt @@ -3,14 +3,15 @@ Tests that the window.DeviceOrientationEvent and window.ondeviceorientation prop On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -PASS typeof window.DeviceOrientationEvent == 'function' is true +PASS typeof window.DeviceOrientationEvent == 'object' is true +PASS typeof window.DeviceOrientationEvent == 'function' is false PASS hasDeviceOrientationEventProperty() is true PASS 'DeviceOrientationEvent' in window is true PASS window.hasOwnProperty('DeviceOrientationEvent') is true PASS typeof window.ondeviceorientation == 'object' is true PASS hasOnDeviceOrientationProperty() is true PASS 'ondeviceorientation' in window is true -PASS window.hasOwnProperty('ondeviceorientation') is false +PASS window.hasOwnProperty('ondeviceorientation') is true PASS successfullyParsed is true TEST COMPLETE diff --git a/LayoutTests/platform/android-v8/fast/dom/DeviceOrientation/window-property-expected.txt b/LayoutTests/platform/android-v8/fast/dom/DeviceOrientation/window-property-expected.txt new file mode 100644 index 0000000..900c9ca --- /dev/null +++ b/LayoutTests/platform/android-v8/fast/dom/DeviceOrientation/window-property-expected.txt @@ -0,0 +1,18 @@ +Tests that the window.DeviceOrientationEvent and window.ondeviceorientation properties are present. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +FAIL typeof window.DeviceOrientationEvent == 'object' should be true. Was false. +FAIL typeof window.DeviceOrientationEvent == 'function' should be false. Was true. +PASS hasDeviceOrientationEventProperty() is true +PASS 'DeviceOrientationEvent' in window is true +PASS window.hasOwnProperty('DeviceOrientationEvent') is true +PASS typeof window.ondeviceorientation == 'object' is true +PASS hasOnDeviceOrientationProperty() is true +PASS 'ondeviceorientation' in window is true +FAIL window.hasOwnProperty('ondeviceorientation') should be true. Was false. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/platform/android/fast/text/hyphenate-character-expected.txt b/LayoutTests/platform/android/fast/text/hyphenate-character-expected.txt new file mode 100644 index 0000000..1ed68b7 --- /dev/null +++ b/LayoutTests/platform/android/fast/text/hyphenate-character-expected.txt @@ -0,0 +1,118 @@ +layer at (0,0) size 356x1211 + RenderView at (0,0) size 313x483 +layer at (0,0) size 356x1211 + RenderBlock {HTML} at (0,0) size 313x483 + RenderBody {BODY} at (8,8) size 297x467 + RenderBlock (floating) {DIV} at (4,0) size 344x296 + RenderBlock {P} at (0,16) size 344x19 + RenderText {#text} at (0,0) size 227x19 + text run at (0,0) width 227: "The initial value (should be like " + RenderInline {TT} at (0,0) size 32x15 + RenderText {#text} at (227,4) size 32x15 + text run at (227,4) width 32: "auto" + RenderText {#text} at (259,0) size 5x19 + text run at (259,0) width 5: ")" + RenderBlock {DIV} at (0,51) size 344x245 [border: (3px solid #000000)] + RenderBlock (floating) {DIV} at (262,7) size 75x90 [bgcolor=#F0F8FF] + RenderText {#text} at (7,7) size 330x231 + text run at (7,7) width 245: "The chief difficulty Alice" + text run at (7,28) width 245: "found at first was in manag" + text run at (7,49) width 79: "ing her " + text run at (86,49) width 166: "flamingo: she suc" + text run at (7,70) width 245: "ceeded in getting its body" + text run at (7,91) width 147: "tucked away, " + text run at (154,91) width 98: "comfortably" + text run at (7,112) width 330: "enough, under her arm, with its legs" + text run at (7,133) width 125: "hanging down, " + text run at (132,133) width 205: "but generally, just as she" + text run at (7,154) width 298: "had got its neck nicely straightened " + text run at (305,154) width 32: "out," + text run at (7,175) width 330: "and was going to give the hedgehog a" + text run at (7,196) width 186: "blow with its head, it " + text run at (193,196) width 144: "would twist itself" + text run at (7,217) width 260: "round and look up in her face\x{2026}" + RenderBlock (floating) {DIV} at (4,296) size 344x296 + RenderBlock {P} at (0,16) size 344x19 + RenderText {#text} at (0,0) size 91x19 + text run at (0,0) width 91: "The default (" + RenderInline {TT} at (0,0) size 198x15 + RenderText {#text} at (91,4) size 198x15 + text run at (91,4) width 198: "hyphenate-character: auto" + RenderText {#text} at (289,0) size 5x19 + text run at (289,0) width 5: ")" + RenderBlock {DIV} at (0,51) size 344x245 [border: (3px solid #000000)] + RenderBlock (floating) {DIV} at (262,7) size 75x90 [bgcolor=#F0F8FF] + RenderText {#text} at (7,7) size 330x231 + text run at (7,7) width 245: "The chief difficulty Alice" + text run at (7,28) width 245: "found at first was in manag" + text run at (7,49) width 79: "ing her " + text run at (86,49) width 166: "flamingo: she suc" + text run at (7,70) width 245: "ceeded in getting its body" + text run at (7,91) width 147: "tucked away, " + text run at (154,91) width 98: "comfortably" + text run at (7,112) width 330: "enough, under her arm, with its legs" + text run at (7,133) width 125: "hanging down, " + text run at (132,133) width 205: "but generally, just as she" + text run at (7,154) width 298: "had got its neck nicely straightened " + text run at (305,154) width 32: "out," + text run at (7,175) width 330: "and was going to give the hedgehog a" + text run at (7,196) width 186: "blow with its head, it " + text run at (193,196) width 144: "would twist itself" + text run at (7,217) width 260: "round and look up in her face\x{2026}" + RenderBlock (floating) {DIV} at (4,592) size 344x296 + RenderBlock {P} at (0,16) size 344x19 + RenderText {#text} at (0,0) size 51x19 + text run at (0,0) width 51: "Bullet (" + RenderInline {TT} at (0,0) size 221x15 + RenderText {#text} at (51,4) size 221x15 + text run at (51,4) width 221: "hyphenate-character: \"\\2022\"" + RenderText {#text} at (272,0) size 5x19 + text run at (272,0) width 5: ")" + RenderBlock {DIV} at (0,51) size 344x245 [border: (3px solid #000000)] + RenderBlock (floating) {DIV} at (262,7) size 75x90 [bgcolor=#F0F8FF] + RenderText {#text} at (7,7) size 330x231 + text run at (7,7) width 245: "The chief difficulty Alice" + text run at (7,28) width 245: "found at first was in manag" + text run at (7,49) width 78: "ing her " + text run at (85,49) width 167: "flamingo: she suc" + text run at (7,70) width 245: "ceeded in getting its body" + text run at (7,91) width 147: "tucked away, " + text run at (154,91) width 98: "comfortably" + text run at (7,112) width 330: "enough, under her arm, with its legs" + text run at (7,133) width 125: "hanging down, " + text run at (132,133) width 205: "but generally, just as she" + text run at (7,154) width 298: "had got its neck nicely straightened " + text run at (305,154) width 32: "out," + text run at (7,175) width 330: "and was going to give the hedgehog a" + text run at (7,196) width 186: "blow with its head, it " + text run at (193,196) width 144: "would twist itself" + text run at (7,217) width 260: "round and look up in her face\x{2026}" + RenderBlock (floating) {DIV} at (4,888) size 344x315 + RenderBlock {P} at (0,16) size 344x38 + RenderText {#text} at (0,0) size 156x19 + text run at (0,0) width 156: "Middle dot and tilde (" + RenderInline {TT} at (0,0) size 314x34 + RenderText {#text} at (156,4) size 314x34 + text run at (156,4) width 158: "hyphenate-character:" + text run at (0,23) width 47: "\"\\B7~\"" + RenderText {#text} at (47,19) size 5x19 + text run at (47,19) width 5: ")" + RenderBlock {DIV} at (0,70) size 344x245 [border: (3px solid #000000)] + RenderBlock (floating) {DIV} at (262,7) size 75x90 [bgcolor=#F0F8FF] + RenderText {#text} at (7,7) size 330x231 + text run at (7,7) width 245: "The chief difficulty Alice" + text run at (7,28) width 245: "found at first was in manag" + text run at (7,49) width 74: "ing her " + text run at (81,49) width 171: "flamingo: she suc" + text run at (7,70) width 245: "ceeded in getting its body" + text run at (7,91) width 147: "tucked away, " + text run at (154,91) width 98: "comfortably" + text run at (7,112) width 330: "enough, under her arm, with its legs" + text run at (7,133) width 125: "hanging down, " + text run at (132,133) width 205: "but generally, just as she" + text run at (7,154) width 298: "had got its neck nicely straightened " + text run at (305,154) width 32: "out," + text run at (7,175) width 330: "and was going to give the hedgehog a" + text run at (7,196) width 186: "blow with its head, it " + text run at (193,196) width 144: "would twist itself" + text run at (7,217) width 260: "round and look up in her face\x{2026}" diff --git a/LayoutTests/platform/android/fast/text/hyphens-expected.txt b/LayoutTests/platform/android/fast/text/hyphens-expected.txt new file mode 100644 index 0000000..e68f861 --- /dev/null +++ b/LayoutTests/platform/android/fast/text/hyphens-expected.txt @@ -0,0 +1,115 @@ +layer at (0,0) size 356x1213 + RenderView at (0,0) size 313x483 +layer at (0,0) size 356x1213 + RenderBlock {HTML} at (0,0) size 313x483 + RenderBody {BODY} at (8,8) size 297x467 + RenderBlock (floating) {DIV} at (4,0) size 344x296 + RenderBlock {P} at (0,16) size 344x19 + RenderInline {TT} at (0,0) size 118x15 + RenderText {#text} at (0,4) size 118x15 + text run at (0,4) width 118: "hyphens: manual" + RenderText {#text} at (118,0) size 157x19 + text run at (118,0) width 157: " without soft hyphens" + RenderBlock {DIV} at (0,51) size 344x245 [border: (3px solid #000000)] + RenderBlock (floating) {DIV} at (262,7) size 75x90 [bgcolor=#F0F8FF] + RenderText {#text} at (7,7) size 330x231 + text run at (7,7) width 245: "The chief difficulty Alice" + text run at (7,28) width 245: "found at first was in" + text run at (7,49) width 128: "managing her " + text run at (135,49) width 117: "flamingo: she" + text run at (7,70) width 245: "succeeded in getting its body" + text run at (7,91) width 147: "tucked away, " + text run at (154,91) width 98: "comfortably" + text run at (7,112) width 330: "enough, under her arm, with its legs" + text run at (7,133) width 125: "hanging down, " + text run at (132,133) width 205: "but generally, just as she" + text run at (7,154) width 298: "had got its neck nicely straightened " + text run at (305,154) width 32: "out," + text run at (7,175) width 330: "and was going to give the hedgehog a" + text run at (7,196) width 186: "blow with its head, it " + text run at (193,196) width 144: "would twist itself" + text run at (7,217) width 260: "round and look up in her face\x{2026}" + RenderBlock (floating) {DIV} at (4,296) size 344x317 + RenderBlock {P} at (0,16) size 344x19 + RenderInline {TT} at (0,0) size 103x15 + RenderText {#text} at (0,4) size 103x15 + text run at (0,4) width 103: "hyphens: none" + RenderText {#text} at (103,0) size 133x19 + text run at (103,0) width 133: " with soft hyphens" + RenderBlock {DIV} at (0,51) size 344x266 [border: (3px solid #000000)] + RenderBlock (floating) {DIV} at (262,7) size 75x90 [bgcolor=#F0F8FF] + RenderText {#text} at (7,7) size 330x252 + text run at (7,7) width 245: "The chief difficulty Alice" + text run at (7,28) width 245: "found at first was in" + text run at (7,49) width 128: "managing her " + text run at (135,49) width 117: "flamingo: she" + text run at (7,70) width 141: "succeeded in get" + text run at (148,70) width 104: "ting its body" + text run at (7,91) width 181: "tucked away, com" + text run at (188,91) width 64: "fortably" + text run at (7,112) width 330: "enough, under her arm, with its legs" + text run at (7,133) width 125: "hanging down, " + text run at (132,133) width 205: "but generally, just as she" + text run at (7,154) width 289: "had got its neck nicely straight" + text run at (296,154) width 41: "ened" + text run at (7,175) width 330: "out, and was going to give the" + text run at (7,196) width 50: "hedge" + text run at (57,196) width 280: "hog a blow with its head, it" + text run at (7,217) width 330: "would twist itself round and look up in" + text run at (7,238) width 81: "her face\x{2026}" + RenderBlock (floating) {DIV} at (4,613) size 344x296 + RenderBlock {P} at (0,16) size 344x19 + RenderInline {TT} at (0,0) size 118x15 + RenderText {#text} at (0,4) size 118x15 + text run at (0,4) width 118: "hyphens: manual" + RenderText {#text} at (118,0) size 133x19 + text run at (118,0) width 133: " with soft hyphens" + RenderBlock {DIV} at (0,51) size 344x245 [border: (3px solid #000000)] + RenderBlock (floating) {DIV} at (262,7) size 75x90 [bgcolor=#F0F8FF] + RenderText {#text} at (7,7) size 330x231 + text run at (7,7) width 245: "The chief difficulty Alice" + text run at (7,28) width 245: "found at first was in" + text run at (7,49) width 128: "managing her " + text run at (135,49) width 117: "flamingo: she" + text run at (7,70) width 141: "succeeded in get" + text run at (148,70) width 104: "ting its body" + text run at (7,91) width 146: "tucked away, " + text run at (153,91) width 35: "com" + text run at (188,91) width 64: "fortably" + text run at (7,112) width 330: "enough, under her arm, with its legs" + text run at (7,133) width 125: "hanging down, " + text run at (132,133) width 205: "but generally, just as she" + text run at (7,154) width 251: "had got its neck nicely straight" + text run at (258,154) width 47: "ened " + text run at (305,154) width 32: "out," + text run at (7,175) width 281: "and was going to give the hedge" + text run at (288,175) width 49: "hog a" + text run at (7,196) width 186: "blow with its head, it " + text run at (193,196) width 144: "would twist itself" + text run at (7,217) width 260: "round and look up in her face\x{2026}" + RenderBlock (floating) {DIV} at (4,909) size 344x296 + RenderBlock {P} at (0,16) size 344x19 + RenderInline {TT} at (0,0) size 103x15 + RenderText {#text} at (0,4) size 103x15 + text run at (0,4) width 103: "hyphens: auto" + RenderText {#text} at (103,0) size 157x19 + text run at (103,0) width 157: " without soft hyphens" + RenderBlock {DIV} at (0,51) size 344x245 [border: (3px solid #000000)] + RenderBlock (floating) {DIV} at (262,7) size 75x90 [bgcolor=#F0F8FF] + RenderText {#text} at (7,7) size 330x231 + text run at (7,7) width 245: "The chief difficulty Alice" + text run at (7,28) width 245: "found at first was in manag" + text run at (7,49) width 79: "ing her " + text run at (86,49) width 166: "flamingo: she suc" + text run at (7,70) width 245: "ceeded in getting its body" + text run at (7,91) width 147: "tucked away, " + text run at (154,91) width 98: "comfortably" + text run at (7,112) width 330: "enough, under her arm, with its legs" + text run at (7,133) width 125: "hanging down, " + text run at (132,133) width 205: "but generally, just as she" + text run at (7,154) width 298: "had got its neck nicely straightened " + text run at (305,154) width 32: "out," + text run at (7,175) width 330: "and was going to give the hedgehog a" + text run at (7,196) width 186: "blow with its head, it " + text run at (193,196) width 144: "would twist itself" + text run at (7,217) width 260: "round and look up in her face\x{2026}" diff --git a/LayoutTests/storage/change-version.html b/LayoutTests/storage/change-version.html index 9b6876c..79bb9df 100644 --- a/LayoutTests/storage/change-version.html +++ b/LayoutTests/storage/change-version.html @@ -44,6 +44,10 @@ function runTest() if (window.location.search == "?2") { db1 = window.openDatabase("changeversion-test", "", "Test for the database.changeVersion() function", 1024); log("Finished tests with version " + db1.version + "; expected version: " + EXPECTED_VERSION_AFTER_RELOAD); + + // Reset the DB version or the next run might fail. + db1.changeVersion(db1.version, "1"); + finishTest(); } else testPart1(); @@ -60,7 +64,7 @@ function testPart1() { var db2 = window.openDatabase("changeversion-test", "1", "Test for the database.changeVersion() function", 1024); // First run Hixie's test to ensure basic changeVersion functionality works (see bug 28418). - db1.changeVersion("1", EXPECTED_VERSION_AFTER_HIXIE_TEST, emptyFunction, function (e) { + db1.changeVersion("1", EXPECTED_VERSION_AFTER_HIXIE_TEST, null, function (e) { log("FAIL in changeVersion:" + e); finishTest(); }, function () { diff --git a/LayoutTests/storage/indexeddb/basics-expected.txt b/LayoutTests/storage/indexeddb/basics-expected.txt new file mode 100644 index 0000000..5365901 --- /dev/null +++ b/LayoutTests/storage/indexeddb/basics-expected.txt @@ -0,0 +1,30 @@ +Test IndexedDB's basics. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS 'indexedDB' in window is true +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... + +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +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/basics.html b/LayoutTests/storage/indexeddb/basics.html new file mode 100644 index 0000000..24af453 --- /dev/null +++ b/LayoutTests/storage/indexeddb/basics.html @@ -0,0 +1,13 @@ + + + + + + + + +

+
+ + + diff --git a/LayoutTests/storage/indexeddb/database-basics-expected.txt b/LayoutTests/storage/indexeddb/database-basics-expected.txt new file mode 100644 index 0000000..ea869e0 --- /dev/null +++ b/LayoutTests/storage/indexeddb/database-basics-expected.txt @@ -0,0 +1,35 @@ +Test the basics of IndexedDB's IDBDatabase. + +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... + +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +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 = event.result +PASS db.name is "name" +PASS db.description is "description" +PASS db.version is "" +PASS db.objectStores is [] +PASS db.objectStores.length is 0 +PASS db.objectStores.contains('') is false +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/storage/indexeddb/database-basics.html b/LayoutTests/storage/indexeddb/database-basics.html new file mode 100644 index 0000000..9c92194 --- /dev/null +++ b/LayoutTests/storage/indexeddb/database-basics.html @@ -0,0 +1,13 @@ + + + + + + + + +

+
+ + + diff --git a/LayoutTests/storage/indexeddb/idb-database-request-expected.txt b/LayoutTests/storage/indexeddb/idb-database-request-expected.txt deleted file mode 100644 index 2651dd8..0000000 --- a/LayoutTests/storage/indexeddb/idb-database-request-expected.txt +++ /dev/null @@ -1,35 +0,0 @@ -Test IndexedDB's IDBDatabaseRequest. - -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... - -Success event fired: -PASS 'result' in event is true -PASS 'code' in event is false -PASS 'message' in event is false -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 = event.result -PASS db.name is "name" -PASS db.description is "description" -PASS db.version is "" -PASS db.objectStores is [] -PASS db.objectStores.length is 0 -PASS db.objectStores.contains('') is false -PASS successfullyParsed is true - -TEST COMPLETE - diff --git a/LayoutTests/storage/indexeddb/idb-database-request.html b/LayoutTests/storage/indexeddb/idb-database-request.html deleted file mode 100644 index 3ea2893..0000000 --- a/LayoutTests/storage/indexeddb/idb-database-request.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - -

-
- - - diff --git a/LayoutTests/storage/indexeddb/idb-keyrange-expected.txt b/LayoutTests/storage/indexeddb/idb-keyrange-expected.txt deleted file mode 100644 index 316a97b..0000000 --- a/LayoutTests/storage/indexeddb/idb-keyrange-expected.txt +++ /dev/null @@ -1,119 +0,0 @@ -Test IndexedDB's KeyRange. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - - -indexedDB.makeSingleKeyRange(1) -PASS keyRange.left is 1 -PASS keyRange.right is 1 -PASS keyRange.flags is keyRange.SINGLE -indexedDB.makeSingleKeyRange('a') -PASS keyRange.left is 'a' -PASS keyRange.right is 'a' -PASS keyRange.flags is keyRange.SINGLE -indexedDB.makeLeftBoundKeyRange(10,true) -PASS keyRange.left is 10 -PASS keyRange.right is null -PASS keyRange.flags is keyRange.LEFT_OPEN -indexedDB.makeLeftBoundKeyRange(11,false) -PASS keyRange.left is 11 -PASS keyRange.right is null -PASS keyRange.flags is keyRange.LEFT_BOUND -indexedDB.makeLeftBoundKeyRange(12,undefined) -PASS keyRange.left is 12 -PASS keyRange.right is null -PASS keyRange.flags is keyRange.LEFT_BOUND -indexedDB.makeLeftBoundKeyRange('aa',true) -PASS keyRange.left is 'aa' -PASS keyRange.right is null -PASS keyRange.flags is keyRange.LEFT_OPEN -indexedDB.makeLeftBoundKeyRange('ab',false) -PASS keyRange.left is 'ab' -PASS keyRange.right is null -PASS keyRange.flags is keyRange.LEFT_BOUND -indexedDB.makeLeftBoundKeyRange('ac',undefined) -PASS keyRange.left is 'ac' -PASS keyRange.right is null -PASS keyRange.flags is keyRange.LEFT_BOUND -indexedDB.makeRightBoundKeyRange(20,true) -PASS keyRange.right is 20 -PASS keyRange.left is null -PASS keyRange.flags is keyRange.RIGHT_OPEN -indexedDB.makeRightBoundKeyRange(21,false) -PASS keyRange.right is 21 -PASS keyRange.left is null -PASS keyRange.flags is keyRange.RIGHT_BOUND -indexedDB.makeRightBoundKeyRange(22,undefined) -PASS keyRange.right is 22 -PASS keyRange.left is null -PASS keyRange.flags is keyRange.RIGHT_BOUND -indexedDB.makeRightBoundKeyRange('ba',true) -PASS keyRange.right is 'ba' -PASS keyRange.left is null -PASS keyRange.flags is keyRange.RIGHT_OPEN -indexedDB.makeRightBoundKeyRange('bb',false) -PASS keyRange.right is 'bb' -PASS keyRange.left is null -PASS keyRange.flags is keyRange.RIGHT_BOUND -indexedDB.makeRightBoundKeyRange('bc',undefined) -PASS keyRange.right is 'bc' -PASS keyRange.left is null -PASS keyRange.flags is keyRange.RIGHT_BOUND -indexedDB.makeBoundKeyRange(30,40,undefined,undefined) -PASS keyRange.left is 30 -PASS keyRange.right is 40 -PASS leftFlags is keyRange.LEFT_BOUND -PASS rightFlags is keyRange.RIGHT_BOUND -indexedDB.makeBoundKeyRange(31,41,false,false) -PASS keyRange.left is 31 -PASS keyRange.right is 41 -PASS leftFlags is keyRange.LEFT_BOUND -PASS rightFlags is keyRange.RIGHT_BOUND -indexedDB.makeBoundKeyRange(32,42,false,true) -PASS keyRange.left is 32 -PASS keyRange.right is 42 -PASS leftFlags is keyRange.LEFT_BOUND -PASS rightFlags is keyRange.RIGHT_OPEN -indexedDB.makeBoundKeyRange(33,43,true,false) -PASS keyRange.left is 33 -PASS keyRange.right is 43 -PASS leftFlags is keyRange.LEFT_OPEN -PASS rightFlags is keyRange.RIGHT_BOUND -indexedDB.makeBoundKeyRange(34,44,true,true) -PASS keyRange.left is 34 -PASS keyRange.right is 44 -PASS leftFlags is keyRange.LEFT_OPEN -PASS rightFlags is keyRange.RIGHT_OPEN -indexedDB.makeBoundKeyRange('aaa','aba',false,false) -PASS keyRange.left is 'aaa' -PASS keyRange.right is 'aba' -PASS leftFlags is keyRange.LEFT_BOUND -PASS rightFlags is keyRange.RIGHT_BOUND -indexedDB.makeBoundKeyRange('aab','abb',undefined,undefined) -PASS keyRange.left is 'aab' -PASS keyRange.right is 'abb' -PASS leftFlags is keyRange.LEFT_BOUND -PASS rightFlags is keyRange.RIGHT_BOUND -indexedDB.makeBoundKeyRange('aac','abc',false,false) -PASS keyRange.left is 'aac' -PASS keyRange.right is 'abc' -PASS leftFlags is keyRange.LEFT_BOUND -PASS rightFlags is keyRange.RIGHT_BOUND -indexedDB.makeBoundKeyRange('aad','abd',false,true) -PASS keyRange.left is 'aad' -PASS keyRange.right is 'abd' -PASS leftFlags is keyRange.LEFT_BOUND -PASS rightFlags is keyRange.RIGHT_OPEN -indexedDB.makeBoundKeyRange('aae','abe',true,false) -PASS keyRange.left is 'aae' -PASS keyRange.right is 'abe' -PASS leftFlags is keyRange.LEFT_OPEN -PASS rightFlags is keyRange.RIGHT_BOUND -indexedDB.makeBoundKeyRange('aaf','abf',true,true) -PASS keyRange.left is 'aaf' -PASS keyRange.right is 'abf' -PASS leftFlags is keyRange.LEFT_OPEN -PASS rightFlags is keyRange.RIGHT_OPEN -PASS successfullyParsed is true - -TEST COMPLETE diff --git a/LayoutTests/storage/indexeddb/idb-keyrange.html b/LayoutTests/storage/indexeddb/idb-keyrange.html deleted file mode 100644 index 800a8cc..0000000 --- a/LayoutTests/storage/indexeddb/idb-keyrange.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - -

-
- - - diff --git a/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt b/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt deleted file mode 100644 index 30bac34..0000000 --- a/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt +++ /dev/null @@ -1,118 +0,0 @@ -Test IndexedDB's IDBObjectStoreRequest. - -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... - -openSuccess(): -Success event fired: -PASS 'result' in event is true -PASS 'code' in event is false -PASS 'message' in event is false -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 = 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... - -createSuccess(): -Success event fired: -PASS 'result' in event is true -PASS 'code' in event is false -PASS 'message' in event is false -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 - -store = event.result -PASS store.name is "storeName" -PASS store.keyPath is null -store.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... - -addSuccess(): -Success event fired: -PASS 'result' in event is true -PASS 'code' in event is false -PASS 'message' in event is false -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 is "key" -store = event.source -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... - -getSuccess(): -Success event fired: -PASS 'result' in event is true -PASS 'code' in event is false -PASS 'message' in event is false -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 is "value" -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... - -removeSuccess(): -Success event fired: -PASS 'result' in event is true -PASS 'code' in event is false -PASS 'message' in event is false -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 is null -PASS successfullyParsed is true - -TEST COMPLETE - diff --git a/LayoutTests/storage/indexeddb/idb-objectstore-request.html b/LayoutTests/storage/indexeddb/idb-objectstore-request.html deleted file mode 100644 index 87c34ea..0000000 --- a/LayoutTests/storage/indexeddb/idb-objectstore-request.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - -

-
- - - diff --git a/LayoutTests/storage/indexeddb/indexed-database-request-expected.txt b/LayoutTests/storage/indexeddb/indexed-database-request-expected.txt deleted file mode 100644 index 1734ff9..0000000 --- a/LayoutTests/storage/indexeddb/indexed-database-request-expected.txt +++ /dev/null @@ -1,30 +0,0 @@ -Test IndexedDB's IndexedDatabaseRequest. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - - -PASS 'indexedDB' in window is true -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... - -Success event fired: -PASS 'result' in event is true -PASS 'code' in event is false -PASS 'message' in event is false -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/indexed-database-request.html b/LayoutTests/storage/indexeddb/indexed-database-request.html deleted file mode 100644 index c22934b..0000000 --- a/LayoutTests/storage/indexeddb/indexed-database-request.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - -

-
- - - diff --git a/LayoutTests/storage/indexeddb/keyrange-expected.txt b/LayoutTests/storage/indexeddb/keyrange-expected.txt new file mode 100644 index 0000000..fc61b2f --- /dev/null +++ b/LayoutTests/storage/indexeddb/keyrange-expected.txt @@ -0,0 +1,119 @@ +Test IndexedDB's KeyRange. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +IDBKeyRange.only(1) +PASS keyRange.left is 1 +PASS keyRange.right is 1 +PASS keyRange.flags is keyRange.SINGLE +IDBKeyRange.only('a') +PASS keyRange.left is 'a' +PASS keyRange.right is 'a' +PASS keyRange.flags is keyRange.SINGLE +IDBKeyRange.leftBound(10,true) +PASS keyRange.left is 10 +PASS keyRange.right is null +PASS keyRange.flags is keyRange.LEFT_OPEN +IDBKeyRange.leftBound(11,false) +PASS keyRange.left is 11 +PASS keyRange.right is null +PASS keyRange.flags is keyRange.LEFT_BOUND +IDBKeyRange.leftBound(12,undefined) +PASS keyRange.left is 12 +PASS keyRange.right is null +PASS keyRange.flags is keyRange.LEFT_BOUND +IDBKeyRange.leftBound('aa',true) +PASS keyRange.left is 'aa' +PASS keyRange.right is null +PASS keyRange.flags is keyRange.LEFT_OPEN +IDBKeyRange.leftBound('ab',false) +PASS keyRange.left is 'ab' +PASS keyRange.right is null +PASS keyRange.flags is keyRange.LEFT_BOUND +IDBKeyRange.leftBound('ac',undefined) +PASS keyRange.left is 'ac' +PASS keyRange.right is null +PASS keyRange.flags is keyRange.LEFT_BOUND +IDBKeyRange.rightBound(20,true) +PASS keyRange.right is 20 +PASS keyRange.left is null +PASS keyRange.flags is keyRange.RIGHT_OPEN +IDBKeyRange.rightBound(21,false) +PASS keyRange.right is 21 +PASS keyRange.left is null +PASS keyRange.flags is keyRange.RIGHT_BOUND +IDBKeyRange.rightBound(22,undefined) +PASS keyRange.right is 22 +PASS keyRange.left is null +PASS keyRange.flags is keyRange.RIGHT_BOUND +IDBKeyRange.rightBound('ba',true) +PASS keyRange.right is 'ba' +PASS keyRange.left is null +PASS keyRange.flags is keyRange.RIGHT_OPEN +IDBKeyRange.rightBound('bb',false) +PASS keyRange.right is 'bb' +PASS keyRange.left is null +PASS keyRange.flags is keyRange.RIGHT_BOUND +IDBKeyRange.rightBound('bc',undefined) +PASS keyRange.right is 'bc' +PASS keyRange.left is null +PASS keyRange.flags is keyRange.RIGHT_BOUND +IDBKeyRange.bound(30,40,undefined,undefined) +PASS keyRange.left is 30 +PASS keyRange.right is 40 +PASS leftFlags is keyRange.LEFT_BOUND +PASS rightFlags is keyRange.RIGHT_BOUND +IDBKeyRange.bound(31,41,false,false) +PASS keyRange.left is 31 +PASS keyRange.right is 41 +PASS leftFlags is keyRange.LEFT_BOUND +PASS rightFlags is keyRange.RIGHT_BOUND +IDBKeyRange.bound(32,42,false,true) +PASS keyRange.left is 32 +PASS keyRange.right is 42 +PASS leftFlags is keyRange.LEFT_BOUND +PASS rightFlags is keyRange.RIGHT_OPEN +IDBKeyRange.bound(33,43,true,false) +PASS keyRange.left is 33 +PASS keyRange.right is 43 +PASS leftFlags is keyRange.LEFT_OPEN +PASS rightFlags is keyRange.RIGHT_BOUND +IDBKeyRange.bound(34,44,true,true) +PASS keyRange.left is 34 +PASS keyRange.right is 44 +PASS leftFlags is keyRange.LEFT_OPEN +PASS rightFlags is keyRange.RIGHT_OPEN +IDBKeyRange.bound('aaa','aba',false,false) +PASS keyRange.left is 'aaa' +PASS keyRange.right is 'aba' +PASS leftFlags is keyRange.LEFT_BOUND +PASS rightFlags is keyRange.RIGHT_BOUND +IDBKeyRange.bound('aab','abb',undefined,undefined) +PASS keyRange.left is 'aab' +PASS keyRange.right is 'abb' +PASS leftFlags is keyRange.LEFT_BOUND +PASS rightFlags is keyRange.RIGHT_BOUND +IDBKeyRange.bound('aac','abc',false,false) +PASS keyRange.left is 'aac' +PASS keyRange.right is 'abc' +PASS leftFlags is keyRange.LEFT_BOUND +PASS rightFlags is keyRange.RIGHT_BOUND +IDBKeyRange.bound('aad','abd',false,true) +PASS keyRange.left is 'aad' +PASS keyRange.right is 'abd' +PASS leftFlags is keyRange.LEFT_BOUND +PASS rightFlags is keyRange.RIGHT_OPEN +IDBKeyRange.bound('aae','abe',true,false) +PASS keyRange.left is 'aae' +PASS keyRange.right is 'abe' +PASS leftFlags is keyRange.LEFT_OPEN +PASS rightFlags is keyRange.RIGHT_BOUND +IDBKeyRange.bound('aaf','abf',true,true) +PASS keyRange.left is 'aaf' +PASS keyRange.right is 'abf' +PASS leftFlags is keyRange.LEFT_OPEN +PASS rightFlags is keyRange.RIGHT_OPEN +PASS successfullyParsed is true + +TEST COMPLETE diff --git a/LayoutTests/storage/indexeddb/keyrange.html b/LayoutTests/storage/indexeddb/keyrange.html new file mode 100644 index 0000000..d4ef58e --- /dev/null +++ b/LayoutTests/storage/indexeddb/keyrange.html @@ -0,0 +1,13 @@ + + + + + + + + +

+
+ + + diff --git a/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt new file mode 100644 index 0000000..105058d --- /dev/null +++ b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt @@ -0,0 +1,120 @@ +Test the basics of IndexedDB's IDBObjectStore. + +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... + +openSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +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 = 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... + +createSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +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 + +store = event.result +storeNames = db.objectStores +PASS store.name is "storeName" +PASS store.keyPath is null +PASS storeNames.contains('storeName') is true +PASS storeNames.length is 1 +store.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... + +addSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +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 is "key" +store = event.source +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... + +getSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +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 is "value" +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... + +removeSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +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 is null +PASS successfullyParsed is true + +TEST COMPLETE diff --git a/LayoutTests/storage/indexeddb/objectstore-basics.html b/LayoutTests/storage/indexeddb/objectstore-basics.html new file mode 100644 index 0000000..09eb68c --- /dev/null +++ b/LayoutTests/storage/indexeddb/objectstore-basics.html @@ -0,0 +1,13 @@ + + + + + + + + +

+
+ + + diff --git a/LayoutTests/storage/indexeddb/resources/shared.js b/LayoutTests/storage/indexeddb/resources/shared.js index 809bdec..e510be1 100644 --- a/LayoutTests/storage/indexeddb/resources/shared.js +++ b/LayoutTests/storage/indexeddb/resources/shared.js @@ -1,6 +1,5 @@ function done() { - window.successfullyParsed = true; isSuccessfullyParsed(); if (window.layoutTestController) layoutTestController.notifyDone() diff --git a/LayoutTests/storage/indexeddb/script-tests/basics.js b/LayoutTests/storage/indexeddb/script-tests/basics.js new file mode 100644 index 0000000..cebd48f --- /dev/null +++ b/LayoutTests/storage/indexeddb/script-tests/basics.js @@ -0,0 +1,26 @@ +description("Test IndexedDB's basics."); +if (window.layoutTestController) + layoutTestController.waitUntilDone(); + +function openCallback() +{ + verifySuccessEvent(event); + done(); +} + +function test() +{ + shouldBeTrue("'indexedDB' in window"); + shouldBeFalse("indexedDB == null"); + + // FIXME: Verify other IndexedDatabaseRequest constructors, once they're implemented. + + result = evalAndLog("indexedDB.open('name', 'description')"); + verifyResult(result); + result.onsuccess = openCallback; + result.onerror = unexpectedErrorCallback; +} + +test(); + +var successfullyParsed = true; diff --git a/LayoutTests/storage/indexeddb/script-tests/database-basics.js b/LayoutTests/storage/indexeddb/script-tests/database-basics.js new file mode 100644 index 0000000..a317b71 --- /dev/null +++ b/LayoutTests/storage/indexeddb/script-tests/database-basics.js @@ -0,0 +1,33 @@ +description("Test the basics of IndexedDB's IDBDatabase."); +if (window.layoutTestController) + layoutTestController.waitUntilDone(); + +function openSuccess() +{ + verifySuccessEvent(event); + + var db = evalAndLog("db = event.result"); + shouldBeEqualToString("db.name", "name"); + shouldBeEqualToString("db.description", "description"); + shouldBeEqualToString("db.version", ""); + shouldBe("db.objectStores", "[]"); + shouldBe("db.objectStores.length", "0"); + shouldBe("db.objectStores.contains('')", "false"); + // FIXME: Test .item() once it's possible to get back a non-empty list. + + // FIXME: Test the other properties of IDBDatabase as they're written. + + done(); +} + +function test() +{ + result = evalAndLog("indexedDB.open('name', 'description')"); + verifyResult(result); + result.onsuccess = openSuccess; + result.onerror = unexpectedErrorCallback; +} + +test(); + +var successfullyParsed = true; diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js b/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js deleted file mode 100644 index ae6a563..0000000 --- a/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js +++ /dev/null @@ -1,31 +0,0 @@ -description("Test IndexedDB's IDBDatabaseRequest."); -if (window.layoutTestController) - layoutTestController.waitUntilDone(); - -function openSuccess() -{ - verifySuccessEvent(event); - - var db = evalAndLog("db = event.result"); - shouldBeEqualToString("db.name", "name"); - shouldBeEqualToString("db.description", "description"); - shouldBeEqualToString("db.version", ""); - shouldBe("db.objectStores", "[]"); - shouldBe("db.objectStores.length", "0"); - shouldBe("db.objectStores.contains('')", "false"); - // FIXME: Test .item() once it's possible to get back a non-empty list. - - // FIXME: Test the other properties of IDBDatabase as they're written. - - done(); -} - -function test() -{ - result = evalAndLog("indexedDB.open('name', 'description')"); - verifyResult(result); - result.onsuccess = openSuccess; - result.onerror = unexpectedErrorCallback; -} - -test(); diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js b/LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js deleted file mode 100644 index 2951876..0000000 --- a/LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js +++ /dev/null @@ -1,75 +0,0 @@ -description("Test IndexedDB's KeyRange."); -if (window.layoutTestController) - layoutTestController.waitUntilDone(); - -function checkSingleKeyRange(value) -{ - keyRange = evalAndLog("indexedDB.makeSingleKeyRange(" + value + ")"); - shouldBe("keyRange.left", "" + value); - shouldBe("keyRange.right", "" + value); - shouldBe("keyRange.flags", "keyRange.SINGLE"); -} - -function checkLeftBoundKeyRange(value, open) -{ - keyRange = evalAndLog("indexedDB.makeLeftBoundKeyRange(" + value + "," + open + ")"); - shouldBe("keyRange.left", "" + value); - shouldBeNull("keyRange.right"); - shouldBe("keyRange.flags", open ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND"); -} - -function checkRightBoundKeyRange(value, open) -{ - keyRange = evalAndLog("indexedDB.makeRightBoundKeyRange(" + value + "," + open + ")"); - shouldBe("keyRange.right", "" + value); - shouldBeNull("keyRange.left"); - shouldBe("keyRange.flags", open ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND"); -} - -function checkBoundKeyRange(left, right, openLeft, openRight) -{ - keyRange = evalAndLog("indexedDB.makeBoundKeyRange(" + left + "," + right + "," + openLeft + "," + openRight + ")"); - shouldBe("keyRange.left", "" + left); - shouldBe("keyRange.right", "" + right); - leftFlags = keyRange.flags & (keyRange.LEFT_OPEN | keyRange.LEFT_BOUND); - shouldBe("leftFlags", openLeft ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND"); - rightFlags = keyRange.flags & (keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND); - shouldBe("rightFlags", openRight ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND"); -} - -function test() -{ - checkSingleKeyRange(1); - checkSingleKeyRange("'a'"); - - checkLeftBoundKeyRange(10, true); - checkLeftBoundKeyRange(11, false); - checkLeftBoundKeyRange(12); - checkLeftBoundKeyRange("'aa'", true); - checkLeftBoundKeyRange("'ab'", false); - checkLeftBoundKeyRange("'ac'"); - - checkRightBoundKeyRange(20, true); - checkRightBoundKeyRange(21, false); - checkRightBoundKeyRange(22); - checkRightBoundKeyRange("'ba'", true); - checkRightBoundKeyRange("'bb'", false); - checkRightBoundKeyRange("'bc'"); - - checkBoundKeyRange(30, 40); - checkBoundKeyRange(31, 41, false, false); - checkBoundKeyRange(32, 42, false, true); - checkBoundKeyRange(33, 43, true, false); - checkBoundKeyRange(34, 44, true, true); - - checkBoundKeyRange("'aaa'", "'aba'", false, false); - checkBoundKeyRange("'aab'", "'abb'"); - checkBoundKeyRange("'aac'", "'abc'", false, false); - checkBoundKeyRange("'aad'", "'abd'", false, true); - checkBoundKeyRange("'aae'", "'abe'", true, false); - checkBoundKeyRange("'aaf'", "'abf'", true, true); - - done(); -} - -test(); diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js b/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js deleted file mode 100644 index 045db12..0000000 --- a/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js +++ /dev/null @@ -1,78 +0,0 @@ -description("Test IndexedDB's IDBObjectStoreRequest."); -if (window.layoutTestController) - layoutTestController.waitUntilDone(); - -function test() -{ - result = evalAndLog("indexedDB.open('name', 'description')"); - verifyResult(result); - result.onsuccess = openSuccess; - result.onerror = unexpectedErrorCallback; -} - -function openSuccess() -{ - debug("openSuccess():"); - verifySuccessEvent(event); - var db = evalAndLog("db = event.result"); - - // FIXME: remove any previously created object stores. - // This requires IDBDatabaseRequest::removeObjectStore to be implemented. - - result = evalAndLog("db.createObjectStore('storeName', null)"); - verifyResult(result); - result.onsuccess = createSuccess; - result.onerror = unexpectedErrorCallback; -} - -function createSuccess() -{ - debug("createSuccess():"); - verifySuccessEvent(event); - var store = evalAndLog("store = event.result"); - - shouldBeEqualToString("store.name", "storeName"); - shouldBeNull("store.keyPath"); - // FIXME: test store.indexNames, as well as all object store's methods. - - result = evalAndLog("store.add('value', 'key')"); - verifyResult(result); - result.onsuccess = addSuccess; - result.onerror = unexpectedErrorCallback; -} - -function addSuccess() -{ - debug("addSuccess():"); - verifySuccessEvent(event); - shouldBeEqualToString("event.result", "key"); - var store = evalAndLog("store = event.source"); - - result = evalAndLog("store.get('key')"); - verifyResult(result); - result.onsuccess = getSuccess; - result.onerror = unexpectedErrorCallback; -} - -function getSuccess() -{ - debug("getSuccess():"); - verifySuccessEvent(event); - shouldBeEqualToString("event.result", "value"); - var store = evalAndLog("store = event.source"); - - result = evalAndLog("store.remove('key')"); - verifyResult(result); - result.onsuccess = removeSuccess; - result.onerror = unexpectedErrorCallback; -} - -function removeSuccess() -{ - debug("removeSuccess():"); - verifySuccessEvent(event); - shouldBeNull("event.result"); - done(); -} - -test(); diff --git a/LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js b/LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js deleted file mode 100644 index 6f77279..0000000 --- a/LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js +++ /dev/null @@ -1,24 +0,0 @@ -description("Test IndexedDB's IndexedDatabaseRequest."); -if (window.layoutTestController) - layoutTestController.waitUntilDone(); - -function openCallback() -{ - verifySuccessEvent(event); - done(); -} - -function test() -{ - shouldBeTrue("'indexedDB' in window"); - shouldBeFalse("indexedDB == null"); - - // FIXME: Verify other IndexedDatabaseRequest constructors, once they're implemented. - - result = evalAndLog("indexedDB.open('name', 'description')"); - verifyResult(result); - result.onsuccess = openCallback; - result.onerror = unexpectedErrorCallback; -} - -test(); diff --git a/LayoutTests/storage/indexeddb/script-tests/keyrange.js b/LayoutTests/storage/indexeddb/script-tests/keyrange.js new file mode 100644 index 0000000..26d283f --- /dev/null +++ b/LayoutTests/storage/indexeddb/script-tests/keyrange.js @@ -0,0 +1,76 @@ +description("Test IndexedDB's KeyRange."); +if (window.layoutTestController) + layoutTestController.waitUntilDone(); + +function checkSingleKeyRange(value) +{ + keyRange = evalAndLog("IDBKeyRange.only(" + value + ")"); + shouldBe("keyRange.left", "" + value); + shouldBe("keyRange.right", "" + value); + shouldBe("keyRange.flags", "keyRange.SINGLE"); +} + +function checkLeftBoundKeyRange(value, open) +{ + keyRange = evalAndLog("IDBKeyRange.leftBound(" + value + "," + open + ")"); + shouldBe("keyRange.left", "" + value); + shouldBeNull("keyRange.right"); + shouldBe("keyRange.flags", open ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND"); +} + +function checkRightBoundKeyRange(value, open) +{ + keyRange = evalAndLog("IDBKeyRange.rightBound(" + value + "," + open + ")"); + shouldBe("keyRange.right", "" + value); + shouldBeNull("keyRange.left"); + shouldBe("keyRange.flags", open ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND"); +} + +function checkBoundKeyRange(left, right, openLeft, openRight) +{ + keyRange = evalAndLog("IDBKeyRange.bound(" + left + "," + right + "," + openLeft + "," + openRight + ")"); + shouldBe("keyRange.left", "" + left); + shouldBe("keyRange.right", "" + right); + leftFlags = keyRange.flags & (keyRange.LEFT_OPEN | keyRange.LEFT_BOUND); + shouldBe("leftFlags", openLeft ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND"); + rightFlags = keyRange.flags & (keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND); + shouldBe("rightFlags", openRight ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND"); +} + +function test() +{ + checkSingleKeyRange(1); + checkSingleKeyRange("'a'"); + + checkLeftBoundKeyRange(10, true); + checkLeftBoundKeyRange(11, false); + checkLeftBoundKeyRange(12); + checkLeftBoundKeyRange("'aa'", true); + checkLeftBoundKeyRange("'ab'", false); + checkLeftBoundKeyRange("'ac'"); + + checkRightBoundKeyRange(20, true); + checkRightBoundKeyRange(21, false); + checkRightBoundKeyRange(22); + checkRightBoundKeyRange("'ba'", true); + checkRightBoundKeyRange("'bb'", false); + checkRightBoundKeyRange("'bc'"); + + checkBoundKeyRange(30, 40); + checkBoundKeyRange(31, 41, false, false); + checkBoundKeyRange(32, 42, false, true); + checkBoundKeyRange(33, 43, true, false); + checkBoundKeyRange(34, 44, true, true); + + checkBoundKeyRange("'aaa'", "'aba'", false, false); + checkBoundKeyRange("'aab'", "'abb'"); + checkBoundKeyRange("'aac'", "'abc'", false, false); + checkBoundKeyRange("'aad'", "'abd'", false, true); + checkBoundKeyRange("'aae'", "'abe'", true, false); + checkBoundKeyRange("'aaf'", "'abf'", true, true); +} + +test(); + +var successfullyParsed = true; +done(); diff --git a/LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js b/LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js new file mode 100644 index 0000000..9869579 --- /dev/null +++ b/LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js @@ -0,0 +1,83 @@ +description("Test the basics of IndexedDB's IDBObjectStore."); +if (window.layoutTestController) + layoutTestController.waitUntilDone(); + +function test() +{ + result = evalAndLog("indexedDB.open('name', 'description')"); + verifyResult(result); + result.onsuccess = openSuccess; + result.onerror = unexpectedErrorCallback; +} + +function openSuccess() +{ + debug("openSuccess():"); + verifySuccessEvent(event); + db = evalAndLog("db = event.result"); + + // FIXME: remove any previously created object stores. + // This requires IDBDatabaseRequest::removeObjectStore to be implemented. + + result = evalAndLog("db.createObjectStore('storeName', null)"); + verifyResult(result); + result.onsuccess = createSuccess; + result.onerror = unexpectedErrorCallback; +} + +function createSuccess() +{ + debug("createSuccess():"); + verifySuccessEvent(event); + var store = evalAndLog("store = event.result"); + var storeNames = evalAndLog("storeNames = db.objectStores"); + + shouldBeEqualToString("store.name", "storeName"); + shouldBeNull("store.keyPath"); + shouldBe("storeNames.contains('storeName')", "true"); + shouldBe("storeNames.length", "1"); + // FIXME: test store.indexNames, as well as all object store's methods. + + result = evalAndLog("store.add('value', 'key')"); + verifyResult(result); + result.onsuccess = addSuccess; + result.onerror = unexpectedErrorCallback; +} + +function addSuccess() +{ + debug("addSuccess():"); + verifySuccessEvent(event); + shouldBeEqualToString("event.result", "key"); + var store = evalAndLog("store = event.source"); + + result = evalAndLog("store.get('key')"); + verifyResult(result); + result.onsuccess = getSuccess; + result.onerror = unexpectedErrorCallback; +} + +function getSuccess() +{ + debug("getSuccess():"); + verifySuccessEvent(event); + shouldBeEqualToString("event.result", "value"); + var store = evalAndLog("store = event.source"); + + result = evalAndLog("store.remove('key')"); + verifyResult(result); + result.onsuccess = removeSuccess; + result.onerror = unexpectedErrorCallback; +} + +function removeSuccess() +{ + debug("removeSuccess():"); + verifySuccessEvent(event); + shouldBeNull("event.result"); + done(); +} + +test(); + +var successfullyParsed = true; -- cgit v1.1