Title: [117894] trunk
Revision
117894
Author
[email protected]
Date
2012-05-21 20:47:03 -0700 (Mon, 21 May 2012)

Log Message

[EFL] EFL's DumpRenderTree does not print didReceiveTitle messages
https://bugs.webkit.org/show_bug.cgi?id=85971

Patch by Christophe Dumez <[email protected]> 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117893 => 117894)


--- trunk/LayoutTests/ChangeLog	2012-05-22 03:37:54 UTC (rev 117893)
+++ trunk/LayoutTests/ChangeLog	2012-05-22 03:47:03 UTC (rev 117894)
@@ -1,3 +1,16 @@
+2012-05-21  Christophe Dumez  <[email protected]>
+
+        [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  <[email protected]>
 
         Remove platform specific ref-test expectations for chromium as ref-tests appears not to support platform specific results.

Modified: trunk/LayoutTests/platform/efl/Skipped (117893 => 117894)


--- trunk/LayoutTests/platform/efl/Skipped	2012-05-22 03:37:54 UTC (rev 117893)
+++ trunk/LayoutTests/platform/efl/Skipped	2012-05-22 03:47:03 UTC (rev 117894)
@@ -578,7 +578,6 @@
 # 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

Modified: trunk/Tools/ChangeLog (117893 => 117894)


--- trunk/Tools/ChangeLog	2012-05-22 03:37:54 UTC (rev 117893)
+++ trunk/Tools/ChangeLog	2012-05-22 03:47:03 UTC (rev 117894)
@@ -1,3 +1,22 @@
+2012-05-21  Christophe Dumez  <[email protected]>
+
+        [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  <[email protected]>
 
         [EFL] Unreviewed, reverting r116461.

Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (117893 => 117894)


--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp	2012-05-22 03:37:54 UTC (rev 117893)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp	2012-05-22 03:47:03 UTC (rev 117894)
@@ -97,7 +97,6 @@
     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_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::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);
 
-    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 @@
     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);
 }
 

Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h (117893 => 117894)


--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h	2012-05-22 03:37:54 UTC (rev 117893)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h	2012-05-22 03:47:03 UTC (rev 117894)
@@ -77,7 +77,7 @@
 
     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*);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to