| Index: LayoutTests/storage/indexeddb/lazy-index-population.html
|
| diff --git a/LayoutTests/storage/indexeddb/lazy-index-population.html b/LayoutTests/storage/indexeddb/lazy-index-population.html
|
| index aae18ab543b3148e9dd5c2c2bb2506f08400d853..0285a8e189380535fc2ba80918bb5af1f28959f3 100644
|
| --- a/LayoutTests/storage/indexeddb/lazy-index-population.html
|
| +++ b/LayoutTests/storage/indexeddb/lazy-index-population.html
|
| @@ -33,12 +33,15 @@ function verifyPreExistingIndex()
|
| request2.onerror = function () {
|
| debug("request2 received error event");
|
| shouldBe("++state", "2");
|
| + waitForError(/ConstraintError/, function() {
|
| + shouldBe("++state", "3");
|
| + });
|
| };
|
|
|
| trans.oncomplete = unexpectedCompleteCallback;
|
| trans.onabort = function () {
|
| debug("transaction aborted");
|
| - shouldBe("++state", "3");
|
| + shouldBe("++state", "4");
|
| shouldBe("trans.error.name", "'ConstraintError'");
|
| verifyCreateThenPut();
|
| };
|
| @@ -76,19 +79,24 @@ function verifyCreateThenPut()
|
| request2.onerror = function () {
|
| debug("request2 (index2) received error event");
|
| shouldBe("++state", "2");
|
| + waitForError(/ConstraintError/, function() {
|
| + shouldBe("++state", "3");
|
| + });
|
| };
|
|
|
| trans.oncomplete = unexpectedCompleteCallback;
|
| trans.onabort = function () {
|
| debug("transaction aborted");
|
| - shouldBe("++state", "3");
|
| + shouldBe("++state", "4");
|
| shouldBe("trans.error.name", "'ConstraintError'");
|
| };
|
| };
|
| }
|
|
|
| -function verifyPutThenCreate()
|
| +function verifyPutThenCreate(evt)
|
| {
|
| + evt.preventDefault();
|
| +
|
| debug("");
|
| debug("Verify that uniqueness constraints are enforced when index is created after puts:");
|
|
|
| @@ -129,8 +137,10 @@ function verifyPutThenCreate()
|
| };
|
| }
|
|
|
| -function verifyPutThenCreateThenPut()
|
| +function verifyPutThenCreateThenPut(evt)
|
| {
|
| + evt.preventDefault();
|
| +
|
| debug("");
|
| debug("Verify that uniqueness constraints are enforced when index is created between puts:");
|
|
|
| @@ -160,12 +170,15 @@ function verifyPutThenCreateThenPut()
|
| request2.onerror = function () {
|
| debug("request2 received error event");
|
| shouldBe("++state", "2");
|
| + waitForError(/ConstraintError/, function() {
|
| + shouldBe("++state", "3");
|
| + });
|
| };
|
|
|
| trans.oncomplete = unexpectedCompleteCallback;
|
| trans.onabort = function () {
|
| debug("transaction aborted");
|
| - shouldBe("++state", "3");
|
| + shouldBe("++state", "4");
|
| shouldBe("trans.error.name", "'ConstraintError'");
|
| };
|
| };
|
|
|