GPU workaround to simulate Out of Memory errors with large textures
[chromium-blink-merge.git] / content / test / data / indexeddb / bug_109187.js
blob7d14cdb08eaf7e573152a4c6185002b1c286961c
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
3 // found in the LICENSE file.
5 function test() {
7   var DBNAME = 'multiEntry-crash-test';
8   var request = indexedDB.deleteDatabase(DBNAME);
9   request.onsuccess = function (e) {
10     request = indexedDB.open(DBNAME, 1);
11     request.onerror = unexpectedErrorCallback;
12     request.onblocked = unexpectedBlockedCallback;
13     request.onupgradeneeded = function (e) {
14       var store = db.createObjectStore('storeName');
15       window.index1 = store.createIndex('index1Name', 'prop1');
16       window.index2 = store.createIndex(
17         'index2Name', 'prop2', {multiEntry: true});
18       shouldBeFalse("window.index1.multiEntry");
19       shouldBeTrue("window.index2.multiEntry");
20       done();
21     };
22   };