Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / script-tests / constructors-cached.js
bloba42e60d6800a898e1a3015ebe876e3ff3d85b470
1 description("This test ensures that objects with security restrictions are cached correctly");
3 var ctors = ["Image", "Option", "XMLHttpRequest", "Audio"];
5 for (var i = 0; i < ctors.length; i++) {
6 var ctor = ctors[i];
7 try {
8 // Test retrieving the object twice results in the same object
9 shouldBe(ctor, ctor);
11 // Be paranoid -- make sure that setting a property results in that property
12 // stays
13 this[ctor].testProperty = "property set successfully";
14 shouldBe(ctor + ".testProperty", '"property set successfully"');
15 } catch (e) {
16 testFailed("Testing " + ctor + " threw " + e);