1 <!doctype html public
"-//w3c//dtd html 4.0 transitional//en">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=x-user-defined">
5 <meta name=
"GENERATOR" content=
"Mozilla/4.7 [en] (WinNT; U) [Netscape]">
6 <title> MfcEmbed JavaScript Tests
</title>
7 <script language=
"JavaScript">
9 // Open a window with default size/style
12 window
.open("http://www.mozilla.org", "theWin1");
15 // Open a window with specific size
16 function ShowWinSpecificSize()
18 window
.open("http://www.mozilla.org", "theWin2", "width=400, height=600");
21 // Open a window with chrome + specific size
22 function ShowWinSpecificSizeWithChrome()
24 window
.open("http://www.mozilla.org", "theWin3", "menubar=yes, toolbar=yes, status=yes, resizable=yes, width=400, height=600");
32 Excercising MfcEmbed's Interfaces
</h1>
33 This test page serves as a testbed to execercise some of the interfaces
34 MfcEmbed implements - such as nsIWebBrowserChrome, nsIPrompt etc.
35 <p>You can test these by loading mfcembed in the debugger and setting breakpoints
36 in the interface methods discussed below. Then clicking on these links
37 will break in the debugger at the specified locations for you to explore
38 these interface implementations further.
39 <p><a href=
"javascript:ShowWin()">Open a simple JavaScript window with
40 defaults for size etc:
</a>
41 <blockquote><font size=-
1>Invokes
<i>nsIWebBrowserChrome::CreateBrowserWindow()
</i>
42 to create the window
</font></blockquote>
43 <a href=
"javascript:ShowWinSpecificSize()">Open a JavaScript window with
44 only its size specified (Not Resizable)
</a>
45 <blockquote><font size=-
1>Invokes
<i>nsIWebBrowserChrome::CreateBrowserWindow()
</i>
46 to create the window and also invokes
<i>nsIWebBrowserChrome::SizeBrowserTo()
</i>
47 to set the window size. This also shows how we handle the chromeMask to
48 make the window non-resizeable
</font></blockquote>
49 <a href=
"javascript:ShowWinSpecificSizeWithChrome()">Open a window with
50 chrome and its size specified (Resizable)
</a>
51 <blockquote><font size=-
1>Invokes
<i>nsIWebBrowserChrome::CreateBrowserWindow()
</i>
52 to create the window and also invokes
<i>nsIWebBrowserChrome::SizeBrowserTo()
</i>
53 to set the window size
</font>
54 <br><font size=-
1>All of the above tests also invoke
<i> nsIWebBrowserChrome::FindNamedBrowserItem()
</i>
55 to find the named target window in the JavaScript code.
</font></blockquote>