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

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

Issue 1321583002: IndexedDB: Make getAll() requests fail if result exceeds IPC limits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename constant Created 5 years, 3 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/common/indexed_db/indexed_db_constants.h ('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 getAll() results exceeding IPC message size result in error </title>
10 <script src="common.js"></script>
11 <script>
12
13 function test() {
14 indexedDBTest(prepareDatabase, runTest);
15 }
16
17 function prepareDatabase(event) {
18 var db = event.target.result;
19 var store = db.createObjectStore('store');
20
21 var ten_kilobytes = new Uint8Array(10 * 1024);
22
23 // 20MB total; in browser tests, the message limit is 10MB
24 for (var i = 0; i < 2000; ++i) {
25 store.put(ten_kilobytes, i);
26 }
27 }
28
29 var tx, request;
30 function runTest(event) {
31 var db = event.target.result;
32 tx = db.transaction('store');
33 request = tx.objectStore('store').getAll();
34
35 request.onsuccess = unexpectedSuccessCallback;
36 request.onerror = function(e) {
37 shouldBeEqualToString('request.error.name', 'UnknownError');
38 };
39
40 tx.oncomplete = unexpectedCompleteCallback;
41 tx.onabort = done;
42 }
43
44 </script>
45 </head>
46 <body onLoad="test()">
47 <div id="status">Starting...</div>
48 </body>
49 </html>
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db_constants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698