diff --git a/tests/cefclient/browser/root_window_manager.cc b/tests/cefclient/browser/root_window_manager.cc index 50847582a..7634667ad 100644 --- a/tests/cefclient/browser/root_window_manager.cc +++ b/tests/cefclient/browser/root_window_manager.cc @@ -115,9 +115,13 @@ class ClientRequestContextHandler : public CefRequestContextHandler, // Ensure a compatible set of window creation attributes. void SanityCheckWindowConfig(const bool is_devtools, - bool& use_views, + const bool use_views, bool& use_alloy_style, bool& with_osr) { + // This configuration is not supported by cefclient architecture and + // should use default window creation instead. + CHECK(!(is_devtools && !use_views)); + if (MainContext::Get()->UseChromeBootstrap()) { if (is_devtools && use_alloy_style) { LOG(WARNING) @@ -125,13 +129,6 @@ void SanityCheckWindowConfig(const bool is_devtools, " using Chrome style."; use_alloy_style = false; } - - if (is_devtools && !use_views) { - LOG(WARNING) - << "Native parent is not supported with Chrome runtime DevTools;" - " using Views."; - use_views = true; - } } if (!use_alloy_style && with_osr) { @@ -195,15 +192,15 @@ scoped_refptr RootWindowManager::CreateRootWindowAsPopup( CefBrowserSettings& settings) { CEF_REQUIRE_UI_THREAD(); - SanityCheckWindowConfig(is_devtools, use_views, use_alloy_style, with_osr); - - if (MainContext::Get()->UseDefaultPopup()) { + if (MainContext::Get()->UseDefaultPopup() || (is_devtools && !use_views)) { // Use default window creation for the popup. A new |client| instance is // still required by cefclient architecture. client = new DefaultClientHandler(); return nullptr; } + SanityCheckWindowConfig(is_devtools, use_views, use_alloy_style, with_osr); + if (!temp_window_) { // TempWindow must be created on the UI thread. temp_window_.reset(new TempWindow());