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

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

Issue 10826159: Browser test for migrating from schema v0 to v1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: data files already committed Created 8 years, 4 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 debug(message) 5 function debug(message)
6 { 6 {
7 var span = document.createElement("span"); 7 var span = document.createElement("span");
8 span.appendChild(document.createTextNode(message)); 8 span.appendChild(document.createTextNode(message));
9 span.appendChild(document.createElement("br")); 9 span.appendChild(document.createElement("br"));
10 document.getElementById('status').appendChild(span); 10 document.getElementById('status').appendChild(span);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 function unexpectedCompleteCallback() 45 function unexpectedCompleteCallback()
46 { 46 {
47 fail('unexpectedCompleteCallback'); 47 fail('unexpectedCompleteCallback');
48 } 48 }
49 49
50 function unexpectedErrorCallback() 50 function unexpectedErrorCallback()
51 { 51 {
52 fail('unexpectedErrorCallback'); 52 fail('unexpectedErrorCallback');
53 } 53 }
54 54
55 function unexpectedBlockedCallback()
56 {
57 fail('unexpectedBlockedCallback');
58 }
59
55 function deleteAllObjectStores(db) 60 function deleteAllObjectStores(db)
56 { 61 {
57 objectStoreNames = db.objectStoreNames; 62 objectStoreNames = db.objectStoreNames;
58 for (var i = 0; i < objectStoreNames.length; ++i) 63 for (var i = 0; i < objectStoreNames.length; ++i)
59 db.deleteObjectStore(objectStoreNames[i]); 64 db.deleteObjectStore(objectStoreNames[i]);
60 } 65 }
61 66
62 // The following functions are based on 67 // The following functions are based on
63 // WebKit/LayoutTests/fast/js/resources/js-test-pre.js 68 // WebKit/LayoutTests/fast/js/resources/js-test-pre.js
64 // so that the tests will look similar to the existing layout tests. 69 // so that the tests will look similar to the existing layout tests.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 114
110 function shouldBeTrue(_a) { shouldBe(_a, "true"); } 115 function shouldBeTrue(_a) { shouldBe(_a, "true"); }
111 function shouldBeFalse(_a) { shouldBe(_a, "false"); } 116 function shouldBeFalse(_a) { shouldBe(_a, "false"); }
112 function shouldBeNaN(_a) { shouldBe(_a, "NaN"); } 117 function shouldBeNaN(_a) { shouldBe(_a, "NaN"); }
113 function shouldBeNull(_a) { shouldBe(_a, "null"); } 118 function shouldBeNull(_a) { shouldBe(_a, "null"); }
114 function shouldBeEqualToString(a, b) 119 function shouldBeEqualToString(a, b)
115 { 120 {
116 var unevaledString = '"' + b.replace(/\\/g, "\\\\").replace(/"/g, "\"") + '"'; 121 var unevaledString = '"' + b.replace(/\\/g, "\\\\").replace(/"/g, "\"") + '"';
117 shouldBe(a, unevaledString); 122 shouldBe(a, unevaledString);
118 } 123 }
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_browsertest.cc ('k') | content/test/data/indexeddb/migration_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698