Skip to content

Commit

Permalink
Style fixes for blobs_use_quota.html
Browse files Browse the repository at this point in the history
Review URL: https://codereview.chromium.org/795483002

Cr-Commit-Position: refs/heads/master@{#307653}
  • Loading branch information
sagarmittal authored and Commit bot committed Dec 10, 2014
1 parent ed8d413 commit ef3b866
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions content/test/data/indexeddb/blobs_use_quota.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<!DOCTYPE html>
<html>
<!--
Copyright (c) 2014 The Chromium Authors. All rights reserved.
Copyright 2014 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 blobs use space when created and free up space when deleted</title>
<script type="text/javascript" src="common.js"></script>
<script src="common.js"></script>
<script>

const store_name = 'blobs_use_space';
const blob_key = 'blob_key';
const blob_size = 20 * 1024 * 1024;
// Constants.
var store_name = 'blobs_use_space';
var blob_key = 'blob_key';
var blob_size = 20 * 1024 * 1024;

// Shared variables.
var db;
var size_initial;
var size_after_write;

Expand All @@ -22,7 +26,7 @@

function prepareDatabase() {
db = event.target.result;
objectStore = db.createObjectStore(store_name);
db.createObjectStore(store_name);
}

function getInitialSize() {
Expand All @@ -35,11 +39,11 @@
function putBlob() {
debug("Writing blob.");

var trans = db.transaction([store_name], 'readwrite');
var trans = db.transaction(store_name, 'readwrite');
trans.onabort = unexpectedAbortCallback;
trans.oncomplete = checkSizeIncreased;

var data = new Array(1+blob_size).join("X");
var data = new Array(1 + blob_size).join("X");
var blob = new Blob([data]);
var request = trans.objectStore(store_name).put(blob, blob_key);
request.onerror = unexpectedErrorCallback;
Expand All @@ -57,7 +61,7 @@

function deleteBlob() {
debug("Deleting blob.");
var trans = db.transaction([store_name], 'readwrite');
var trans = db.transaction(store_name, 'readwrite');
trans.onabort = unexpectedAbortCallback;
trans.oncomplete = checkSizeBackToInitial;

Expand Down

0 comments on commit ef3b866

Please sign in to comment.