2 "Tests that having a bad time has correct cross frame behavior, if an instance object is created in a different global object than the affected prototype."
6 testRunner
.waitUntilDone();
17 for (var i
= 0; i
< 10; i
+=2)
22 for (var i
= 0; i
< 10; i
+=2)
23 Cons
.prototype.__defineSetter__(i
+ 1, function() { ouches
++; });
27 for (var i
= 0; i
< 10; i
+=2)
32 var string
= Array
.prototype.join
.apply(array
, [","]);
33 debug("Array is: " + string
);
34 if (string
== "42,,42,,42,,42,,42,")
35 testPassed("Array has holes in odd numbered entries.");
37 testFailed("Array does not have the required holes.");
40 testPassed("Got 5 ouches.");
42 testFailed("Did not get 5 ouches. Got " + ouches
+ " + instead.");
45 testRunner
.notifyDone();
48 var frame
= document
.getElementById("myframe");
50 frame
.contentDocument
.open();
51 frame
.contentDocument
.write(
52 "<!DOCTYPE html>\n<html><body><script type=\"text/javascript\">\n" +
53 "window.parent.Cons.prototype = {};\n" +
54 "window.parent.foo();\n" +
55 "window.parent.evil();\n" +
56 "window.parent.bar();\n" +
57 "window.parent.done();\n" +
58 "</script></body></html>");
59 frame
.contentDocument
.close();