Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: LayoutTests/storage/indexeddb/mozilla/resources/add-twice-failure.js

Issue 307653004: IndexedDB: Result of failed request should be |undefined| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // original test: 1 // original test:
2 // http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_add_twice_fa ilure.html 2 // http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_add_twice_fa ilure.html
3 // license of original test: 3 // license of original test:
4 // " Any copyright is dedicated to the Public Domain. 4 // " Any copyright is dedicated to the Public Domain.
5 // http://creativecommons.org/publicdomain/zero/1.0/ " 5 // http://creativecommons.org/publicdomain/zero/1.0/ "
6 6
7 if (this.importScripts) { 7 if (this.importScripts) {
8 importScripts('../../../../resources/js-test.js'); 8 importScripts('../../../../resources/js-test.js');
9 importScripts('../../resources/shared.js'); 9 importScripts('../../resources/shared.js');
10 } 10 }
(...skipping 16 matching lines...) Expand all
27 function addFirstSuccess() 27 function addFirstSuccess()
28 { 28 {
29 shouldBe("request.result", "key"); 29 shouldBe("request.result", "key");
30 request = evalAndLog("request = objectStore.add({}, key);"); 30 request = evalAndLog("request = objectStore.add({}, key);");
31 request.onsuccess = unexpectedSuccessCallback; 31 request.onsuccess = unexpectedSuccessCallback;
32 request.onerror = addSecondExpectedError; 32 request.onerror = addSecondExpectedError;
33 } 33 }
34 34
35 function addSecondExpectedError() 35 function addSecondExpectedError()
36 { 36 {
37 shouldBeUndefined("event.target.result");
38 shouldBeNonNull("event.target.error");
37 shouldBe("event.target.error.name", "'ConstraintError'"); 39 shouldBe("event.target.error.name", "'ConstraintError'");
38 event.preventDefault(); 40 event.preventDefault();
39 finishJSTest(); 41 finishJSTest();
40 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698