Title: [97743] trunk/Tools
Revision
97743
Author
[email protected]
Date
2011-10-18 05:51:43 -0700 (Tue, 18 Oct 2011)

Log Message

2011-10-07  Andrey Kosyakov  <[email protected]>

        [Chromium] suppress console output from DevTools window
        https://bugs.webkit.org/show_bug.cgi?id=69632

        Reviewed by Pavel Feldman.

        * DumpRenderTree/chromium/TestShell.cpp:
        (TestShell::showDevTools):
        * DumpRenderTree/chromium/WebViewHost.cpp:
        (WebViewHost::didAddMessageToConsole):
        (WebViewHost::reset):
        (WebViewHost::setLogConsoleOutput):
        * DumpRenderTree/chromium/WebViewHost.h:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (97742 => 97743)


--- trunk/Tools/ChangeLog	2011-10-18 12:46:06 UTC (rev 97742)
+++ trunk/Tools/ChangeLog	2011-10-18 12:51:43 UTC (rev 97743)
@@ -1,3 +1,18 @@
+2011-10-07  Andrey Kosyakov  <[email protected]>
+
+        [Chromium] suppress console output from DevTools window
+        https://bugs.webkit.org/show_bug.cgi?id=69632
+
+        Reviewed by Pavel Feldman.
+
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::showDevTools):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::didAddMessageToConsole):
+        (WebViewHost::reset):
+        (WebViewHost::setLogConsoleOutput):
+        * DumpRenderTree/chromium/WebViewHost.h:
+
 2011-10-18  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r97735.

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (97742 => 97743)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2011-10-18 12:46:06 UTC (rev 97742)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2011-10-18 12:51:43 UTC (rev 97743)
@@ -172,6 +172,7 @@
         }
         m_devTools = createNewWindow(url);
         m_devTools->webView()->settings()->setMemoryInfoEnabled(true);
+        m_devTools->setLogConsoleOutput(false);
         ASSERT(m_devTools);
         createDRTDevToolsClient(m_drtDevToolsAgent.get());
     }

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (97742 => 97743)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2011-10-18 12:46:06 UTC (rev 97742)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2011-10-18 12:51:43 UTC (rev 97743)
@@ -276,6 +276,8 @@
 void WebViewHost::didAddMessageToConsole(const WebConsoleMessage& message, const WebString& sourceName, unsigned sourceLine)
 {
     // This matches win DumpRenderTree's UIDelegate.cpp.
+    if (!m_logConsoleOutput)
+        return;
     string newMessage;
     if (!message.text.isEmpty()) {
         newMessage = message.text.utf8();
@@ -1238,6 +1240,7 @@
     m_hasWindow = false;
     m_inModalLoop = false;
     m_smartInsertDeleteEnabled = true;
+    m_logConsoleOutput = true;
 #if OS(WINDOWS)
     m_selectTrailingWhitespaceEnabled = true;
 #else
@@ -1288,6 +1291,11 @@
     // allows both.
 }
 
+void WebViewHost::setLogConsoleOutput(bool enabled)
+{
+    m_logConsoleOutput = enabled;
+}
+
 void WebViewHost::setCustomPolicyDelegate(bool isCustom, bool isPermissive)
 {
     m_policyDelegateEnabled = isCustom;

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.h (97742 => 97743)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2011-10-18 12:46:06 UTC (rev 97742)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2011-10-18 12:51:43 UTC (rev 97743)
@@ -75,6 +75,7 @@
     void reset();
     void setSelectTrailingWhitespaceEnabled(bool);
     void setSmartInsertDeleteEnabled(bool);
+    void setLogConsoleOutput(bool);
     void waitForPolicyDelegate();
     void setCustomPolicyDelegate(bool, bool);
     WebKit::WebFrame* topLoadingFrame() { return m_topLoadingFrame; }
@@ -315,6 +316,9 @@
     // true if we want to enable selection of trailing whitespaces
     bool m_selectTrailingWhitespaceEnabled;
 
+    // true if whatever is sent to the console should be logged to stdout.
+    bool m_logConsoleOutput;
+
     // Set of headers to clear in willSendRequest.
     HashSet<WTF::String> m_clearHeaders;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to