Passing tests for Debug.Object.prototype.getClass.
authorJason Orendorff <jorendorff@mozilla.com>
Fri, 06 May 2011 12:09:24 -0500
changeset 74415 930f17ad5ff1800a545d307b0d5c611950f821a3
parent 74414 4af0f2c61f899e432eb9ddb5d05267a5c1dfe729
child 74416 52446c5ddd225c2917b21f0898cc79b38241927e
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
milestone6.0a1
Passing tests for Debug.Object.prototype.getClass.
js/src/jit-test/tests/debug/Object-getClass.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/debug/Object-getClass.js
@@ -0,0 +1,19 @@
+// |jit-test| debug
+
+var g = newGlobal('new-compartment');
+var dbg = new Debug(g);
+var hits = 0;
+dbg.hooks = {
+    debuggerHandler: function (frame) {
+        var arr = frame.arguments;
+        assertEq(arr[0].getClass(), "Object");
+        assertEq(arr[1].getClass(), "Array");
+        assertEq(arr[2].getClass(), "Function");
+        assertEq(arr[3].getClass(), "Date");
+        assertEq(arr[4].getClass(), "Proxy");
+        hits++;
+    }
+};
+
+g.eval("(function () { debugger; })(Object.prototype, [], eval, new Date, Proxy.create({}));");
+assertEq(hits, 1);