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

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

Issue 1012153002: [indexeddb] Fix IndexedDBBrowserTest.ConnectionsClosedOnTabClose to retain the db. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 test() 5 function test()
6 { 6 {
7 if (document.location.hash === '#tab1') { 7 if (document.location.hash === '#tab1') {
8 prepareDatabase(function () { doSetVersion(2); }); 8 prepareDatabase(function () { doSetVersion(2); });
9 } else if (document.location.hash === '#tab2') { 9 } else if (document.location.hash === '#tab2') {
10 doSetVersion(3); 10 doSetVersion(3);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 { 42 {
43 // Open the database and try a setVersion 43 // Open the database and try a setVersion
44 var openreq = window.indexedDB.open('version-change-blocked', version); 44 var openreq = window.indexedDB.open('version-change-blocked', version);
45 openreq.onerror = unexpectedErrorCallback; 45 openreq.onerror = unexpectedErrorCallback;
46 var upgradeneededComplete = false; 46 var upgradeneededComplete = false;
47 openreq.onblocked = function(e) { 47 openreq.onblocked = function(e) {
48 result('setVersion(' + version + ') blocked'); 48 result('setVersion(' + version + ') blocked');
49 }; 49 };
50 openreq.onupgradeneeded = function(e) { 50 openreq.onupgradeneeded = function(e) {
51 openreq.transaction.oncomplete = function(e2) { 51 openreq.transaction.oncomplete = function(e2) {
52 db = openreq.result;
52 result('setVersion(' + version + ') complete'); 53 result('setVersion(' + version + ') complete');
53 }; 54 };
54 }; 55 };
55 } 56 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698