Changeset 115415 in webkit
- Timestamp:
- Apr 27, 2012 2:47:05 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r115413 r115415 1 2012-04-27 Christophe Dumez <christophe.dumez@intel.com> 2 3 [EFL] DRT should support LayoutTestController's dumpResourceLoadCallbacks() 4 https://bugs.webkit.org/show_bug.cgi?id=81891 5 6 Reviewed by Philippe Normand. 7 8 Unskip tests which depend on EFL's DumpRenderTree support for 9 LayoutTestController's dumpResourceLoadCallbacks(), now that it is 10 implemented. 11 12 * platform/efl/Skipped: 13 1 14 2012-04-27 Marcus Bulach <bulach@chromium.org> 2 15 -
trunk/LayoutTests/platform/efl/Skipped
r115341 r115415 641 641 fast/loader/file-protocol-fragment.html 642 642 643 # Missing delegates: tests failing because of missing resource load delegate callbacks.644 fast/loader/main-document-url-for-non-http-loads.html645 http/tests/misc/link-rel-icon-beforeload.html646 647 643 # Missing delegates: tests failing because of missing policy delegate callbacks. 648 644 fast/loader/onload-policy-ignore-for-frame.html … … 697 693 # BUG: Missing resource load callback ability in DRT 698 694 http/tests/loading/redirect-methods.html 699 http/tests/misc/favicon-loads-with-images-disabled.html700 695 701 696 # Requires willSendRequestReturnsNullOnRedirect + willSendRequest + didFinishLoading … … 999 994 http/tests/misc/policy-delegate-called-twice.html 1000 995 http/tests/misc/redirect-to-external-url.html 1001 http/tests/misc/window-dot-stop.html1002 996 http/tests/multipart/policy-ignore-crash.php 1003 997 http/tests/security/feed-urls-from-remote.html 998 999 # ResourceError domain needs to be properly set in FrameLoaderClient 1000 # https://bugs.webkit.org/show_bug.cgi?id=84129 1001 http/tests/misc/window-dot-stop.html 1002 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html 1003 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html 1004 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html 1005 http/tests/security/XFrameOptions/x-frame-options-deny.html 1006 http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html 1007 http/tests/xmlhttprequest/abort-should-cancel-load.html 1004 1008 1005 1009 # Test times out (via GTK+) … … 2095 2099 http/tests/security/xss-DENIED-xsl-document-redirect.xml 2096 2100 http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml 2097 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html2098 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html2099 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html2100 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html2101 http/tests/security/XFrameOptions/x-frame-options-deny.html2102 http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html2103 http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html2104 2101 http/tests/ssl/referer-301.html 2105 2102 http/tests/ssl/referer-303.html 2106 2103 http/tests/ssl/verify-ssl-enabled.php 2107 2104 http/tests/workers/terminate-during-sync-operation.html 2108 http/tests/xmlhttprequest/abort-should-cancel-load.html2109 2105 http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html 2110 2106 http/tests/xmlhttprequest/basic-auth-nopassword.html -
trunk/Source/WebKit/efl/ChangeLog
r115385 r115415 1 2012-04-27 Christophe Dumez <christophe.dumez@intel.com> 2 3 [EFL] DRT should support LayoutTestController's dumpResourceLoadCallbacks() 4 https://bugs.webkit.org/show_bug.cgi?id=81891 5 6 Reviewed by Philippe Normand. 7 8 New "load,resource,finished", "load,resource,failed", and 9 "resource,response,received" signals were added to notify about different 10 resource load events. These additional signals are needed for proper 11 support of LayoutTestController's dumpResourceLoadCallbacks() in EFL's 12 DumpRenderTree. 13 14 * WebCoreSupport/FrameLoaderClientEfl.cpp: 15 (WebCore::FrameLoaderClientEfl::assignIdentifierToInitialRequest): 16 (WebCore::FrameLoaderClientEfl::dispatchDidReceiveResponse): 17 (WebCore::FrameLoaderClientEfl::dispatchDidFinishLoading): 18 (WebCore::FrameLoaderClientEfl::dispatchDidFailLoading): 19 * ewk/ewk_frame.cpp: 20 (ewk_frame_response_received): 21 (ewk_frame_load_finished): 22 (ewk_frame_load_resource_finished): 23 (ewk_frame_load_resource_failed): 24 (ewk_frame_load_error): 25 * ewk/ewk_frame.h: 26 * ewk/ewk_private.h: 27 * ewk/ewk_view.h: 28 1 29 2012-04-26 Martin Robinson <mrobinson@igalia.com> 2 30 -
trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
r115294 r115415 235 235 Ewk_Frame_Resource_Request request = { url.data(), firstParty.data(), httpMethod.data(), identifier, m_frame, isMainFrameRequest }; 236 236 ewk_frame_request_assign_identifier(m_frame, &request); 237 evas_object_smart_callback_call(m_view, "resource,request,new", &request); 237 238 } 238 239 … … 262 263 } 263 264 264 void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long, const ResourceResponse& response)265 void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long, const ResourceResponse& coreResponse) 265 266 { 266 267 // Update our knowledge of request soup flags - some are only set 267 268 // after the request is done. 268 loader->request().setSoupMessageFlags(response.soupMessageFlags()); 269 270 m_response = response; 269 loader->request().setSoupMessageFlags(coreResponse.soupMessageFlags()); 270 271 m_response = coreResponse; 272 273 Ewk_Frame_Resource_Response response = { 0, coreResponse.httpStatusCode() }; 274 CString url = coreResponse.url().string().utf8(); 275 response.url = url.data(); 276 277 ewk_frame_response_received(m_frame, &response); 278 evas_object_smart_callback_call(m_view, "resource,response,received", &response); 271 279 } 272 280 … … 749 757 void FrameLoaderClientEfl::dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier) 750 758 { 751 notImplemented(); 752 } 753 754 void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& err) 755 { 756 notImplemented(); 759 ewk_frame_load_resource_finished(m_frame, identifier); 760 evas_object_smart_callback_call(m_view, "load,resource,finished", &identifier); 761 } 762 763 void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError& err) 764 { 765 Ewk_Frame_Load_Error error; 766 CString errorDomain = err.domain().utf8(); 767 CString errorDescription = err.localizedDescription().utf8(); 768 CString failingUrl = err.failingURL().utf8(); 769 770 DBG("ewkFrame=%p, resource=%ld, error=%s (%d, cancellation=%hhu) \"%s\", url=%s", 771 m_frame, identifier, errorDomain.data(), err.errorCode(), err.isCancellation(), 772 errorDescription.data(), failingUrl.data()); 773 774 error.code = err.errorCode(); 775 error.is_cancellation = err.isCancellation(); 776 error.domain = errorDomain.data(); 777 error.description = errorDescription.data(); 778 error.failing_url = failingUrl.data(); 779 error.resource_identifier = identifier; 780 error.frame = m_frame; 781 782 ewk_frame_load_resource_failed(m_frame, &error); 783 evas_object_smart_callback_call(m_view, "load,resource,failed", &error); 757 784 } 758 785 -
trunk/Source/WebKit/efl/ewk/ewk_frame.cpp
r115294 r115415 1231 1231 * 1232 1232 * @param ewkFrame Frame. 1233 * @param @parammessages Messages containing the request details that user may override and a1233 * @param messages Messages containing the request details that user may override and a 1234 1234 * possible redirect reponse. Whenever values on this struct changes, it must be properly 1235 1235 * malloc'd as it will be freed afterwards. … … 1254 1254 { 1255 1255 evas_object_smart_callback_call(ewkFrame, "resource,request,new", (void*)request); 1256 } 1257 1258 /** 1259 * @internal 1260 * Reports that a response to a resource request was received. 1261 * 1262 * @param ewkFrame Frame. 1263 * @param request Response details. No changes are allowed to fields. 1264 * 1265 * Emits signal: "resource,response,received" 1266 */ 1267 void ewk_frame_response_received(Evas_Object* ewkFrame, Ewk_Frame_Resource_Response* response) 1268 { 1269 evas_object_smart_callback_call(ewkFrame, "resource,response,received", response); 1256 1270 } 1257 1271 … … 1393 1407 buffer.description = errorDescription; 1394 1408 buffer.failing_url = failingUrl; 1409 buffer.resource_identifier = 0; 1395 1410 buffer.frame = ewkFrame; 1396 1411 error = &buffer; … … 1399 1414 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData); 1400 1415 ewk_view_load_finished(smartData->view, error); 1416 } 1417 1418 /** 1419 * @internal 1420 * Reports resource load finished. 1421 * 1422 * Emits signal: "load,resource,finished" with the resource 1423 * request identifier. 1424 */ 1425 void ewk_frame_load_resource_finished(Evas_Object* ewkFrame, unsigned long identifier) 1426 { 1427 evas_object_smart_callback_call(ewkFrame, "load,resource,finished", &identifier); 1428 } 1429 1430 /** 1431 * @internal 1432 * Reports resource load failure, with error information. 1433 * 1434 * Emits signal: "load,resource,failed" with the error information. 1435 */ 1436 void ewk_frame_load_resource_failed(Evas_Object* ewkFrame, Ewk_Frame_Load_Error* error) 1437 { 1438 evas_object_smart_callback_call(ewkFrame, "load,resource,failed", error); 1401 1439 } 1402 1440 … … 1422 1460 error.description = errorDescription; 1423 1461 error.failing_url = failingUrl; 1462 error.resource_identifier = 0; 1424 1463 error.frame = ewkFrame; 1425 1464 evas_object_smart_callback_call(ewkFrame, "load,error", &error); -
trunk/Source/WebKit/efl/ewk/ewk_frame.h
r115294 r115415 47 47 * finished and it gives @c NULL on success or pointer to 48 48 * structure defining the error. 49 * - "load,resource,finished", unsigned long*: reports resource load finished and it gives 50 * a pointer to its identifier. 51 * - "load,resource,failed", Ewk_Frame_Load_Error*: reports resource load failure and it 52 * gives a pointer to structure defining the error as an argument. 49 53 * - "load,firstlayout,finished", void: frame finished first layout. 50 54 * - "load,nonemptylayout,finished", void: frame finished first … … 62 66 * - "resource,request,willsend", Ewk_Frame_Resource_Messages*: a resource will be requested. 63 67 * and the possible redirect response. 68 * - "resource,response,received", Ewk_Frame_Resource_Response*: reports that a response 69 * to a resource request was received. 64 70 * - "state,save", void: frame's state will be saved as a history item. 65 71 * - "title,changed", const char*: title of the main frame was changed. … … 97 103 const char *description; /**< error description already localized */ 98 104 const char *failing_url; /**< the url that failed to load */ 105 unsigned long resource_identifier; /**< identifier of resource */ 99 106 Evas_Object *frame; /**< frame where the failure happened */ 100 107 }; -
trunk/Source/WebKit/efl/ewk/ewk_private.h
r115294 r115415 221 221 void ewk_frame_load_document_finished(Evas_Object* ewkFrame); 222 222 void ewk_frame_load_finished(Evas_Object* ewkFrame, const char* errorDomain, int errorCode, bool isCancellation, const char* errorDescription, const char* failingUrl); 223 void ewk_frame_load_resource_finished(Evas_Object* ewkFrame, unsigned long identifier); 224 void ewk_frame_load_resource_failed(Evas_Object* ewkFrame, Ewk_Frame_Load_Error* error); 223 225 void ewk_frame_load_error(Evas_Object* ewkFrame, const char* errorDomain, int errorCode, bool isCancellation, const char* errorDescription, const char* failingUrl); 224 226 void ewk_frame_load_progress_changed(Evas_Object* ewkFrame); … … 227 229 void ewk_frame_request_will_send(Evas_Object* ewkFrame, Ewk_Frame_Resource_Messages* messages); 228 230 void ewk_frame_request_assign_identifier(Evas_Object* ewkFrame, const Ewk_Frame_Resource_Request* request); 231 void ewk_frame_response_received(Evas_Object* ewkFrame, Ewk_Frame_Resource_Response* response); 229 232 void ewk_frame_view_state_save(Evas_Object* ewkFrame, WebCore::HistoryItem* item); 230 233 -
trunk/Source/WebKit/efl/ewk/ewk_view.h
r115341 r115415 61 61 * from 0.0 to 1.0, connect to individual frames for fine grained). 62 62 * - "load,provisional", void: view started provisional load. 63 * - "load,resource,finished", unsigned long*: reports resource load finished and it gives 64 * a pointer to its identifier. 65 * - "load,resource,failed", Ewk_Frame_Load_Error*: reports resource load failure and it 66 * gives a pointer to structure defining the error as an argument. 63 67 * - "load,started", Evas_Object*: frame started loading the document. 64 68 * - "menubar,visible,get", Eina_Bool *: expects a @c EINA_TRUE if menubar is … … 69 73 * - "onload,event", Evas_Object*: a frame onload event has been received. 70 74 * - "ready", void: page is fully loaded. 75 * - "resource,request,new", Ewk_Frame_Resource_Request*: reports that 76 * there's a new resource request. 71 77 * - "resource,request,willsend", Ewk_Frame_Resource_Messages*: a resource will be requested. 72 78 * and the possible redirect response. 79 * - "resource,response,received", Ewk_Frame_Resource_Response*: the network response for a resource. 73 80 * - "scrollbars,visible,get", Eina_Bool *: expects a @c EINA_TRUE if scrollbars 74 81 * are visible; @c EINA_FALSE, otherwise. -
trunk/Tools/ChangeLog
r115414 r115415 1 2012-04-27 Christophe Dumez <christophe.dumez@intel.com> 2 3 [EFL] DRT should support LayoutTestController's dumpResourceLoadCallbacks() 4 https://bugs.webkit.org/show_bug.cgi?id=81891 5 6 Reviewed by Philippe Normand. 7 8 Implement support for LayoutTestController's 9 dumpResourceLoadCallbacks() in EFL's DumpRenderTree by catching new 10 ewk_view signals about resource loading and print out the expected 11 information. This allows for several test cases to be removed from the 12 skip list. 13 14 * DumpRenderTree/efl/DumpRenderTreeChrome.cpp: 15 (DumpRenderTreeChrome::createView): 16 (descriptionSuitableForTestResult): 17 (DumpRenderTreeChrome::onResponseReceived): 18 (DumpRenderTreeChrome::onResourceLoadFinished): 19 (DumpRenderTreeChrome::onResourceLoadFailed): 20 (DumpRenderTreeChrome::onNewResourceRequest): 21 * DumpRenderTree/efl/DumpRenderTreeChrome.h: 22 (DumpRenderTreeChrome): 23 1 24 2012-04-27 Philippe Normand <pnormand@igalia.com> 2 25 -
trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
r115332 r115415 48 48 using namespace WebCore; 49 49 50 HashMap<unsigned long, CString> DumpRenderTreeChrome::m_dumpAssignedUrls; 51 50 52 PassOwnPtr<DumpRenderTreeChrome> DumpRenderTreeChrome::create(Evas* evas) 51 53 { … … 90 92 ewk_view_theme_set(view, DATA_DIR"/default.edj"); 91 93 94 evas_object_smart_callback_add(view, "load,resource,failed", onResourceLoadFailed, 0); 95 evas_object_smart_callback_add(view, "load,resource,finished", onResourceLoadFinished, 0); 92 96 evas_object_smart_callback_add(view, "load,started", onLoadStarted, 0); 93 97 evas_object_smart_callback_add(view, "title,changed", onTitleChanged, 0); … … 95 99 evas_object_smart_callback_add(view, "statusbar,text,set", onStatusbarTextSet, 0); 96 100 evas_object_smart_callback_add(view, "load,document,finished", onDocumentLoadFinished, 0); 101 evas_object_smart_callback_add(view, "resource,request,new", onNewResourceRequest, 0); 97 102 evas_object_smart_callback_add(view, "resource,request,willsend", onWillSendRequest, 0); 103 evas_object_smart_callback_add(view, "resource,response,received", onResponseReceived, 0); 98 104 evas_object_smart_callback_add(view, "onload,event", onWebViewOnloadEvent, 0); 99 105 evas_object_smart_callback_add(view, "mixedcontent,run", onInsecureContentRun, 0); … … 311 317 } 312 318 319 static CString descriptionSuitableForTestResult(Ewk_Frame_Load_Error* error) 320 { 321 String ret = "<NSError domain "; 322 ret += error->domain; 323 ret += ", code "; 324 ret += String::number(error->code); 325 if (error->failing_url && *error->failing_url != '\0') { 326 ret += ", failing URL \""; 327 ret += error->failing_url; 328 ret += "\""; 329 } 330 ret += ">"; 331 332 return ret.utf8(); 333 } 334 313 335 // Smart Callbacks 314 336 // --------------- … … 523 545 printf("didDetectXSS\n"); 524 546 } 547 548 void DumpRenderTreeChrome::onResponseReceived(void*, Evas_Object*, void* eventInfo) 549 { 550 Ewk_Frame_Resource_Response* response = static_cast<Ewk_Frame_Resource_Response*>(eventInfo); 551 552 if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) { 553 CString responseDescription(descriptionSuitableForTestResult(response)); 554 printf("%s - didReceiveResponse %s\n", 555 pathSuitableForTestResult(response->url).data(), 556 responseDescription.data()); 557 } 558 } 559 560 void DumpRenderTreeChrome::onResourceLoadFinished(void*, Evas_Object*, void* eventInfo) 561 { 562 unsigned long identifier = *static_cast<unsigned long*>(eventInfo); 563 564 if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) 565 printf("%s - didFinishLoading\n", 566 (m_dumpAssignedUrls.contains(identifier) ? m_dumpAssignedUrls.take(identifier).data() : "<unknown>")); 567 } 568 569 void DumpRenderTreeChrome::onResourceLoadFailed(void*, Evas_Object*, void* eventInfo) 570 { 571 Ewk_Frame_Load_Error* error = static_cast<Ewk_Frame_Load_Error*>(eventInfo); 572 573 if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) 574 printf("%s - didFailLoadingWithError: %s\n", 575 (m_dumpAssignedUrls.contains(error->resource_identifier) ? m_dumpAssignedUrls.take(error->resource_identifier).data() : "<unknown>"), 576 descriptionSuitableForTestResult(error).data()); 577 } 578 579 void DumpRenderTreeChrome::onNewResourceRequest(void*, Evas_Object*, void* eventInfo) 580 { 581 Ewk_Frame_Resource_Request* request = static_cast<Ewk_Frame_Resource_Request*>(eventInfo); 582 583 if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) 584 m_dumpAssignedUrls.add(request->identifier, pathSuitableForTestResult(request->url)); 585 } -
trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h
r114633 r115415 32 32 #include <Eina.h> 33 33 #include <Evas.h> 34 #include <wtf/HashMap.h> 34 35 #include <wtf/OwnPtr.h> 35 36 #include <wtf/PassOwnPtr.h> 36 37 #include <wtf/Vector.h> 38 #include <wtf/text/CString.h> 37 39 38 40 class DumpRenderTreeChrome { … … 62 64 OwnPtr<GCController> m_gcController; 63 65 Vector<Evas_Object*> m_extraViews; 66 static HashMap<unsigned long, CString> m_dumpAssignedUrls; 64 67 65 68 // Smart callbacks … … 97 100 static void onFrameLoadError(void*, Evas_Object*, void*); 98 101 static void onDidDetectXSS(void*, Evas_Object*, void*); 102 103 static void onResponseReceived(void*, Evas_Object*, void*); 104 105 static void onResourceLoadFinished(void*, Evas_Object*, void*); 106 107 static void onResourceLoadFailed(void*, Evas_Object*, void*); 108 109 static void onNewResourceRequest(void*, Evas_Object*, void*); 99 110 }; 100 111
Note: See TracChangeset
for help on using the changeset viewer.