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

Side by Side Diff: chrome/test/data/indexeddb/perf_test.js

Issue 10826291: Add url filter to idb perf tests (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 | « no previous file | 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var overallTestStartTime = Date.now(); 5 var overallTestStartTime = Date.now();
6 var kUseIndex = true; 6 var kUseIndex = true;
7 var kDontUseIndex = false; 7 var kDontUseIndex = false;
8 var kReadKeysOnly = true; 8 var kReadKeysOnly = true;
9 var kReadDataToo = false; 9 var kReadDataToo = false;
10 var kWriteToo = true; 10 var kWriteToo = true;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 [testCreateAndDeleteIndex, 5000] 82 [testCreateAndDeleteIndex, 5000]
83 ]; 83 ];
84 84
85 var currentTest = 0; 85 var currentTest = 0;
86 86
87 function test() { 87 function test() {
88 runNextTest(); 88 runNextTest();
89 } 89 }
90 90
91 function runNextTest() { 91 function runNextTest() {
92 if (currentTest < tests.length) { 92 var filter = window.location.hash.slice(1);
93 do {
93 var test = tests[currentTest++].slice(); 94 var test = tests[currentTest++].slice();
94 var f = test.shift(); 95 var f = test.shift();
96 } while (currentTest < tests.length &&
97 filter && f.name != filter)
98
99 if (currentTest < tests.length) {
95 test.push(runNextTest); 100 test.push(runNextTest);
96 f.apply(null, test); 101 f.apply(null, test);
97 } else { 102 } else {
98 onAllTestsComplete(); 103 onAllTestsComplete();
99 } 104 }
100 } 105 }
101 106
102 function onAllTestsComplete() { 107 function onAllTestsComplete() {
103 var overallDuration = Date.now() - overallTestStartTime; 108 var overallDuration = Date.now() - overallTestStartTime;
104 automation.addResult("OverallTestDuration", overallDuration); 109 automation.addResult("OverallTestDuration", overallDuration);
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 433
429 var mode = "readonly"; 434 var mode = "readonly";
430 if (numWritesPerTransaction) 435 if (numWritesPerTransaction)
431 mode = "readwrite"; 436 mode = "readwrite";
432 437
433 var transaction = getTransaction(db, objectStoreNames, mode, batchComplete); 438 var transaction = getTransaction(db, objectStoreNames, mode, batchComplete);
434 putRandomValues(transaction, objectStoreNames, numWritesPerTransaction, 439 putRandomValues(transaction, objectStoreNames, numWritesPerTransaction,
435 numKeys); 440 numKeys);
436 } 441 }
437 } 442 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698