[EFL] Do not dump inspector output in DRT
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 12:56:53 +0000 (12:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 12:56:53 +0000 (12:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=97018

Patch by Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> on 2012-09-25
Reviewed by Kenneth Rohde Christiansen.

Tools:

Some inspector-related layout tests expect console output from the
inspector view to be suppressed. Do that by setting a property in
the inspector view that makes the onConsoleMessage callback return
early and not output anything.

Using evas_object_data_{get,set} is not very beautiful, but it is
still better than properly subclassing Ewk_View and having to
implement something similar to drt_view_console_message_enable_set().

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::createWebInspectorView):
* DumpRenderTree/efl/DumpRenderTreeView.cpp:
(onConsoleMessage):

LayoutTests:

* platform/efl-wk2/TestExpectations: Skip some tests which still
fail on WK2.
* platform/efl/Skipped: Unskip a few inspector tests that now
pass.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129494 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/efl-wk2/TestExpectations
LayoutTests/platform/efl/Skipped
Tools/ChangeLog
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp

index f9e17f0..e8f5532 100644 (file)
@@ -1,3 +1,15 @@
+2012-09-25  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
+
+        [EFL] Do not dump inspector output in DRT
+        https://bugs.webkit.org/show_bug.cgi?id=97018
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * platform/efl-wk2/TestExpectations: Skip some tests which still
+        fail on WK2.
+        * platform/efl/Skipped: Unskip a few inspector tests that now
+        pass.
+
 2012-09-25  Christophe Dumez  <christophe.dumez@intel.com>
 
         [EFL] Partial Skipped file clean up
index 164e0e5..acd8107 100644 (file)
@@ -196,3 +196,11 @@ webkit.org/b/96794 inspector/console/alert-toString-exception.html [ Failure ]
 
 # Fails after it was unskipped in r129372.
 webkit.org/b/97545 inspector/styles/variables/css-variables.html [ Failure ]
+
+# Timeouts probably due to some implemented code.
+# Works in WK1 after webkit.org/b/97018
+webkit.org/b/97560 http/tests/inspector/extensions-useragent.html [ Failure ]
+webkit.org/b/97560 inspector/extensions/extensions-api.html [ Failure ]
+webkit.org/b/97560 inspector/extensions/extensions-audits-content-script.html [ Failure ]
+webkit.org/b/97560 inspector/extensions/extensions-audits.html [ Failure ]
+webkit.org/b/97560 inspector/extensions/extensions-eval-content-script.html [ Failure ]
index 9e21265..1655658 100644 (file)
@@ -400,7 +400,6 @@ fast/profiler/dead-time.html
 http/tests/inspector/resource-har-conversion.html
 http/tests/inspector/console-cross-origin-iframe-logging.html
 http/tests/inspector/resource-parameters.html
-http/tests/inspector/extensions-useragent.html
 http/tests/inspector/compiler-source-mapping-debug.html
 http/tests/inspector/console-websocket-error.html
 inspector/styles/svg-style.xhtml
@@ -414,10 +413,6 @@ inspector/debugger/debugger-compile-and-run.html
 inspector/debugger/dom-breakpoints.html
 inspector/timeline/timeline-paint.html
 inspector/timeline/timeline-receive-response-event.html
-inspector/extensions/extensions-api.html
-inspector/extensions/extensions-audits-content-script.html
-inspector/extensions/extensions-audits.html
-inspector/extensions/extensions-eval-content-script.html
 
 # ENABLE(WIDGET_REGION) is disabled
 fast/css/widget-region-parser.html
index c2f3c67..2d58b18 100644 (file)
@@ -1,3 +1,24 @@
+2012-09-25  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
+
+        [EFL] Do not dump inspector output in DRT
+        https://bugs.webkit.org/show_bug.cgi?id=97018
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Some inspector-related layout tests expect console output from the
+        inspector view to be suppressed. Do that by setting a property in
+        the inspector view that makes the onConsoleMessage callback return
+        early and not output anything.
+
+        Using evas_object_data_{get,set} is not very beautiful, but it is
+        still better than properly subclassing Ewk_View and having to
+        implement something similar to drt_view_console_message_enable_set().
+
+        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+        (DumpRenderTreeChrome::createWebInspectorView):
+        * DumpRenderTree/efl/DumpRenderTreeView.cpp:
+        (onConsoleMessage):
+
 2012-09-25  Christophe Dumez  <christophe.dumez@intel.com>
 
         [WK2][WKTR] TestRunner needs support for setWillSendRequestReturnsNullOnRedirect
index 09d7d40..51a78c9 100644 (file)
@@ -145,6 +145,10 @@ Evas_Object* DumpRenderTreeChrome::createWebInspectorView()
     if (!inspectorView)
         return 0;
 
+    // Inspector-related views are not expected to have their output logged.
+    const bool ignoreMessages = true;
+    evas_object_data_set(inspectorView, "ignore-console-messages", &ignoreMessages);
+
     ewk_view_theme_set(inspectorView, DATA_DIR"/default.edj");
 
     Evas_Object* mainFrame = ewk_view_frame_main_get(inspectorView);
index ee0d615..99427d8 100644 (file)
@@ -55,8 +55,12 @@ static WTF::String urlSuitableForTestResult(const WTF::String& uriString)
     return (index == WTF::notFound) ? uriString : uriString.substring(index + 1);
 }
 
-static void onConsoleMessage(Ewk_View_Smart_Data*, const char* message, unsigned int lineNumber, const char*)
+static void onConsoleMessage(Ewk_View_Smart_Data* smartData, const char* message, unsigned lineNumber, const char*)
 {
+    Evas_Object* evasObject = smartData->self;
+    if (evas_object_data_get(evasObject, "ignore-console-messages"))
+        return;
+
     // Tests expect only the filename part of local URIs
     WTF::String newMessage = WTF::String::fromUTF8(message);
     if (!newMessage.isEmpty()) {