Changeset 201414 in webkit
- Timestamp:
- May 25, 2016 10:33:58 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201412 r201414 1 2016-05-25 Yoav Weiss <yoav@yoav.ws> 2 3 Fix ResourceTiming XHR flakiness 4 https://bugs.webkit.org/show_bug.cgi?id=158019 5 6 Reviewed by Alex Christensen. 7 8 Test fixes and additions that make sure XHR tests are not run as part of XHR's onload event, as ResourceTiming entries are added 9 after it. 10 11 * TestExpectations: 12 * http/tests/performance/performance-resource-timing-cached-entries.html: Avoid running the tests as part of the XHR's load event. 13 * http/tests/performance/performance-resource-timing-xhr-single-entry-expected.txt: Added. 14 * http/tests/performance/performance-resource-timing-xhr-single-entry.html: Test that XHR fetch adds a single entry with correct initiatorType. 15 1 16 2016-05-25 Benjamin Poulain <benjamin@webkit.org> 2 17 -
trunk/LayoutTests/TestExpectations
r201400 r201414 979 979 webkit.org/b/156631 fast/text/font-face-javascript.html [ Pass Crash Failure ] 980 980 981 webkit.org/b/157816 http/tests/performance/performance-resource-timing-cached-entries.html [ Pass Failure ]982 983 981 webkit.org/b/157849 fast/frames/crash-during-iframe-load-stop.html [ Pass Timeout ] 984 982 -
trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html
r201130 r201414 33 33 xhr.addEventListener("load", function() { 34 34 if (windowLoaded) 35 runTest();35 setTimeout(runTest, 0); 36 36 xhrLoaded = true; 37 37 }); -
trunk/LayoutTests/http/tests/performance/performance-resource-timing-xhr-single-entry.html
r201413 r201414 8 8 testRunner.waitUntilDone(); 9 9 } 10 if (window.performance)11 console.log("current entries: " + performance.getEntriesByType('resource').length);12 10 </script> 13 11 <script src="../../resources/js-test-pre.js"></script> 14 <img src="../../resources/square100.png">15 12 <script> 16 13 var foundResource = 0; 14 var initiator; 17 15 var runTest = function() { 18 16 var resources = performance.getEntriesByType('resource'); 19 17 for (var i = 0; i < resources.length; ++i) { 20 console.log("entry: " + resources[i].name); 21 if (resources[i].name.indexOf("square") != -1) 18 if (resources[i].name.indexOf("square") != -1) { 22 19 ++foundResource; 20 initiator = resources[i].initiatorType; 21 } 23 22 }; 24 shouldBe("foundResource", "2"); 23 shouldBe("foundResource", "1"); 24 shouldBeEqualToString("initiator", "xmlhttprequest"); 25 25 if (window.internals) 26 26 window.internals.setResourceTimingSupport(false); … … 28 28 testRunner.notifyDone(); 29 29 }; 30 var windowLoaded = false;31 var xhrLoaded = false;32 30 var xhr = new XMLHttpRequest(); 33 31 xhr.addEventListener("load", function() { 34 if (windowLoaded) 35 runTest(); 36 xhrLoaded = true; 32 setTimeout(runTest, 0); 37 33 }); 38 34 xhr.open("GET", "../../resources/square100.png"); 39 35 xhr.send(); 40 window.addEventListener("load", function() {41 if (xhrLoaded)42 runTest();43 windowLoaded = true;44 });45 36 </script> 46 37 </body> -
trunk/Source/WebCore/ChangeLog
r201413 r201414 1 2016-05-25 Yoav Weiss <yoav@yoav.ws> 2 3 Fix ResourceTiming XHR flakiness 4 https://bugs.webkit.org/show_bug.cgi?id=158019 5 6 Reviewed by Alex Christensen. 7 8 Remove XHR specific ResourceTiming information store and addition as it is not needed. 9 10 Test: http/tests/performance/performance-resource-timing-xhr-single-entry.html 11 12 * loader/DocumentThreadableLoader.cpp: 13 (WebCore::DocumentThreadableLoader::loadRequest): Removed XHR-specific initiator info storage. 14 (WebCore::DocumentThreadableLoader::didFinishLoading): Removed XHR-specific RT entry addition. 15 * loader/DocumentThreadableLoader.h: 16 1 17 2016-05-25 Konstantin Tokarev <annulen@yandex.ru> 2 18 -
trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp
r201018 r201414 326 326 void DocumentThreadableLoader::didFinishLoading(unsigned long identifier, double finishTime) 327 327 { 328 #if ENABLE(WEB_TIMING)329 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())330 m_resourceTimingInfo.addResourceTiming(m_resource.get(), &m_document);331 #endif332 333 328 if (m_actualRequest) { 334 329 InspectorInstrumentation::didFinishLoading(m_document.frame(), m_document.frame()->loader().documentLoader(), identifier, finishTime); … … 396 391 ASSERT(!m_resource); 397 392 m_resource = m_document.cachedResourceLoader().requestRawResource(newRequest); 398 if (m_resource) {393 if (m_resource) 399 394 m_resource->addClient(this); 400 401 #if ENABLE(WEB_TIMING)402 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())403 m_resourceTimingInfo.storeResourceTimingInitiatorInformation(m_resource, newRequest, m_document.frame());404 #endif405 }406 395 407 396 return; -
trunk/Source/WebCore/loader/DocumentThreadableLoader.h
r201018 r201414 34 34 #include "CachedRawResourceClient.h" 35 35 #include "CachedResourceHandle.h" 36 #include "ResourceTimingInformation.h"37 36 #include "ThreadableLoader.h" 38 37 … … 107 106 Document& m_document; 108 107 ThreadableLoaderOptions m_options; 109 #if ENABLE(WEB_TIMING)110 ResourceTimingInformation m_resourceTimingInfo;111 #endif112 108 bool m_sameOriginRequest; 113 109 bool m_simpleRequest;
Note: See TracChangeset
for help on using the changeset viewer.