Commit 9de6e6dd authored by loislo@chromium.org's avatar loislo@chromium.org

2010-12-31 Ilya Tikhonovsky <loislo@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: [Chromium] Inspector's tests are very slow on Win(Dbg).

        It was a problem with Chromium DRT. DevToolsAgent object instance was
        attached not only to the inspected page but to the DevTools window too.
        As result all the inspector files were interpreted as a content of inspected page
        and were transfered to the DevTools scripts panel for debugging etc.

        https://bugs.webkit.org/show_bug.cgi?id=51735

        * DumpRenderTree/chromium/TestShell.cpp:
        (TestShell::TestShell):
        (TestShell::bindJSObjectsToWindow):
        (TestShell::createNewWindow):
        * DumpRenderTree/chromium/TestShell.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent db82c3c6
2010-12-31 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Chromium] Inspector's tests are very slow on Win(Dbg).
It was a problem with Chromium DRT. DevToolsAgent object instance was
attached not only to the inspected page but to the DevTools window too.
As result all the inspector files were interpreted as a content of inspected page
and were transfered to the DevTools scripts panel for debugging etc.
https://bugs.webkit.org/show_bug.cgi?id=51735
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::bindJSObjectsToWindow):
(TestShell::createNewWindow):
* DumpRenderTree/chromium/TestShell.h:
2010-12-31 Adam Barth <abarth@webkit.org>
Rubber-stamped by Eric Seidel.
......@@ -106,8 +106,13 @@ TestShell::TestShell(bool testShellMode)
// timed-out DRT process was crashed.
m_timeout = 30 * 1000;
createMainWindow();
}
void TestShell::createMainWindow()
{
m_drtDevToolsAgent.set(new DRTDevToolsAgent);
m_webViewHost = createWebView();
m_webViewHost = createNewWindow(WebURL(), m_drtDevToolsAgent.get());
m_webView = m_webViewHost->webView();
m_drtDevToolsAgent->setWebView(m_webView);
}
......@@ -557,15 +562,15 @@ void TestShell::bindJSObjectsToWindow(WebFrame* frame)
m_textInputController->bindToJavascript(frame, WebString::fromUTF8("textInputController"));
}
WebViewHost* TestShell::createWebView()
WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url)
{
return createNewWindow(WebURL());
return createNewWindow(url, 0);
}
WebViewHost* TestShell::createNewWindow(const WebURL& url)
WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url, DRTDevToolsAgent* devToolsAgent)
{
WebViewHost* host = new WebViewHost(this);
WebView* view = WebView::create(host, m_drtDevToolsAgent.get());
WebView* view = WebView::create(host, devToolsAgent);
host->setWebWidget(view);
m_prefs.applyTo(view);
view->initializeMainFrame(host);
......
......@@ -151,7 +151,6 @@ public:
// testing where we only want to have the output from the last load.
void setDumpWhenFinished(bool dumpWhenFinished) { m_dumpWhenFinished = dumpWhenFinished; }
WebViewHost* createWebView();
WebViewHost* createNewWindow(const WebKit::WebURL&);
void closeWindow(WebViewHost*);
void closeRemainingWindows();
......@@ -168,6 +167,8 @@ public:
static const int virtualWindowBorder = 3;
private:
WebViewHost* createNewWindow(const WebKit::WebURL&, DRTDevToolsAgent* devToolsAgent);
void createMainWindow();
void createDRTDevToolsClient(DRTDevToolsAgent*);
void resetWebSettings(WebKit::WebView&);
......
......@@ -235,7 +235,7 @@ WebView* WebViewHost::createView(WebFrame*, const WebWindowFeatures&, const WebS
{
if (!layoutTestController()->canOpenWindows())
return 0;
return m_shell->createWebView()->webView();
return m_shell->createNewWindow(WebURL())->webView();
}
WebWidget* WebViewHost::createPopupMenu(WebPopupType)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment