summaryrefslogtreecommitdiffstats
path: root/V8Binding/v8/test/mjsunit
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2009-08-28 12:56:47 +0100
committerAndrei Popescu <andreip@google.com>2009-08-28 12:56:47 +0100
commit3c8aa761f02fba434a444f6ed068375f6e4fbc0e (patch)
treecda851baed3a24c515a73525c802689788916f5f /V8Binding/v8/test/mjsunit
parent8e008b4b8cd6aff82cb9a9705e13a637285c705d (diff)
downloadexternal_webkit-3c8aa761f02fba434a444f6ed068375f6e4fbc0e.zip
external_webkit-3c8aa761f02fba434a444f6ed068375f6e4fbc0e.tar.gz
external_webkit-3c8aa761f02fba434a444f6ed068375f6e4fbc0e.tar.bz2
Update V8 to 2780 to fix a crash and pick up some ARM optimizations
Diffstat (limited to 'V8Binding/v8/test/mjsunit')
-rw-r--r--V8Binding/v8/test/mjsunit/date-parse.js4
-rw-r--r--V8Binding/v8/test/mjsunit/debug-stepin-constructor.js4
-rw-r--r--V8Binding/v8/test/mjsunit/mjsunit.status2
-rwxr-xr-xV8Binding/v8/test/mjsunit/simple-constructor.js66
4 files changed, 71 insertions, 5 deletions
diff --git a/V8Binding/v8/test/mjsunit/date-parse.js b/V8Binding/v8/test/mjsunit/date-parse.js
index bb7ecd2..4bbb2c6 100644
--- a/V8Binding/v8/test/mjsunit/date-parse.js
+++ b/V8Binding/v8/test/mjsunit/date-parse.js
@@ -250,8 +250,8 @@ testCasesMisc.forEach(testDateParseMisc);
// Test that we can parse our own date format.
-// (Dates from 1970 to ~2070 with 95h steps.)
-for (var i = 0; i < 24 * 365 * 100; i += 95) {
+// (Dates from 1970 to ~2070 with 150h steps.)
+for (var i = 0; i < 24 * 365 * 100; i += 150) {
var ms = i * (3600 * 1000);
var s = (new Date(ms)).toString();
assertEquals(ms, Date.parse(s), "parse own: " + s);
diff --git a/V8Binding/v8/test/mjsunit/debug-stepin-constructor.js b/V8Binding/v8/test/mjsunit/debug-stepin-constructor.js
index 6dbe5d1..6ee3347 100644
--- a/V8Binding/v8/test/mjsunit/debug-stepin-constructor.js
+++ b/V8Binding/v8/test/mjsunit/debug-stepin-constructor.js
@@ -59,6 +59,10 @@ function f() {
break_break_point_hit_count = 0;
f();
assertEquals(5, break_break_point_hit_count);
+f();
+assertEquals(10, break_break_point_hit_count);
+f();
+assertEquals(15, break_break_point_hit_count);
// Test step into constructor with builtin constructor.
function g() {
diff --git a/V8Binding/v8/test/mjsunit/mjsunit.status b/V8Binding/v8/test/mjsunit/mjsunit.status
index 4bf67e8..6ac4938 100644
--- a/V8Binding/v8/test/mjsunit/mjsunit.status
+++ b/V8Binding/v8/test/mjsunit/mjsunit.status
@@ -52,7 +52,7 @@ debug-evaluate-recursive: CRASH || FAIL
debug-changebreakpoint: CRASH || FAIL
debug-clearbreakpoint: CRASH || FAIL
debug-clearbreakpointgroup: PASS, FAIL if $mode == debug
-debug-conditional-breakpoints: FAIL
+debug-conditional-breakpoints: CRASH || FAIL
debug-evaluate: CRASH || FAIL
debug-ignore-breakpoints: CRASH || FAIL
debug-multiple-breakpoints: CRASH || FAIL
diff --git a/V8Binding/v8/test/mjsunit/simple-constructor.js b/V8Binding/v8/test/mjsunit/simple-constructor.js
index b26d651..e9ae921 100755
--- a/V8Binding/v8/test/mjsunit/simple-constructor.js
+++ b/V8Binding/v8/test/mjsunit/simple-constructor.js
@@ -53,9 +53,11 @@ function f4(x) {
}
o1_1 = new f1();
+assertEquals(1, o1_1.x, "1");
o1_2 = new f1();
-assertArrayEquals(["x"], props(o1_1));
-assertArrayEquals(["x"], props(o1_2));
+assertEquals(1, o1_1.x, "2");
+assertArrayEquals(["x"], props(o1_1), "3");
+assertArrayEquals(["x"], props(o1_2), "4");
o2_1 = new f2(0);
o2_2 = new f2(0);
@@ -76,3 +78,63 @@ o4_1_1 = new f4(1);
o4_1_2 = new f4(1);
assertArrayEquals(["x", "y"], props(o4_1_1));
assertArrayEquals(["x", "y"], props(o4_1_2));
+
+function f5(x, y) {
+ this.x = x;
+ this.y = y;
+}
+
+function f6(x, y) {
+ this.y = y;
+ this.x = x;
+}
+
+function f7(x, y, z) {
+ this.x = x;
+ this.y = y;
+}
+
+function testArgs(fun) {
+ obj = new fun();
+ assertArrayEquals(["x", "y"], props(obj));
+ assertEquals(void 0, obj.x);
+ assertEquals(void 0, obj.y);
+
+ obj = new fun("x");
+ assertArrayEquals(["x", "y"], props(obj));
+ assertEquals("x", obj.x);
+ assertEquals(void 0, obj.y);
+
+ obj = new fun("x", "y");
+ assertArrayEquals(["x", "y"], props(obj));
+ assertEquals("x", obj.x);
+ assertEquals("y", obj.y);
+
+ obj = new fun("x", "y", "z");
+ assertArrayEquals(["x", "y"], props(obj));
+ assertEquals("x", obj.x);
+ assertEquals("y", obj.y);
+}
+
+for (var i = 0; i < 10; i++) {
+ testArgs(f5);
+ testArgs(f6);
+ testArgs(f7);
+}
+
+function g(){
+ this.x=1
+}
+
+o = new g();
+assertEquals(1, o.x);
+o = new g();
+assertEquals(1, o.x);
+g.prototype = {y:2}
+o = new g();
+assertEquals(1, o.x);
+assertEquals(2, o.y);
+o = new g();
+assertEquals(1, o.x);
+assertEquals(2, o.y);
+