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

Unified Diff: LayoutTests/fast/files/workers/worker-read-file-constructor-async.html

Issue 100023005: Make cloning of File objects more useful. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reupload Created 7 years 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
Index: LayoutTests/fast/files/workers/worker-read-file-constructor-async.html
diff --git a/LayoutTests/fast/files/workers/worker-read-file-constructor-async.html b/LayoutTests/fast/files/workers/worker-read-file-constructor-async.html
new file mode 100644
index 0000000000000000000000000000000000000000..a191070fb7a3fe674560d88024d34be8039a4360
--- /dev/null
+++ b/LayoutTests/fast/files/workers/worker-read-file-constructor-async.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<html>
+<body>
+<pre id='console'></pre>
+<script src="../resources/setup-for-read-common.js"></script>
+<script>
+var testConstructedFileList = [
+ { 'name': 'text-file',
+ 'contents': ['This is just', ' some text'],
+ 'type': 'text/plain' },
+ { 'name': 'empty-file',
+ 'contents': [],
+ 'type' : 'text/plain',
+ 'modified' : 20000},
+ { 'name': 'array-buffer',
+ 'contents': [(new Uint8Array([1,2,3,4,5])).buffer],
+ 'type' : 'application/octet-stream',
+ 'modified' : new Date("2010-01-01T12:13:24Z")},
+];
+
+function startTest()
+{
+ log('Reading the cloned contents of Files constructed programmatically.');
+ testFiles = testConstructedFileList.map(function(f) {
+ return new File(f.contents, f.name, {type: f.type, lastModified: f.modified || 0});
+ });
+ startWorker(testFiles, "resources/worker-read-file-constructor-async.js");
+}
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+startTest();
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698