Index: test/webkit/fast/js/object-prototype-constructor.js |
diff --git a/test/webkit/array-iterate-backwards.js b/test/webkit/fast/js/object-prototype-constructor.js |
similarity index 72% |
copy from test/webkit/array-iterate-backwards.js |
copy to test/webkit/fast/js/object-prototype-constructor.js |
index 301cbd5290c9dfafcf44c22b351483aa219212f3..d3031ae106a4b27823bf9f22572bd0d4dbbb3c20 100644 |
--- a/test/webkit/array-iterate-backwards.js |
+++ b/test/webkit/fast/js/object-prototype-constructor.js |
@@ -22,34 +22,21 @@ |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
description( |
-"This test checks that iterating a large array backwards works correctly." |
+'This is a test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=3537">bug 3537</a>.' |
); |
-var bytes = new Array(); |
+var Foo = { Bar: function () {}}; |
+var f = new Foo.Bar(); |
+shouldBe("f.constructor", "Foo.Bar"); |
+shouldBe("typeof f.constructor", '"function"'); |
-function prepare(nbytes) { |
- var i = nbytes - 1; |
- while (i >= 0) { |
- bytes[i] = new Number(i); |
- i -= 1; |
- } |
-} |
+function F() {}; |
+var Foo2 = { Bar: F}; |
+var f2 = new Foo2.Bar(); |
+shouldBe("f2.constructor", "Foo2.Bar"); |
+shouldBe("typeof f2.constructor", '"function"'); |
-function verify(nbytes) { |
- var i = nbytes - 1; |
- while (i >= 0) { |
- if (bytes[i] != i) |
- return false; |
- i -= 1; |
- } |
- return true; |
-} |
- |
-prepare(32768); |
-shouldBeTrue('verify(32768)'); |
- |
-prepare(65536); |
-shouldBeTrue('verify(65536)'); |
- |
-prepare(120000); |
-shouldBeTrue('verify(120000)'); |
+var Foo3 = { Bar: new Function("")}; |
+var f3 = new Foo3.Bar(); |
+shouldBe("f3.constructor", "Foo3.Bar"); |
+shouldBe("typeof f3.constructor", '"function"'); |