Index: test/webkit/fast/js/native-error-prototype.js |
diff --git a/test/webkit/array-iterate-backwards.js b/test/webkit/fast/js/native-error-prototype.js |
similarity index 70% |
copy from test/webkit/array-iterate-backwards.js |
copy to test/webkit/fast/js/native-error-prototype.js |
index 301cbd5290c9dfafcf44c22b351483aa219212f3..588deafe8dd5a12a083bc64c818a24427a4eb8f4 100644 |
--- a/test/webkit/array-iterate-backwards.js |
+++ b/test/webkit/fast/js/native-error-prototype.js |
@@ -22,34 +22,18 @@ |
// 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 bugs <a href="https://bugs.webkit.org/show_bug.cgi?id=55346">55346</a>, <a href="https://bugs.webkit.org/show_bug.cgi?id=70889">70889</a>, and <a href="https://bugs.webkit.org/show_bug.cgi?id=75452">75452</a>.' |
); |
-var bytes = new Array(); |
+shouldBe("({}).toString.call(Error.prototype)", '"[object Error]"'); |
+shouldBe("({}).toString.call(RangeError.prototype)", '"[object Error]"'); |
-function prepare(nbytes) { |
- var i = nbytes - 1; |
- while (i >= 0) { |
- bytes[i] = new Number(i); |
- i -= 1; |
- } |
-} |
+var err = new Error("message"); |
+err.name = ""; |
+shouldBe("err.toString()", '"message"'); |
-function verify(nbytes) { |
- var i = nbytes - 1; |
- while (i >= 0) { |
- if (bytes[i] != i) |
- return false; |
- i -= 1; |
- } |
- return true; |
-} |
+var err = new Error(); |
+shouldBeFalse("err.hasOwnProperty('message')"); |
-prepare(32768); |
-shouldBeTrue('verify(32768)'); |
- |
-prepare(65536); |
-shouldBeTrue('verify(65536)'); |
- |
-prepare(120000); |
-shouldBeTrue('verify(120000)'); |
+var err = new Error(undefined); |
+shouldBeFalse("err.hasOwnProperty('message')"); |