diff --git a/tests/cefclient/browser/root_window_manager.cc b/tests/cefclient/browser/root_window_manager.cc index 8771d9a77..b8080d125 100644 --- a/tests/cefclient/browser/root_window_manager.cc +++ b/tests/cefclient/browser/root_window_manager.cc @@ -58,9 +58,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 !defined(DISABLE_ALLOY_BOOTSTRAP) if (MainContext::Get()->UseChromeBootstrap()) #endif @@ -71,13 +75,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) { @@ -141,15 +138,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());