Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webexposed / resources / global-constructors-attributes-worker.js
blob850eb85aa4b19c1c1f5e5794d77182f6be7ff905
1 if (this.importScripts)
2     importScripts('../../resources/js-test.js');
4 description("Test to ensure that global constructors in workers environment have the right attributes");
6 function descriptorShouldBe(object, property, expected) {
7     var test = "Object.getOwnPropertyDescriptor(" + object + ", " + property + ")";
8     if ("writable" in expected) {
9         shouldBe(test + ".value", "" + expected.value);
10         shouldBeFalse(test + ".hasOwnProperty('get')");
11         shouldBeFalse(test + ".hasOwnProperty('set')");
12     } else {
13         shouldBe(test + ".get", "" + expected.get);
14         shouldBe(test + ".set", "" + expected.set);
15         shouldBeFalse(test + ".hasOwnProperty('value')");
16         shouldBeFalse(test + ".hasOwnProperty('writable')");
17     }
18     shouldBe(test + ".enumerable", "" + expected.enumerable);
19     shouldBe(test + ".configurable", "" + expected.configurable);
22 var global = this;
24 descriptorShouldBe("global", "'DataView'", {writable: true, enumerable: false, configurable: true, value:"DataView"});
25 descriptorShouldBe("global", "'EventSource'", {writable: true, enumerable: false, configurable: true, value:"EventSource"});
26 descriptorShouldBe("global", "'FileReaderSync'", {writable: true, enumerable: false, configurable: true, value:"FileReaderSync"});
27 descriptorShouldBe("global", "'Float64Array'", {writable: true, enumerable: false, configurable: true, value:"Float64Array"});
28 descriptorShouldBe("global", "'MessageChannel'", {writable: true, enumerable: false, configurable: true, value:"MessageChannel"});
29 descriptorShouldBe("global", "'WorkerLocation'", {writable: true, enumerable: false, configurable: true, value:"WorkerLocation"});
30 descriptorShouldBe("global", "'XMLHttpRequest'", {writable: true, enumerable: false, configurable: true, value:"XMLHttpRequest"});
32 finishJSTest();