| <html> |
| <head> |
| <title>frameElement.width, frameElement.height</title> |
| |
| <frameset id="frameset" border="1" cols="50%,25%,25%" style='border: solid 1px;'> |
| <frame name="frame2" src="about:blank"> |
| <frame name="frame1" src="javascript: |
| function log(s) |
| { |
| if (window.testRunner) |
| alert(s); |
| else |
| top.frame1.document.write('<p>' + s + '</p>'); |
| } |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| top.frame1.document.write('<p>Test for the presence of frameElement.width and frameElement.height <a href=\'https://bugs.webkit.org/show_bug.cgi?id=6402\'>(bug 6402)</a></p>'); |
| |
| try { |
| if (typeof(window.frameElement.width) != 'number' || typeof(window.frameElement.height) != 'number') { |
| log('Incorrect type: ' + typeof(window.frameElement.width) + ', ' + typeof(window.frameElement.height)); |
| throw ''; |
| } |
| |
| ref = top.frame2.frameElement; |
| top.frameset.removeChild(top.frame2.frameElement); |
| if (ref.width != 0 || ref.height != 0) { |
| log('Incorrect deleted frame size: ' + ref.width + 'x' + ref.height); |
| throw ''; |
| } |
| |
| if (window.frameElement.width != 399 || window.frameElement.height != 600) |
| log('Frame size: ' + window.frameElement.width + 'x' + window.frameElement.height); |
| else |
| log('Success'); |
| |
| } catch (e) { |
| if (e.description) |
| log(e.description); |
| } |
| "> |
| <frame name="frame3" src="about:blank"> |
| </frameset> |
| </html> |