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

Unified Diff: telemetry/telemetry/internal/testing/crash_extension/worker.js

Issue 2020713002: Sync FS crashy extension test Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « telemetry/telemetry/internal/testing/crash_extension/window.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/testing/crash_extension/worker.js
diff --git a/telemetry/telemetry/internal/testing/crash_extension/worker.js b/telemetry/telemetry/internal/testing/crash_extension/worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..c587f1b96dd09be01bd97077936ccf5a6c5832bb
--- /dev/null
+++ b/telemetry/telemetry/internal/testing/crash_extension/worker.js
@@ -0,0 +1,21 @@
+// Copyright 2016 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.
+
+'use strict';
+
+console.log('hello worker');
+var chromeFilesystem = webkitRequestFileSystemSync(
+ PERSISTENT, 500 * 1024 * 1024);
+try {
+ for (var i = 0; i < 1000; i++) {
+ var fileName = 'test' + i;
+ var directoryEntry = chromeFilesystem.root;
+ var fileEntry = directoryEntry.getFile(fileName, {create: true});
+ var writer = fileEntry.createWriter();
+ if ((i % 100) === 0) console.log('created:', i);
+ }
+ console.log('created all');
+} catch (ex) {
+ console.warn(ex.name, ex.message);
+}
« no previous file with comments | « telemetry/telemetry/internal/testing/crash_extension/window.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698