Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encodi...
[WebKit-https.git] / LayoutTests / fast / dom / Window / window-resize-and-move-sub-frame.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4     <script src="../../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <iframe src="blank.html"></iframe>
8 <script language="JavaScript" type="text/javascript">
9     var resetWidth;
10     var resetHeight;
11     var resetX;
12     var resetY;
13
14     function reset()
15     {
16         window.moveTo(0, 0);
17         window.resizeTo(300, 200);
18         resetWidth = window.outerWidth;
19         resetHeight = window.outerHeight;
20         resetX = window.screenX;
21         resetY = window.screenY;
22     }
23
24     if (window.testRunner)
25         testRunner.dumpAsText();
26
27     reset();
28
29     description("This tests that you can't move/resize a window by calling a move/resize on a subframe.");
30
31     // resizeTo /////////////////////////
32     debug('');
33     debug('frames[0].resizeTo Tests');
34     debug('');
35
36     frames[0].resizeTo(100, 100);
37     shouldBe('window.outerWidth', 'resetWidth');
38     shouldBe('window.outerHeight', 'resetHeight');
39     reset();
40
41     // resizeBy /////////////////////////
42     debug('');
43     debug('frames[0].resizeBy Tests');
44     debug('');
45
46     frames[0].resizeBy(100, 100);
47     shouldBe('window.outerWidth', 'resetWidth');
48     shouldBe('window.outerHeight', 'resetHeight');
49     reset();
50
51     // moveTo /////////////////////////
52     debug('');
53     debug('frames[0].moveTo Tests');
54     debug('');
55
56     frames[0].moveTo(100, 100);
57     shouldBe('window.screenX', 'resetX');
58     shouldBe('window.screenY', 'resetY');
59     reset();
60
61     // moveBy /////////////////////////
62     debug('');
63     debug('frames[0].moveBy Tests');
64     debug('');
65
66     frames[0].moveBy(100, 100);
67     shouldBe('window.screenX', 'resetX');
68     shouldBe('window.screenY', 'resetY');
69     reset();
70 </script>
71 <script src="../../js/resources/js-test-post.js"></script>
72 </body>
73 </html>