[EFL] EFL's DumpRenderTree does not print didReceiveTitle messages
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 03:47:03 +0000 (03:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 03:47:03 +0000 (03:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=85971

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-05-21
Reviewed by Antonio Gomes.

Tools:

Listen for the "title,changed" signal on the frames instead of the
view so that we get notified for other frame than the main one.
Print out the didReceiveTitle messages which are expected if
LayoutTestController's dumpFrameLoadCallbacks() returns true.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::onFrameTitleChanged):
(DumpRenderTreeChrome::onFrameCreated):
* DumpRenderTree/efl/DumpRenderTreeChrome.h:
(DumpRenderTreeChrome):

LayoutTests:

Unskip http/tests/loading/redirect-with-no-location-crash.html now
that EFL's DumpRenderTree prints out the expected didReceiveTitle
messages.

* platform/efl/Skipped:

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

LayoutTests/ChangeLog
LayoutTests/platform/efl/Skipped
Tools/ChangeLog
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h

index 63d4384..78bf76b 100644 (file)
@@ -1,3 +1,16 @@
+2012-05-21  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [EFL] EFL's DumpRenderTree does not print didReceiveTitle messages
+        https://bugs.webkit.org/show_bug.cgi?id=85971
+
+        Reviewed by Antonio Gomes.
+
+        Unskip http/tests/loading/redirect-with-no-location-crash.html now
+        that EFL's DumpRenderTree prints out the expected didReceiveTitle
+        messages.
+
+        * platform/efl/Skipped:
+
 2012-05-21  Emil A Eklund  <eae@chromium.org>
 
         Remove platform specific ref-test expectations for chromium as ref-tests appears not to support platform specific results.
index 0c23640..c410998 100644 (file)
@@ -578,7 +578,6 @@ http/tests/history/back-with-fragment-change.php
 # Failing http tests (via GTK+)
 http/tests/loading/bad-scheme-subframe.html
 http/tests/loading/bad-server-subframe.html
-http/tests/loading/redirect-with-no-location-crash.html
 http/tests/loading/text-content-type-with-binary-extension.html
 http/tests/media/video-play-stall-seek.html
 http/tests/media/video-play-stall.html
index 1054046..c32faa4 100644 (file)
@@ -1,3 +1,22 @@
+2012-05-21  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [EFL] EFL's DumpRenderTree does not print didReceiveTitle messages
+        https://bugs.webkit.org/show_bug.cgi?id=85971
+
+        Reviewed by Antonio Gomes.
+
+        Listen for the "title,changed" signal on the frames instead of the
+        view so that we get notified for other frame than the main one.
+        Print out the didReceiveTitle messages which are expected if
+        LayoutTestController's dumpFrameLoadCallbacks() returns true.
+
+        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+        (DumpRenderTreeChrome::createView):
+        (DumpRenderTreeChrome::onFrameTitleChanged):
+        (DumpRenderTreeChrome::onFrameCreated):
+        * DumpRenderTree/efl/DumpRenderTreeChrome.h:
+        (DumpRenderTreeChrome):
+
 2012-05-21  Raphael Kubo da Costa  <rakuco@webkit.org>
 
         [EFL] Unreviewed, reverting r116461.
index c033675..85fe0c2 100644 (file)
@@ -97,7 +97,6 @@ Evas_Object* DumpRenderTreeChrome::createView() const
     evas_object_smart_callback_add(view, "load,resource,failed", onResourceLoadFailed, 0);
     evas_object_smart_callback_add(view, "load,resource,finished", onResourceLoadFinished, 0);
     evas_object_smart_callback_add(view, "load,started", onLoadStarted, 0);
-    evas_object_smart_callback_add(view, "title,changed", onTitleChanged, 0);
     evas_object_smart_callback_add(view, "window,object,cleared", onWindowObjectCleared, m_gcController.get());
     evas_object_smart_callback_add(view, "statusbar,text,set", onStatusbarTextSet, 0);
     evas_object_smart_callback_add(view, "load,document,finished", onDocumentLoadFinished, 0);
@@ -120,6 +119,7 @@ Evas_Object* DumpRenderTreeChrome::createView() const
     evas_object_smart_callback_add(mainFrame, "redirect,cancelled", onFrameRedirectCancelled, 0);
     evas_object_smart_callback_add(mainFrame, "redirect,load,provisional", onFrameRedirectForProvisionalLoad, 0);
     evas_object_smart_callback_add(mainFrame, "redirect,requested", onFrameRedirectRequested, 0);
+    evas_object_smart_callback_add(mainFrame, "title,changed", onFrameTitleChanged, 0);
     evas_object_smart_callback_add(mainFrame, "xss,detected", onDidDetectXSS, 0);
 
     return view;
@@ -423,13 +423,17 @@ void DumpRenderTreeChrome::onFrameIconChanged(void*, Evas_Object* frame, void*)
     }
 }
 
-void DumpRenderTreeChrome::onTitleChanged(void*, Evas_Object*, void* eventInfo)
+void DumpRenderTreeChrome::onFrameTitleChanged(void*, Evas_Object* frame, void* eventInfo)
 {
-    if (!gLayoutTestController->dumpTitleChanges())
-        return;
-
     const char* titleText = static_cast<const char*>(eventInfo);
-    printf("TITLE CHANGED: %s\n", titleText);
+
+    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+        const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
+        printf("%s - didReceiveTitle: %s\n", frameName.utf8().data(), titleText);
+    }
+
+    if (!done && gLayoutTestController->dumpTitleChanges())
+        printf("TITLE CHANGED: %s\n", titleText);
 }
 
 void DumpRenderTreeChrome::onDocumentLoadFinished(void*, Evas_Object*, void* eventInfo)
@@ -519,6 +523,7 @@ void DumpRenderTreeChrome::onFrameCreated(void*, Evas_Object*, void* eventInfo)
     evas_object_smart_callback_add(frame, "redirect,cancelled", onFrameRedirectCancelled, 0);
     evas_object_smart_callback_add(frame, "redirect,load,provisional", onFrameRedirectForProvisionalLoad, 0);
     evas_object_smart_callback_add(frame, "redirect,requested", onFrameRedirectRequested, 0);
+    evas_object_smart_callback_add(frame, "title,changed", onFrameTitleChanged, 0);
     evas_object_smart_callback_add(frame, "xss,detected", onDidDetectXSS, 0);
 }
 
index 7d63a19..8594bfc 100644 (file)
@@ -77,7 +77,7 @@ private:
 
     static void onStatusbarTextSet(void*, Evas_Object*, void*);
 
-    static void onTitleChanged(void*, Evas_Object*, void*);
+    static void onFrameTitleChanged(void*, Evas_Object*, void*);
 
     static void onDocumentLoadFinished(void*, Evas_Object*, void*);