OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <!-- | 3 <!-- |
4 Copyright 2014 The Chromium Authors. All rights reserved. | 4 Copyright 2014 The Chromium Authors. All rights reserved. |
5 Use of this source code is governed by a BSD-style license that can be | 5 Use of this source code is governed by a BSD-style license that can be |
6 found in the LICENSE file. | 6 found in the LICENSE file. |
7 --> | 7 --> |
8 <head> | 8 <head> |
9 <title>IDB Test that blobs use space when created and free up space when deleted
</title> | 9 <title>IDB Test that blobs use space when created and free up space when deleted
</title> |
10 <script src="common.js"></script> | 10 <script src="common.js"></script> |
11 <script> | 11 <script> |
12 | 12 |
13 // Constants. | 13 // Constants. |
14 var store_name = 'blobs_use_space'; | 14 var store_name = 'blobs_use_space'; |
15 var blob_key = 'blob_key'; | 15 var blob_key = 'blob_key'; |
16 var blob_size = 20 * 1024 * 1024; | 16 var blob_size = 4 * 1024 * 1024; |
17 | 17 |
18 // Shared variables. | 18 // Shared variables. |
19 var db; | 19 var db; |
20 var size_initial; | 20 var size_initial; |
21 var size_after_write; | 21 var size_after_write; |
22 | 22 |
23 function test() { | 23 function test() { |
24 indexedDBTest(prepareDatabase, getInitialSize); | 24 indexedDBTest(prepareDatabase, getInitialSize); |
25 } | 25 } |
26 | 26 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 var m = k / 1024; | 94 var m = k / 1024; |
95 return bytes + " (" + k + "k) (" + m + "m)"; | 95 return bytes + " (" + k + "k) (" + m + "m)"; |
96 } | 96 } |
97 | 97 |
98 </script> | 98 </script> |
99 </head> | 99 </head> |
100 <body onLoad="test()"> | 100 <body onLoad="test()"> |
101 <div id="status">Starting...<br></div> | 101 <div id="status">Starting...<br></div> |
102 </body> | 102 </body> |
103 </html> | 103 </html> |
OLD | NEW |