Changeset 116119 in webkit


Ignore:
Timestamp:
May 4, 2012 10:22:59 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Frame load callbacks output is missing for redirections
https://bugs.webkit.org/show_bug.cgi?id=85173

Patch by Christophe Dumez <Christophe Dumez> on 2012-05-04
Reviewed by Antonio Gomes.

Source/WebKit/efl:

Add a few redirection-related signals on the ewk_frame so that EFL's
DumpRenderTree can print the expected output when
LayoutTestController's dumpFrameLoadCallbacks() returns true.

  • WebCoreSupport/FrameLoaderClientEfl.cpp:

(WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
(WebCore::FrameLoaderClientEfl::dispatchDidReceiveResponse):
(WebCore::FrameLoaderClientEfl::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebCore::FrameLoaderClientEfl::dispatchWillPerformClientRedirect):

  • ewk/ewk_frame.cpp:

(ewk_frame_redirect_provisional_load):
(ewk_frame_redirect_requested):

  • ewk/ewk_frame.h:
  • ewk/ewk_private.h:

Tools:

Catch the new ewk_frame signals to print the expected output in case
of redirections, when LayoutTestController's dumpFrameLoadCallbacks()
returns true.

  • DumpRenderTree/efl/DumpRenderTreeChrome.cpp:

(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::onWillSendRequest):
(DumpRenderTreeChrome::onFrameCreated):
(DumpRenderTreeChrome::onFrameRedirectForProvisionalLoad):
(DumpRenderTreeChrome::onFrameRedirectRequested):
(DumpRenderTreeChrome::onResponseReceived):

  • DumpRenderTree/efl/DumpRenderTreeChrome.h:

(DumpRenderTreeChrome):

LayoutTests:

Update test_expectations.txt now that EFL's DumpRenderTree is
correctly printing frame load callbacks information in case of
redirections.

  • platform/efl/Skipped:
  • platform/efl/test_expectations.txt:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116118 r116119  
     12012-05-04  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [EFL] Frame load callbacks output is missing for redirections
     4        https://bugs.webkit.org/show_bug.cgi?id=85173
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Update test_expectations.txt now that EFL's DumpRenderTree is
     9        correctly printing frame load callbacks information in case of
     10        redirections.
     11
     12        * platform/efl/Skipped:
     13        * platform/efl/test_expectations.txt:
     14
    1152012-05-04  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
    216
  • trunk/LayoutTests/platform/efl/Skipped

    r116097 r116119  
    266266fast/encoding/idn-security.html
    267267
    268 # EFL's LayoutTestController does not implement dispatchPendingLoadRequests
    269 http/tests/loading/deleted-host-in-resource-load-delegate-callback.html
    270 
    271268# EFL's LayoutTestController does not implement keepWebHistory
    272269fast/history/visited-generated-content-test.html
     
    573570media/media-captions.html
    574571
    575 # BUG: Requires willPerformClientRedirectToURL
    576 http/tests/loading/onload-vs-immediate-refresh.pl
    577 
    578572# BUG: Missing DRT API.
    579573http/tests/loading/preload-slow-loading.php
    580 
    581 # BUG: Missing resource load callback ability in DRT
    582 http/tests/loading/redirect-methods.html
    583574
    584575# BUG: No authentication challenge handling
     
    888879# https://bugs.webkit.org/show_bug.cgi?id=61122
    889880http/tests/navigation/post-307-response.html
    890 
    891 # Needs to make sure the redirect-chain scenario in https://bugs.webkit.org/show_bug.cgi?id=31410 works
    892 # See https://bugs.webkit.org/show_bug.cgi?id=35300
    893 http/tests/loading/307-after-303-after-post.html
    894881
    895882# Probably related to https://bugs.webkit.org/show_bug.cgi?id=27637
  • trunk/LayoutTests/platform/efl/test_expectations.txt

    r116118 r116119  
    266266// Redirect response URL is not the one expected
    267267BUGWK85072 : http/tests/misc/will-send-request-returns-null-on-redirect.html = TEXT
     268BUGWK85072 : http/tests/loading/307-after-303-after-post.html = TEXT
     269BUGWK85072 : http/tests/loading/redirect-methods.html = TEXT
    268270
    269271// No support for overriding WebKitLoadSiteIconsKey
     
    285287// Generate results for your platform
    286288BUGWK85567 : fast/images/png-suite/test.html = IMAGE
    287 
    288289// Issue with SVG hittesting on strokes, fails on GTK as well.
    289290BUGWK82628 : svg/hittest/svg-ellipse-non-scale-stroke.xhtml = FAIL
  • trunk/Source/WebKit/efl/ChangeLog

    r116097 r116119  
     12012-05-04  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [EFL] Frame load callbacks output is missing for redirections
     4        https://bugs.webkit.org/show_bug.cgi?id=85173
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Add a few redirection-related signals on the ewk_frame so that EFL's
     9        DumpRenderTree can print the expected output when
     10        LayoutTestController's dumpFrameLoadCallbacks() returns true.
     11
     12        * WebCoreSupport/FrameLoaderClientEfl.cpp:
     13        (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
     14        (WebCore::FrameLoaderClientEfl::dispatchDidReceiveResponse):
     15        (WebCore::FrameLoaderClientEfl::dispatchDidReceiveServerRedirectForProvisionalLoad):
     16        (WebCore::FrameLoaderClientEfl::dispatchWillPerformClientRedirect):
     17        * ewk/ewk_frame.cpp:
     18        (ewk_frame_redirect_provisional_load):
     19        (ewk_frame_redirect_requested):
     20        * ewk/ewk_frame.h:
     21        * ewk/ewk_private.h:
     22
    1232012-05-04  Christophe Dumez  <christophe.dumez@intel.com>
    224
  • trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp

    r115451 r116119  
    198198        responseBuffer.url = redirectUrl.data();
    199199        responseBuffer.status_code = coreResponse.httpStatusCode();
     200        responseBuffer.identifier = identifier;
    200201        redirectResponse = &responseBuffer;
    201202    }
     
    263264}
    264265
    265 void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long, const ResourceResponse& coreResponse)
     266void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& coreResponse)
    266267{
    267268    // Update our knowledge of request soup flags - some are only set
     
    271272    m_response = coreResponse;
    272273
    273     Ewk_Frame_Resource_Response response = { 0, coreResponse.httpStatusCode() };
     274    Ewk_Frame_Resource_Response response = { 0, coreResponse.httpStatusCode(), identifier };
    274275    CString url = coreResponse.url().string().utf8();
    275276    response.url = url.data();
     
    570571void FrameLoaderClientEfl::dispatchDidReceiveServerRedirectForProvisionalLoad()
    571572{
    572     notImplemented();
     573    ewk_frame_redirect_provisional_load(m_frame);
    573574}
    574575
     
    578579}
    579580
    580 void FrameLoaderClientEfl::dispatchWillPerformClientRedirect(const KURL&, double, double)
    581 {
    582     notImplemented();
     581void FrameLoaderClientEfl::dispatchWillPerformClientRedirect(const KURL& url, double, double)
     582{
     583    ewk_frame_redirect_requested(m_frame, url.string().utf8().data());
    583584}
    584585
  • trunk/Source/WebKit/efl/ewk/ewk_frame.cpp

    r115877 r116119  
    12271227/**
    12281228 * @internal
     1229 * Reports receipt of server redirect for provisional load.
     1230 *
     1231 * @param ewkFrame Frame.
     1232 *
     1233 * Emits signal: "redirect,load,provisional"
     1234 */
     1235void ewk_frame_redirect_provisional_load(Evas_Object* ewkFrame)
     1236{
     1237    evas_object_smart_callback_call(ewkFrame, "redirect,load,provisional", 0);
     1238}
     1239
     1240/**
     1241 * @internal
     1242 * Reports that a client redirect will be performed.
     1243 *
     1244 * @param ewkFrame Frame.
     1245 * @param url Redirection URL.
     1246 *
     1247 * Emits signal: "redirect,requested"
     1248 */
     1249void ewk_frame_redirect_requested(Evas_Object* ewkFrame, const char* url)
     1250{
     1251    evas_object_smart_callback_call(ewkFrame, "redirect,requested", (void*)url);
     1252}
     1253
     1254/**
     1255 * @internal
    12291256 * Reports a resource will be requested. User may override behavior of webkit by
    12301257 * changing values in @param request.
  • trunk/Source/WebKit/efl/ewk/ewk_frame.h

    r115415 r116119  
    6262 *  - "navigation,first", void: first navigation was occurred.
    6363 *  - "redirect,cancelled", void: client redirect was cancelled.
     64 *  - "redirect,load,provisional", void: received server redirect for provisional load.
     65 *  - "redirect,requested", const char*: url of the client redirect that will be performed.
    6466 *  - "resource,request,new", Ewk_Frame_Resource_Request*: reports that
    6567 *    there's a new resource request.
     
    136138    const char *url; /**< url of the resource */
    137139    int status_code; /**< http status code */
     140    unsigned long identifier; /**< identifier of resource */
    138141};
    139142
  • trunk/Source/WebKit/efl/ewk/ewk_private.h

    r115415 r116119  
    227227
    228228void ewk_frame_redirect_cancelled(Evas_Object* ewkFrame);
     229void ewk_frame_redirect_provisional_load(Evas_Object* ewkFrame);
     230void ewk_frame_redirect_requested(Evas_Object* ewkFrame, const char* url);
    229231void ewk_frame_request_will_send(Evas_Object* ewkFrame, Ewk_Frame_Resource_Messages* messages);
    230232void ewk_frame_request_assign_identifier(Evas_Object* ewkFrame, const Ewk_Frame_Resource_Request* request);
  • trunk/Tools/ChangeLog

    r116115 r116119  
     12012-05-04  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [EFL] Frame load callbacks output is missing for redirections
     4        https://bugs.webkit.org/show_bug.cgi?id=85173
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Catch the new ewk_frame signals to print the expected output in case
     9        of redirections, when LayoutTestController's dumpFrameLoadCallbacks()
     10        returns true.
     11
     12        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
     13        (DumpRenderTreeChrome::createView):
     14        (DumpRenderTreeChrome::onWillSendRequest):
     15        (DumpRenderTreeChrome::onFrameCreated):
     16        (DumpRenderTreeChrome::onFrameRedirectForProvisionalLoad):
     17        (DumpRenderTreeChrome::onFrameRedirectRequested):
     18        (DumpRenderTreeChrome::onResponseReceived):
     19        * DumpRenderTree/efl/DumpRenderTreeChrome.h:
     20        (DumpRenderTreeChrome):
     21
    1222012-05-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
    223
  • trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp

    r116097 r116119  
    113113    evas_object_smart_callback_add(mainFrame, "load,error", onFrameLoadError, 0);
    114114    evas_object_smart_callback_add(mainFrame, "redirect,cancelled", onFrameRedirectCancelled, 0);
     115    evas_object_smart_callback_add(mainFrame, "redirect,load,provisional", onFrameRedirectForProvisionalLoad, 0);
     116    evas_object_smart_callback_add(mainFrame, "redirect,requested", onFrameRedirectRequested, 0);
    115117    evas_object_smart_callback_add(mainFrame, "xss,detected", onDidDetectXSS, 0);
    116118
     
    498500    evas_object_smart_callback_add(frame, "load,error", onFrameLoadError, 0);
    499501    evas_object_smart_callback_add(frame, "redirect,cancelled", onFrameRedirectCancelled, 0);
     502    evas_object_smart_callback_add(frame, "redirect,load,provisional", onFrameRedirectForProvisionalLoad, 0);
     503    evas_object_smart_callback_add(frame, "redirect,requested", onFrameRedirectRequested, 0);
    500504    evas_object_smart_callback_add(frame, "xss,detected", onDidDetectXSS, 0);
    501505}
     
    555559}
    556560
     561void DumpRenderTreeChrome::onFrameRedirectForProvisionalLoad(void*, Evas_Object* frame, void*)
     562{
     563    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
     564        const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
     565        printf("%s - didReceiveServerRedirectForProvisionalLoadForFrame\n", frameName.utf8().data());
     566    }
     567}
     568
     569void DumpRenderTreeChrome::onFrameRedirectRequested(void*, Evas_Object* frame, void* eventInfo)
     570{
     571    const char* url = static_cast<const char*>(eventInfo);
     572
     573    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
     574        const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
     575        printf("%s - willPerformClientRedirectToURL: %s \n", frameName.utf8().data(), pathSuitableForTestResult(url).data());
     576    }
     577}
     578
    557579void DumpRenderTreeChrome::onDidDetectXSS(void*, Evas_Object* view, void*)
    558580{
     
    568590        CString responseDescription(descriptionSuitableForTestResult(response));
    569591        printf("%s - didReceiveResponse %s\n",
    570                pathSuitableForTestResult(response->url).data(),
     592               m_dumpAssignedUrls.contains(response->identifier) ? m_dumpAssignedUrls.get(response->identifier).data() : "<unknown>",
    571593               responseDescription.data());
    572594    }
  • trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h

    r115415 r116119  
    9797
    9898    static void onFrameRedirectCancelled(void*, Evas_Object*, void*);
     99    static void onFrameRedirectForProvisionalLoad(void*, Evas_Object*, void*);
     100    static void onFrameRedirectRequested(void*, Evas_Object*, void*);
    99101
    100102    static void onFrameLoadError(void*, Evas_Object*, void*);
Note: See TracChangeset for help on using the changeset viewer.