| Index: content/test/data/indexeddb/getall_max_message_size.html
|
| diff --git a/content/test/data/indexeddb/getall_max_message_size.html b/content/test/data/indexeddb/getall_max_message_size.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3b35a02bf63d453190426308bceeb5137fc6cea3
|
| --- /dev/null
|
| +++ b/content/test/data/indexeddb/getall_max_message_size.html
|
| @@ -0,0 +1,49 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<!--
|
| + Copyright 2015 The Chromium Authors. All rights reserved.
|
| + Use of this source code is governed by a BSD-style license that can be
|
| + found in the LICENSE file.
|
| +-->
|
| +<head>
|
| +<title>IDB Test that getAll() results exceeding IPC message size result in error</title>
|
| +<script src="common.js"></script>
|
| +<script>
|
| +
|
| +function test() {
|
| + indexedDBTest(prepareDatabase, runTest);
|
| +}
|
| +
|
| +function prepareDatabase(event) {
|
| + var db = event.target.result;
|
| + var store = db.createObjectStore('store');
|
| +
|
| + var ten_kilobytes = new Uint8Array(10 * 1024);
|
| +
|
| + // 20MB total; in browser tests, the message limit is 10MB
|
| + for (var i = 0; i < 2000; ++i) {
|
| + store.put(ten_kilobytes, i);
|
| + }
|
| +}
|
| +
|
| +var tx, request;
|
| +function runTest(event) {
|
| + var db = event.target.result;
|
| + tx = db.transaction('store');
|
| + request = tx.objectStore('store').getAll();
|
| +
|
| + request.onsuccess = unexpectedSuccessCallback;
|
| + request.onerror = function(e) {
|
| + shouldBeEqualToString('request.error.name', 'UnknownError');
|
| + };
|
| +
|
| + tx.oncomplete = unexpectedCompleteCallback;
|
| + tx.onabort = done;
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +<body onLoad="test()">
|
| + <div id="status">Starting...</div>
|
| +</body>
|
| +</html>
|
|
|