|
1 <html><head><script> |
|
2 function test() { |
|
3 /* The lowdown on this feature string: |
|
4 - ,=\twidth: reads as key:width value:0200px|0, which, after strtol/toInt, gives you 200 |
|
5 - =height: reads as key:height value:"", which means yes, which means 1, but the minimum size is 100, so 100 |
|
6 - 1width: reads as key:1width, an invalid key, so it doesn't override the previous width |
|
7 - left: reads as key:left value:no, which means 0, which means aligned to the left side of the screen |
|
8 - \ntoolBAR: reads as key:toolbar value:yes |
|
9 - \rstatus: reads as key:status value:"", which means yes |
|
10 - the trailing comma catches a previous mistake i made reading past the end of the string |
|
11 */ |
|
12 var sFeatures = " ,=\twidth == = = 0200px|0=height 400,1width=400,left=nO \ntoolBAR=yeS,resizable=yess, \rstatus= ,"; |
|
13 var w = window.open("resources/popup200x100.html", undefined, sFeatures); |
|
14 w.focus(); |
|
15 } |
|
16 </script></head> |
|
17 <body> |
|
18 <p>This test checks whether parsing of the 'features' argument to window.open matches |
|
19 Win IE's behavior, except in the case of "resizable," which should always be true.</p> |
|
20 <p>The link below should open a window with the following attributes:</p> |
|
21 <ul> |
|
22 <li> A WebView exactly 200x100, such that you can see a red 1 pixel border along each edge of the WebView. |
|
23 <li> A window aligned to the left hand side of the screen. |
|
24 <li> Toolbar visible. |
|
25 <li> Statusbar visible. |
|
26 <li> Resizable. |
|
27 </ul> |
|
28 <a href="" onclick="test(); return false;">Click to test</a> |
|
29 <hr> |
|
30 <p>The link below should open a window with the following attributes:</p> |
|
31 <ul> |
|
32 <li>A window whose size matches what you would get from file->New Window.</li> |
|
33 <li>A window whose positioning matches what you would get from file->New Window.</li> |
|
34 <li>Statusbar visible.</li> |
|
35 <li>Resizable.</li> |
|
36 </ul> |
|
37 <a href="" onclick='window.open("", "", "status,resizable");'>Click to test</a> |
|
38 </body></html> |