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

Side by Side Diff: content/test/data/indexeddb/write_4mb_blob.html

Issue 2855943003: Reduce the in-memory blob storgae limit on Android (Closed)
Patch Set: Fix IndexedDBBrowserTest. Created 3 years, 7 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <!-- 3 <!--
4 Copyright 2014 The Chromium Authors. All rights reserved. 4 Copyright 2017 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'; 14 var store_name = 'blobs';
15 var blob_key = 'blob_key'; 15 var blob_key = 'blob_key';
16 var blob_size = 20 * 1024 * 1024; // 20MB 16 var blob_size = 4 * 1024 * 1024; // 4MB
17 17
18 // Shared variables. 18 // Shared variables.
19 var db; 19 var db;
20 20
21 function test() { 21 function test() {
22 indexedDBTest(prepareDatabase, putBlob); 22 indexedDBTest(prepareDatabase, putBlob);
23 } 23 }
24 24
25 function prepareDatabase() { 25 function prepareDatabase() {
26 db = event.target.result; 26 db = event.target.result;
(...skipping 12 matching lines...) Expand all
39 var request = trans.objectStore(store_name).put(blob, blob_key); 39 var request = trans.objectStore(store_name).put(blob, blob_key);
40 request.onerror = unexpectedErrorCallback; 40 request.onerror = unexpectedErrorCallback;
41 } 41 }
42 42
43 </script> 43 </script>
44 </head> 44 </head>
45 <body onLoad="test()"> 45 <body onLoad="test()">
46 <div id="status">Starting...<br></div> 46 <div id="status">Starting...<br></div>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698