Index: content/shell/browser/shell_devtools_manager_delegate.cc |
diff --git a/content/shell/browser/shell_devtools_manager_delegate.cc b/content/shell/browser/shell_devtools_manager_delegate.cc |
index db7bd746debc2adb5b5a09ace4584d117497e682..e58d69a83a31e3b250e19d92491118bea9e9f0a6 100644 |
--- a/content/shell/browser/shell_devtools_manager_delegate.cc |
+++ b/content/shell/browser/shell_devtools_manager_delegate.cc |
@@ -28,8 +28,10 @@ |
#include "content/public/common/content_switches.h" |
#include "content/public/common/url_constants.h" |
#include "content/public/common/user_agent.h" |
+#include "content/shell/browser/layout_test/secondary_test_window_observer.h" |
#include "content/shell/browser/shell.h" |
#include "content/shell/common/shell_content_client.h" |
+#include "content/shell/common/shell_switches.h" |
#include "content/shell/grit/shell_resources.h" |
#include "net/base/net_errors.h" |
#include "net/log/net_log_source.h" |
@@ -193,6 +195,8 @@ ShellDevToolsManagerDelegate::CreateNewTarget(const GURL& url) { |
url, |
nullptr, |
gfx::Size()); |
+ if (switches::IsRunLayoutTestSwitchPresent()) |
+ SecondaryTestWindowObserver::CreateForWebContents(shell->web_contents()); |
return DevToolsAgentHost::GetOrCreateFor(shell->web_contents()); |
} |