| OLD | NEW | 
 | (Empty) | 
|   1 <html> |  | 
|   2 <head> |  | 
|   3 <script src="/js-test-resources/js-test.js"></script> |  | 
|   4 </head> |  | 
|   5 <body> |  | 
|   6 <iframe src="http://localhost:8000/" style=""></iframe> |  | 
|   7 <pre id="console"></pre> |  | 
|   8 <script> |  | 
|   9     window.jsTestIsAsync = true; |  | 
|  10  |  | 
|  11     description("Tests that making other frame window a prototype doesn't expose
     that window methods"); |  | 
|  12  |  | 
|  13     targetWindow = frames[0]; |  | 
|  14  |  | 
|  15     wasInvoked = false; |  | 
|  16  |  | 
|  17     function callback(global) { |  | 
|  18         global.wasInvoked = true; |  | 
|  19     } |  | 
|  20  |  | 
|  21     function check() { |  | 
|  22         shouldBeFalse('this.wasInvoked'); |  | 
|  23         finishJSTest(); |  | 
|  24     } |  | 
|  25  |  | 
|  26     var originalSetTimeout = setTimeout; |  | 
|  27     window.onload = function() { |  | 
|  28       __proto__ = targetWindow; |  | 
|  29  |  | 
|  30       shouldThrow('targetWindow.setTimeout(callback, 0, this);', '"SecurityError
    : Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross
    -origin frame."'); |  | 
|  31       shouldThrow('setTimeout.call(targetWindow, callback, 0, this);', '"Securit
    yError: Failed to execute \'setTimeout\' on \'Window\': Blocked a frame with ori
    gin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); |  | 
|  32       shouldThrow('originalSetTimeout.call(targetWindow, callback, 0, this);', '
    "SecurityError: Failed to execute \'setTimeout\' on \'Window\': Blocked a frame 
    with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); |  | 
|  33  |  | 
|  34       originalSetTimeout(check, 10); |  | 
|  35     } |  | 
|  36 </script> |  | 
|  37 </body> |  | 
|  38 </html> |  | 
| OLD | NEW |