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

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

Issue 924033003: IndexedDB: Ensure that blobs in unused prefetches are acked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « content/child/indexed_db/webidbcursor_impl.cc ('k') | 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <!--
4 Copyright 2015 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>IDB Test that unused cursor prefetches are acked back to browser process< /title>
10 <script src="common.js"></script>
11 <script>
12
13 // Constants.
14 var store_name = 'blobs_ack';
cmumford 2015/02/17 18:13:49 Are we guaranteed this name won't collide with the
jsbell 2015/02/17 18:15:11 We should not be preserving state across tests, bu
15 var kNumToFetch = 15; // Enough to trigger prefetch, but not on a batch boundary .
16
17 // Shared variables.
18 var db;
19
20 function test() {
21 indexedDBTest(prepareDatabase, iterateCursor);
22 }
23
24 function prepareDatabase() {
25 db = event.target.result;
26 var store = db.createObjectStore(store_name);
27 for (var i = 0; i < kNumToFetch + 10; ++i)
28 store.put(new Blob([String(i)]), i);
29 }
30
31 function iterateCursor() {
32 var tx = db.transaction(store_name, 'readonly');
33 var count = kNumToFetch;
34 var request = tx.objectStore(store_name).openCursor();
35 request.onerror = unexpectedErrorCallback;
36 request.onsuccess = function() {
37 if (--count > 0)
38 request.result.continue();
39 };
40 tx.onabort = unexpectedAbortCallback;
41 tx.oncomplete = onComplete;
42 }
43
44 function onComplete() {
45 gc();
46 done();
47 }
48
49 </script>
50 </head>
51 <body onLoad="test()">
52 <div id="status">Starting...<br>
53 <p>Run this test with --js-flags=--expose-gc when run from Chrome.</p>
54 </div>
55 </body>
56 </html>
OLDNEW
« no previous file with comments | « content/child/indexed_db/webidbcursor_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698