1 description("This tests that custom properties on element.dataset persist GC.");
5 if (window.GCController)
6 return GCController.collect();
8 for (var i = 0; i < 10000; i++) {
9 var s = new String("");
14 var d = document.createElement("div");
16 var dataset = d.dataset;
17 // Add a property to our prototype. It will be hidden by the corresponding data- attribute.
18 dataset.__proto__.customProperty = 1;
19 dataset.customProperty = 1; // Now set a property on ourselves.
20 shouldBe("d.getAttribute('data-custom-property')", "'1'");
21 shouldBe("d.dataset.customProperty", "'1'");
27 // Test that the custom property persisted the GC.
28 shouldBe("d.dataset.customProperty", "'1'");