diff --git a/mozilla/embedding/tests/mfcembed/BrowserView.cpp b/mozilla/embedding/tests/mfcembed/BrowserView.cpp index 9ea4cd18503..2f8de0ba6d3 100644 --- a/mozilla/embedding/tests/mfcembed/BrowserView.cpp +++ b/mozilla/embedding/tests/mfcembed/BrowserView.cpp @@ -228,7 +228,11 @@ HRESULT CBrowserView::CreateBrowser() nsCOMPtr dsti = do_QueryInterface(mWebBrowser, &rv); if(NS_FAILED(rv)) return rv; - dsti->SetItemType(nsIDocShellTreeItem::typeContentWrapper); + + // If the browser window hosting chrome or content? + dsti->SetItemType(((CMfcEmbedApp *)AfxGetApp())->m_bChrome ? + nsIDocShellTreeItem::typeChromeWrapper : + nsIDocShellTreeItem::typeContentWrapper); // Create the real webbrowser window diff --git a/mozilla/embedding/tests/mfcembed/MfcEmbed.cpp b/mozilla/embedding/tests/mfcembed/MfcEmbed.cpp index a5f596807af..4e779f33c17 100644 --- a/mozilla/embedding/tests/mfcembed/MfcEmbed.cpp +++ b/mozilla/embedding/tests/mfcembed/MfcEmbed.cpp @@ -107,6 +107,7 @@ CMfcEmbedApp::CMfcEmbedApp() : m_iStartupPage = 0; + m_bChrome = FALSE; } CMfcEmbedApp theApp; @@ -149,6 +150,8 @@ void CMfcEmbedApp::ParseCmdLine() // Show Debug Console? if(IsCmdLineSwitch("-console")) ShowDebugConsole(); + if(IsCmdLineSwitch("-chrome")) + m_bChrome = TRUE; } /* Some Gecko interfaces are implemented as components, automatically diff --git a/mozilla/embedding/tests/mfcembed/MfcEmbed.h b/mozilla/embedding/tests/mfcembed/MfcEmbed.h index 33b6a2f0374..2a36283202d 100644 --- a/mozilla/embedding/tests/mfcembed/MfcEmbed.h +++ b/mozilla/embedding/tests/mfcembed/MfcEmbed.h @@ -95,6 +95,7 @@ public: CObList m_FrameWndLst; + BOOL m_bChrome; CString m_strHomePage; inline BOOL GetHomePage(CString& strHomePage) { strHomePage = m_strHomePage;