Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / frame-deep-nested-resize.html
blob4abfa1de15629aad99d3f346d58bad4689a13c55
1 <html>
2 <head>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 function log(frame, success, isWidth, size) {
8 if (window.testRunner) {
9 alert(frame.name + ' resized correctly = ' + (success ? 'true' : 'false'));
10 } else {
11 frame.document.close();
12 if (success)
13 frame.document.write('<p>Success!</p>');
14 else {
15 var rect = frame.frameElement.getBoundingClientRect();
16 frame.document.write('<p>Resize until ');
17 frame.document.write(isWidth ? 'width:' : 'height:');
18 frame.document.write(isWidth ? rect.width : rect.height);
19 frame.document.write(' = ' + size + '</p>');
24 function checkProgress() {
25 if (!window.testRunner)
26 checkSuccess();
29 function init() {
30 if (window.testRunner) {
31 //Move the One/* vertical resizer ten pixels west...
32 eventSender.mouseMoveTo(90, 400);
33 eventSender.mouseDown();
34 eventSender.mouseMoveTo(100, 400);
35 eventSender.mouseUp();
37 //Move the Two/Three horizontal resizer ten pixels south...
38 eventSender.mouseMoveTo(400, 70);
39 eventSender.mouseDown();
40 eventSender.mouseMoveTo(400, 80);
41 eventSender.mouseUp();
43 //Move the Three/Four horizontal resizer ten pixels south...
44 eventSender.mouseMoveTo(400, 126);
45 eventSender.mouseDown();
46 eventSender.mouseMoveTo(400, 136);
47 eventSender.mouseUp();
49 //Move the Four/Five horizontal resizer ten pixels south...
50 eventSender.mouseMoveTo(400, 275);
51 eventSender.mouseDown();
52 eventSender.mouseMoveTo(400, 285);
53 eventSender.mouseUp();
55 //Move the Five/Six horizontal resizer ten pixels south...
56 eventSender.mouseMoveTo(400, 392);
57 eventSender.mouseDown();
58 eventSender.mouseMoveTo(400, 402);
59 eventSender.mouseUp();
61 //Move the Six/Seven vertical resizer 200 pixels east...
62 eventSender.mouseMoveTo(788, 400);
63 eventSender.mouseDown();
64 eventSender.mouseMoveTo(588, 400);
65 eventSender.mouseUp();
67 //Move the Seven/Eight vertical resizer 100 pixels east...
68 eventSender.mouseMoveTo(794, 400);
69 eventSender.mouseDown();
70 eventSender.mouseMoveTo(694, 400);
71 eventSender.mouseUp();
73 checkSuccess();
74 } else {
75 checkProgress();
78 function checkSuccess() {
79 log(One, One.frameElement.getBoundingClientRect().width == 100, true, 100)
80 log(Two, Two.frameElement.getBoundingClientRect().height == 80, false, 80)
81 log(Three, Three.frameElement.getBoundingClientRect().height == 50, false, 50)
82 log(Four, Four.frameElement.getBoundingClientRect().height == 143, false, 143)
83 log(Five, Five.frameElement.getBoundingClientRect().height == 111, false, 111)
84 log(Six, Six.frameElement.getBoundingClientRect().height == 192, false, 192)
85 log(Seven, Seven.frameElement.getBoundingClientRect().width == 100, true, 100)
86 log(Eight, Eight.frameElement.getBoundingClientRect().width == 100, true, 100)
89 window.onload = init;
90 </script>
91 </head>
92 <frameset cols='90,*' onmousemove="checkProgress()" onmouseup="checkProgress()" onmousedown="checkProgress()">
93 <frame framemargin=0 frameborder=1 name="One" framespacing=1 />
94 <frameset rows='70,50,*' onmousemove="checkProgress()" onmouseup="checkProgress()" onmousedown="checkProgress()">
95 <frame framemargin=0 frameborder=1 name="Two" framespacing=1 />
96 <frame framemargin=0 frameborder=1 name="Three" framespacing=1 />
97 <frameset cols='*,0,0' onmousemove="checkProgress()" onmouseup="checkProgress()" onmousedown="checkProgress()">
98 <frameset rows='30%,25%,*' onmousemove="checkProgress()" onmouseup="checkProgress()" onmousedown="checkProgress()">
99 <frame framemargin=0 frameborder=1 name="Four" framespacing=1 />
100 <frame framemargin=0 frameborder=1 name="Five" framespacing=1 />
101 <frame framemargin=0 frameborder=1 name="Six" framespacing=1 />
102 </frameset>
103 <frame framemargin=0 frameborder=1 name="Seven" framespacing=1 />
104 <frame framemargin=0 frameborder=1 name="Eight" framespacing=1 />
105 </frameset>
106 </frameset>
107 </frameset>
108 </html>