diff options
Diffstat (limited to 'toolkit/components/windowwatcher/test/head.js')
-rw-r--r-- | toolkit/components/windowwatcher/test/head.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/toolkit/components/windowwatcher/test/head.js b/toolkit/components/windowwatcher/test/head.js new file mode 100644 index 0000000000..911a56efac --- /dev/null +++ b/toolkit/components/windowwatcher/test/head.js @@ -0,0 +1,14 @@ +/** + * Given some nsIDOMWindow for a window running in the parent + * process, return the nsIWebBrowserChrome chrome flags for + * the associated XUL window. + * + * @param win (nsIDOMWindow) + * Some window in the parent process. + * @returns int + */ +function getParentChromeFlags(win) { + return win.docShell.treeOwner + .QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIAppWindow).chromeFlags; +} |