Revision b1ed161d7cffd6ba7a0ebe661b3a84aa6d533d70 authored by Anjana Sofia Vakil on 05 August 2016, 12:51:34 UTC, committed by Andreas Tolfsen on 05 August 2016, 12:51:34 UTC
Function scope is the default for Pytest fixtures (http://doc.pytest.org/en/latest/builtin.html#_pytest.python.fixture), so the `scope='function'` parameter is unnecessary.
1 parent 59f2982
FileReaderSync.worker.js
importScripts("/resources/testharness.js");
var blob, readerSync;
setup(function() {
readerSync = new FileReaderSync();
blob = new Blob(["test"]);
});
test(function() {
assert_true(readerSync instanceof FileReaderSync);
}, "Interface");
test(function() {
var text = readerSync.readAsText(blob);
assert_equals(text, "test");
}, "readAsText");
test(function() {
var data = readerSync.readAsDataURL(blob);
assert_equals(data.indexOf("data:"), 0);
}, "readAsDataURL");
test(function() {
var data = readerSync.readAsArrayBuffer(blob);
assert_true(data instanceof ArrayBuffer);
}, "readAsArrayBuffer");
done();
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...