Index: test/webkit/flatten-dictionary-structure-from-which-all-properties-were-deleted.js |
diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/flatten-dictionary-structure-from-which-all-properties-were-deleted.js |
similarity index 80% |
copy from test/webkit/concat-while-having-a-bad-time.js |
copy to test/webkit/flatten-dictionary-structure-from-which-all-properties-were-deleted.js |
index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..ccaccadd28cbbdb0c6575aa57a67cf3c0c4f1543 100644 |
--- a/test/webkit/concat-while-having-a-bad-time.js |
+++ b/test/webkit/flatten-dictionary-structure-from-which-all-properties-were-deleted.js |
@@ -22,10 +22,22 @@ |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
description( |
-"Tests the behavior of Array.prototype.concat while the array is having a bad time due to one of the elements we are concatenating." |
+"Tests that deleting all properties from an object and then flattening it doesn't cause inconsistencies." |
); |
-Object.defineProperty(Array.prototype, 0, { writable: false }); |
-shouldBe("[42].concat()", "[42]"); |
+var o = {}; |
+for (var i = 0; i < 1000; ++i) |
+ o["a" + i] = i; |
+for (var i = 0; i < 1000; ++i) |
+ delete o["a" + i]; |
+ |
+var p = {}; |
+p.__proto__ = o; |
+ |
+var q = {f:42}; |
+o.__proto__ = q; |
+ |
+for (var i = 0; i < 100; ++i) |
+ shouldBe("p.f", "42"); |