Changeset 119590 in webkit


Ignore:
Timestamp:
Jun 6, 2012 7:57:42 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL][DRT] http/tests/globalhistory testcases do not pass
https://bugs.webkit.org/show_bug.cgi?id=82579

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-06-06
Reviewed by Csaba Osztrogonác.

Tools:

DRT has provided callbacks for ewk_view "global history delegate" signals.

  • DumpRenderTree/efl/DumpRenderTree.cpp:

(isGlobalHistoryTest): Aux function to ident global history testcase.
(createLayoutTestController):

  • DumpRenderTree/efl/DumpRenderTreeChrome.cpp:

(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::onTitleChanged): Handles also some global history testcases.
(DumpRenderTreeChrome::onWebViewNavigatedWithData): New callback function.
(DumpRenderTreeChrome::onWebViewServerRedirect): Ditto.
(DumpRenderTreeChrome::onWebViewClientRedirect): Ditto.
(DumpRenderTreeChrome::onWebViewPopulateVisitedLinks): Ditto.

  • DumpRenderTree/efl/DumpRenderTreeChrome.h:

(DumpRenderTreeChrome):

LayoutTests:

  • platform/efl/Skipped: Unskip http/tests/globalhistory.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r119587 r119590  
     12012-06-06  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [EFL][DRT] http/tests/globalhistory testcases do not pass
     4        https://bugs.webkit.org/show_bug.cgi?id=82579
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        * platform/efl/Skipped: Unskip http/tests/globalhistory.
     9
    1102012-06-06  Ilya Tikhonovsky  <loislo@chromium.org>
    211
  • trunk/LayoutTests/platform/efl/Skipped

    r119576 r119590  
    293293fast/dom/Window/slow-unload-handler.html
    294294fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
    295 
    296 # The EFL port has no global history delegate
    297 http/tests/globalhistory
    298295
    299296# Fails because of the security policy of the user agent?
  • trunk/Tools/ChangeLog

    r119588 r119590  
     12012-06-06  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [EFL][DRT] http/tests/globalhistory testcases do not pass
     4        https://bugs.webkit.org/show_bug.cgi?id=82579
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        DRT has provided callbacks for ewk_view "global history delegate" signals.
     9
     10        * DumpRenderTree/efl/DumpRenderTree.cpp:
     11        (isGlobalHistoryTest): Aux function to ident global history testcase.
     12        (createLayoutTestController):
     13        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
     14        (DumpRenderTreeChrome::createView):
     15        (DumpRenderTreeChrome::onTitleChanged): Handles also some global history testcases.
     16        (DumpRenderTreeChrome::onWebViewNavigatedWithData): New callback function.
     17        (DumpRenderTreeChrome::onWebViewServerRedirect): Ditto.
     18        (DumpRenderTreeChrome::onWebViewClientRedirect): Ditto.
     19        (DumpRenderTreeChrome::onWebViewPopulateVisitedLinks): Ditto.
     20        * DumpRenderTree/efl/DumpRenderTreeChrome.h:
     21        (DumpRenderTreeChrome):
     22
    1232012-06-06  János Badics  <jbadics@inf.u-szeged.hu>
    224
  • trunk/Tools/DumpRenderTree/efl/DumpRenderTree.cpp

    r119116 r119590  
    200200}
    201201
     202static inline bool isGlobalHistoryTest(const String& cTestPathOrURL)
     203{
     204    return cTestPathOrURL.contains("/globalhistory/");
     205}
     206
    202207static void createLayoutTestController(const String& testURL, const String& expectedPixelHash)
    203208{
     
    215220
    216221    gLayoutTestController->setDeveloperExtrasEnabled(true);
     222    gLayoutTestController->setDumpHistoryDelegateCallbacks(isGlobalHistoryTest(testURL));
    217223
    218224    if (shouldDumpAsText(testURL)) {
  • trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp

    r119377 r119590  
    111111    evas_object_smart_callback_add(view, "mixedcontent,displayed", onInsecureContentDisplayed, 0);
    112112    evas_object_smart_callback_add(view, "frame,created", onFrameCreated, 0);
     113    evas_object_smart_callback_add(view, "navigate,with,data", onWebViewNavigatedWithData, 0);
     114    evas_object_smart_callback_add(view, "perform,server,redirect", onWebViewServerRedirect, 0);
     115    evas_object_smart_callback_add(view, "perform,client,redirect", onWebViewClientRedirect, 0);
     116    evas_object_smart_callback_add(view, "populate,visited,links", onWebViewPopulateVisitedLinks, 0);
    113117
    114118    connectEditingCallbacks(view);
     
    455459    if (!done && gLayoutTestController->dumpTitleChanges())
    456460        printf("TITLE CHANGED: %s\n", (titleText && titleText->string) ? titleText->string : "");
     461
     462    if (!done && gLayoutTestController->dumpHistoryDelegateCallbacks())
     463        printf("WebView updated the title for history URL \"%s\" to \"%s\".\n", ewk_frame_uri_get(frame)
     464               , (titleText && titleText->string) ? titleText->string : "");
    457465}
    458466
     
    551559}
    552560
     561void DumpRenderTreeChrome::onWebViewNavigatedWithData(void*, Evas_Object*, void* eventInfo)
     562{
     563    if (done || !gLayoutTestController->dumpHistoryDelegateCallbacks())
     564        return;
     565
     566    ASSERT(eventInfo);
     567    const Ewk_View_Navigation_Data* navigationData = static_cast<Ewk_View_Navigation_Data*>(eventInfo);
     568
     569    ASSERT(navigationData->request);
     570    ASSERT(navigationData->response);
     571
     572    const bool wasFailure = navigationData->has_substitute_data || navigationData->response->status_code >= 400;
     573    const bool wasRedirected = navigationData->client_redirect_source && *(navigationData->client_redirect_source);
     574
     575    printf("WebView navigated to url \"%s\" with title \"%s\" with HTTP equivalent method \"%s\".  The navigation was %s and was %s%s.\n",
     576        navigationData->url,
     577        navigationData->title,
     578        navigationData->request->http_method,
     579        wasFailure? "a failure" : "successful",
     580        (wasRedirected ? "a client redirect from " : "not a client redirect"),
     581        (wasRedirected ? navigationData->client_redirect_source : ""));
     582}
     583
     584void DumpRenderTreeChrome::onWebViewServerRedirect(void*, Evas_Object*, void* eventInfo)
     585{
     586    if (done || !gLayoutTestController->dumpHistoryDelegateCallbacks())
     587        return;
     588
     589    ASSERT(eventInfo);
     590    const Ewk_View_Redirection_Data* data = static_cast<Ewk_View_Redirection_Data*>(eventInfo);
     591    printf("WebView performed a server redirect from \"%s\" to \"%s\".\n", data->source_url, data->destination_url);
     592}
     593
     594void DumpRenderTreeChrome::onWebViewClientRedirect(void*, Evas_Object*, void* eventInfo)
     595{
     596    if (done || !gLayoutTestController->dumpHistoryDelegateCallbacks())
     597        return;
     598
     599    ASSERT(eventInfo);
     600    const Ewk_View_Redirection_Data* data = static_cast<Ewk_View_Redirection_Data*>(eventInfo);
     601    printf("WebView performed a client redirect from \"%s\" to \"%s\".\n", data->source_url, data->destination_url);
     602}
     603
     604void DumpRenderTreeChrome::onWebViewPopulateVisitedLinks(void*, Evas_Object* ewkView, void*)
     605{
     606    if (done || !gLayoutTestController->dumpHistoryDelegateCallbacks())
     607        return;
     608
     609    printf("Asked to populate visited links for WebView \"%s\"\n", ewk_view_uri_get(ewkView));
     610}
     611
    553612void DumpRenderTreeChrome::onFrameProvisionalLoad(void*, Evas_Object* frame, void*)
    554613{
  • trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h

    r119243 r119590  
    9292    static void onWebViewOnloadEvent(void*, Evas_Object*, void*);
    9393
     94    static void onWebViewNavigatedWithData(void*, Evas_Object*, void*);
     95
     96    static void onWebViewServerRedirect(void*, Evas_Object*, void*);
     97
     98    static void onWebViewClientRedirect(void*, Evas_Object*, void*);
     99
     100    static void onWebViewPopulateVisitedLinks(void*, Evas_Object*, void*);
     101
    94102    static void onInsecureContentRun(void*, Evas_Object*, void*);
    95103
Note: See TracChangeset for help on using the changeset viewer.