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

Unified Diff: test/mjsunit/harmony/typedarrays.js

Issue 546803003: Update ObjectToString to Harmony-draft algorithm (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add @@toStringTag to some objects + tests Created 6 years, 2 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
« test/mjsunit/es6/promises.js ('K') | « test/mjsunit/es6/promises.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/typedarrays.js
diff --git a/test/mjsunit/harmony/typedarrays.js b/test/mjsunit/harmony/typedarrays.js
index f26b0be56532ecaeb656e985ddd7410ac49a0079..eecd8920999446984d1a187020b8fe0eadefd328 100644
--- a/test/mjsunit/harmony/typedarrays.js
+++ b/test/mjsunit/harmony/typedarrays.js
@@ -52,6 +52,8 @@ function TestArrayBufferCreation() {
var ab = new ArrayBuffer();
assertSame(0, ab.byteLength);
+ assertEquals("[object ArrayBuffer]",
+ Object.prototype.toString.call(ab));
}
TestArrayBufferCreation();
@@ -123,6 +125,9 @@ function TestTypedArray(constr, elementSize, typicalElement) {
var ab = new ArrayBuffer(256*elementSize);
var a0 = new constr(30);
+ assertEquals("[object " + constr.name + "]",
+ Object.prototype.toString.call(a0));
+
assertTrue(ArrayBuffer.isView(a0));
assertSame(elementSize, a0.BYTES_PER_ELEMENT);
assertSame(30, a0.length);
« test/mjsunit/es6/promises.js ('K') | « test/mjsunit/es6/promises.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698