mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 738912 - Part 2: Add tests. r=sicking
This commit is contained in:
parent
cdc32afaa3
commit
dbd4f0bed5
@ -63,6 +63,22 @@ ok(false, "NOT REACHED");
|
||||
ok(true, "an undefined options member should throw");
|
||||
}
|
||||
|
||||
/** Test for dictionary initialization order **/
|
||||
(function() {
|
||||
var o = {};
|
||||
var p = {type: "text/plain", endings: "transparent"};
|
||||
var called = [];
|
||||
function add_to_called(n) {
|
||||
called.push(n);
|
||||
return p[n];
|
||||
}
|
||||
["type", "endings"].forEach(function(n) {
|
||||
Object.defineProperty(o, n, { get: add_to_called.bind(null, n) });
|
||||
});
|
||||
var b = new Blob([], o);
|
||||
is(JSON.stringify(called), JSON.stringify(["endings", "type"]), "dictionary members should be get in lexicographical order");
|
||||
})();
|
||||
|
||||
let blob1 = Blob(["squiggle"]);
|
||||
ok(blob1 instanceof Blob, "Blob constructor should produce Blobs");
|
||||
ok(!(blob1 instanceof File), "Blob constructor should not produce Files");
|
||||
|
Loading…
Reference in New Issue
Block a user