Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Unified Diff: test/webkit/fast/js/native-error-prototype.js

Issue 20280003: Migrate more tests from blink repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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')");
« no previous file with comments | « test/webkit/fast/js/modify-non-references-expected.txt ('k') | test/webkit/fast/js/native-error-prototype-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698