Home | History | Annotate | Download | only in indexeddb
      1 <!DOCTYPE html>
      2 <html>
      3 <!--
      4   Copyright 2013 The Chromium Authors. All rights reserved.
      5   Use of this source code is governed by a BSD-style license that can be
      6   found in the LICENSE file.
      7 -->
      8 <head>
      9 <title>IndexedDB shutdown test</title>
     10 <script type="text/javascript" src="common.js"></script>
     11 <script>
     12 function populate()
     13 {
     14   debug('Populating object store');
     15   var db = event.target.result;
     16   var store = db.createObjectStore('store');
     17   for (var i = 0; i < 100; ++i) {
     18     store.put({id: i, rand: Math.random()}, i);
     19   }
     20   // Ensure there is work being done by the back end...
     21   for (var j = 0; j < 10; ++j) {
     22     store.createIndex('idx' + j, 'rand');
     23   }
     24   // And complete the test, which will exercise IDB vs. V8 shutdown order.
     25   done();
     26 }
     27 
     28 function test() {
     29   indexedDBTest(populate);
     30 }
     31 </script>
     32 </head>
     33 <body onLoad="test()">
     34 <div id="status">Starting...</div>
     35 </body>
     36 </html>
     37