OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>frameElement.width, frameElement.height</title> | 3 <title>frameElement.width, frameElement.height</title> |
4 | 4 <script> |
| 5 if (window.testRunner) { |
| 6 testRunner.dumpAsText(); |
| 7 testRunner.waitUntilDone(); |
| 8 } |
| 9 </script> |
5 <frameset id="frameset" border="1" cols="50%,25%,25%" style='border: solid 1px;
'> | 10 <frameset id="frameset" border="1" cols="50%,25%,25%" style='border: solid 1px;
'> |
6 <frame name="frame2" src="about:blank"> | 11 <frame name="frame2" src="about:blank"> |
7 <frame name="frame1" src="javascript: | 12 <frame name="frame1" src="javascript: |
8 function log(s) | 13 function log(s) |
9 { | 14 { |
10 if (window.testRunner) | 15 if (window.testRunner) |
11 alert(s); | 16 alert(s); |
12 else | 17 else |
13 top.frame1.document.write('<p>' + s + '</p>'); | 18 top.frame1.document.write('<p>' + s + '</p>'); |
14 } | 19 } |
15 | 20 |
16 if (window.testRunner) | 21 |
17 testRunner.dumpAsText(); | |
18 | |
19 top.frame1.document.write('<p>Test for the presence of frameElement.width an
d frameElement.height <a href=\'https://bugs.webkit.org/show_bug.cgi?id=6402\'>(
bug 6402)</a></p>'); | 22 top.frame1.document.write('<p>Test for the presence of frameElement.width an
d frameElement.height <a href=\'https://bugs.webkit.org/show_bug.cgi?id=6402\'>(
bug 6402)</a></p>'); |
20 | 23 |
21 try { | 24 try { |
22 if (typeof(window.frameElement.width) != 'number' || typeof(window.frameEl
ement.height) != 'number') { | 25 if (typeof(window.frameElement.width) != 'number' || typeof(window.frameEl
ement.height) != 'number') { |
23 log('Incorrect type: ' + typeof(window.frameElement.width) + ', ' + type
of(window.frameElement.height)); | 26 log('Incorrect type: ' + typeof(window.frameElement.width) + ', ' + type
of(window.frameElement.height)); |
24 throw ''; | 27 throw ''; |
25 } | 28 } |
26 | 29 |
27 ref = top.frame2.frameElement; | 30 ref = top.frame2.frameElement; |
28 top.frameset.removeChild(top.frame2.frameElement); | 31 top.frameset.removeChild(top.frame2.frameElement); |
29 if (ref.width != 0 || ref.height != 0) { | 32 if (ref.width != 0 || ref.height != 0) { |
30 log('Incorrect deleted frame size: ' + ref.width + 'x' + ref.height); | 33 log('Incorrect deleted frame size: ' + ref.width + 'x' + ref.height); |
31 throw ''; | 34 throw ''; |
32 } | 35 } |
33 | 36 |
34 if (window.frameElement.width != 399 || window.frameElement.height != 600) | 37 if (window.frameElement.width != 399 || window.frameElement.height != 600) |
35 log('Frame size: ' + window.frameElement.width + 'x' + window.frameEleme
nt.height); | 38 log('Frame size: ' + window.frameElement.width + 'x' + window.frameEleme
nt.height); |
36 else | 39 else |
37 log('Success'); | 40 log('Success'); |
38 | 41 |
39 } catch (e) { | 42 } catch (e) { |
40 if (e.description) | 43 if (e.description) |
41 log(e.description); | 44 log(e.description); |
42 } | 45 } |
| 46 |
| 47 top.frame1.document.close(); |
| 48 testRunner.notifyDone(); |
43 "> | 49 "> |
44 <frame name="frame3" src="about:blank"> | 50 <frame name="frame3" src="about:blank"> |
45 </frameset> | 51 </frameset> |
46 </html> | 52 </html> |
OLD | NEW |