X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=LayoutTests%2Ffast%2Fjs%2Fscript-tests%2Fnative-error-prototype.js;h=4da02ec580e85ac709e010fc981df8d872be18b6;hp=5acac258f64ef96ee0f0edb2739d610d097af434;hb=0086c792d7f354c04c4965fb136d3ee90a71098e;hpb=20bf79568560e07c593fbfe098192f9a98f2a89f diff --git a/LayoutTests/fast/js/script-tests/native-error-prototype.js b/LayoutTests/fast/js/script-tests/native-error-prototype.js index 5acac258f64e..4da02ec580e8 100644 --- a/LayoutTests/fast/js/script-tests/native-error-prototype.js +++ b/LayoutTests/fast/js/script-tests/native-error-prototype.js @@ -1,6 +1,16 @@ description( -'This is a test case for bug 55346.' +'This is a test case for bugs 55346, 70889, and 75452.' ); shouldBe("({}).toString.call(Error.prototype)", '"[object Error]"'); shouldBe("({}).toString.call(RangeError.prototype)", '"[object Error]"'); + +var err = new Error("message"); +err.name = ""; +shouldBe("err.toString()", '"message"'); + +var err = new Error(); +shouldBeFalse("err.hasOwnProperty('message')"); + +var err = new Error(undefined); +shouldBeFalse("err.hasOwnProperty('message')");