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

Side by Side Diff: content/test/data/indexeddb/open_missing_table.js

Issue 401893002: IndexedDB: Stop using webkit-prefixed versions of APIs in tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More webkitIndexedDB foo and update webkitErrorMessage use too Created 6 years, 5 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
« no previous file with comments | « content/test/data/indexeddb/open_bad_db.js ('k') | content/test/data/indexeddb/quota_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function test() { 5 function test() {
6 request = webkitIndexedDB.open('database-basics'); 6 request = indexedDB.open('database-basics');
7 request.onupgradeneeded = upgradeNeeded; 7 request.onupgradeneeded = upgradeNeeded;
8 request.onsuccess = onSuccess; 8 request.onsuccess = onSuccess;
9 request.onerror = unexpectedErrorCallback; 9 request.onerror = unexpectedErrorCallback;
10 request.onblocked = unexpectedBlockedCallback; 10 request.onblocked = unexpectedBlockedCallback;
11 } 11 }
12 12
13 var gotUpgradeNeeded = false; 13 var gotUpgradeNeeded = false;
14 function upgradeNeeded(evt) { 14 function upgradeNeeded(evt) {
15 event = evt; 15 event = evt;
16 shouldBe("event.dataLoss", "'total'"); 16 shouldBe("event.dataLoss", "'total'");
17 shouldBe("event.dataLossMessage", "'missing files'"); 17 shouldBe("event.dataLossMessage", "'missing files'");
18 gotUpgradeNeeded = true; 18 gotUpgradeNeeded = true;
19 } 19 }
20 20
21 function onSuccess(event) { 21 function onSuccess(event) {
22 db = event.target.result; 22 db = event.target.result;
23 debug("The pre-existing leveldb has an objectStore in 'database-basics',"); 23 debug("The pre-existing leveldb has an objectStore in 'database-basics',");
24 debug("ensure that it was blown away"); 24 debug("ensure that it was blown away");
25 shouldBe("db.objectStoreNames.length", "0"); 25 shouldBe("db.objectStoreNames.length", "0");
26 debug("We should have gotten an upgradeneeded event because the new empty"); 26 debug("We should have gotten an upgradeneeded event because the new empty");
27 debug("database doesn't have a version."); 27 debug("database doesn't have a version.");
28 shouldBeTrue("gotUpgradeNeeded"); 28 shouldBeTrue("gotUpgradeNeeded");
29 done(); 29 done();
30 } 30 }
OLDNEW
« no previous file with comments | « content/test/data/indexeddb/open_bad_db.js ('k') | content/test/data/indexeddb/quota_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698