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

Side by Side Diff: LayoutTests/imported/web-platform-tests/FileAPI/FileReaderSync.worker.js

Issue 1236713002: Import FileAPI tests from web-platform-tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh, stupid baselines Created 5 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 importScripts("/resources/testharness.js");
2
3 var blob, readerSync;
4 setup(function() {
5 readerSync = new FileReaderSync();
6 blob = new Blob(["test"]);
7 });
8
9 test(function() {
10 assert_true(readerSync instanceof FileReaderSync);
11 }, "Interface");
12
13 test(function() {
14 var text = readerSync.readAsText(blob);
15 assert_equals(text, "test");
16 }, "readAsText");
17
18 test(function() {
19 var data = readerSync.readAsDataURL(blob);
20 assert_equals(data.indexOf("data:"), 0);
21 }, "readAsDataURL");
22
23 test(function() {
24 var data = readerSync.readAsArrayBuffer(blob);
25 assert_true(data instanceof ArrayBuffer);
26 }, "readAsArrayBuffer");
27
28 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698