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

Side by Side Diff: LayoutTests/storage/indexeddb/mozilla/resources/create-index-unique.js

Issue 966843002: Mark DOMStringList.contains() as deprecated, add console warning. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 3 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_create_index .html 2 // http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_create_index .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 10 matching lines...) Expand all
21 indexName = "1"; 21 indexName = "1";
22 indexKeyPath = "unique_value"; 22 indexKeyPath = "unique_value";
23 index = evalAndLog("index = objectStore.createIndex(indexName, indexKeyPath, { unique: true });"); 23 index = evalAndLog("index = objectStore.createIndex(indexName, indexKeyPath, { unique: true });");
24 shouldBe("index.name", "indexName"); 24 shouldBe("index.name", "indexName");
25 shouldBe("index.keyPath", "indexKeyPath"); 25 shouldBe("index.keyPath", "indexKeyPath");
26 shouldBe("index.unique", "true"); 26 shouldBe("index.unique", "true");
27 shouldBe("objectStore.indexNames.length", "1"); 27 shouldBe("objectStore.indexNames.length", "1");
28 28
29 foundNewlyCreatedIndex = false; 29 foundNewlyCreatedIndex = false;
30 for (var k = 0; k < objectStore.indexNames.length; k++) { 30 for (var k = 0; k < objectStore.indexNames.length; k++) {
31 if (objectStore.indexNames.item(k) == indexName) { 31 if (objectStore.indexNames[k] == indexName) {
32 foundNewlyCreatedIndex = true; 32 foundNewlyCreatedIndex = true;
33 } 33 }
34 } 34 }
35 shouldBeTrue("foundNewlyCreatedIndex"); 35 shouldBeTrue("foundNewlyCreatedIndex");
36 shouldBe("event.target.transaction.db", "db"); 36 shouldBe("event.target.transaction.db", "db");
37 shouldBe("event.target.transaction.mode", "'versionchange'"); 37 shouldBe("event.target.transaction.mode", "'versionchange'");
38 finishJSTest(); 38 finishJSTest();
39 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698