-
commit-queue@webkit.org authored
Reviewed by Dumitru Daniliuc. Add a layout test to verify the expected number of progress events are raised by the appcache, and that those events have properly set 'lengthComputable', 'loaded', and 'total' attributes. Also update a couple of other tests that depend on counting the number of progress events to determine success or failure to now expect the additional final progress event that is being raised. https://bugs.webkit.org/show_bug.cgi?id=37602 * http/tests/appcache/foreign-iframe-main-expected.txt: * http/tests/appcache/progress-counter-expected.txt: Added. * http/tests/appcache/progress-counter.html: Added. * http/tests/appcache/resources/different-https-origin-resource.html: * http/tests/appcache/resources/progress-counter.manifest: Added. 2010-07-09 Michael Nordman <michaeln@google.com> Reviewed by Dumitru Daniliuc. Use class ProgressEvent when raising appcache related progress events and set the 'total', 'loaded', and 'lengthComputable' attributes. Also raise the final progress event with the 'total' and 'loaded' attribute values are equal to one another to keep pace with the spec for this feature. https://bugs.webkit.org/show_bug.cgi?id=37602 Test: http/tests/appcache/progress-counter.html * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): (WebCore::ApplicationCacheGroup::startLoadingEntry): (WebCore::CallCacheListenerTask::create): (WebCore::CallCacheListenerTask::performTask): (WebCore::CallCacheListenerTask::CallCacheListenerTask): (WebCore::ApplicationCacheGroup::postListenerTask): * loader/appcache/ApplicationCacheGroup.h: (WebCore::ApplicationCacheGroup::postListenerTask): * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): (WebCore::ApplicationCacheHost::stopDeferringEvents): (WebCore::ApplicationCacheHost::dispatchDOMEvent): * loader/appcache/ApplicationCacheHost.h: (WebCore::ApplicationCacheHost::DeferredEvent::DeferredEvent): 2010-07-09 Michael Nordman <michaeln@google.com> Reviewed by Dumitru Daniliuc. Use class ProgressEvent when raising appcache related progress events and set the 'total', 'loaded', and 'lengthComputable' attributes. Also raise the final progress event with the 'total' and 'loaded' attribute values are equal to one another to keep pace with the spec for this feature. https://bugs.webkit.org/show_bug.cgi?id=37602 * src/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): (WebCore::ApplicationCacheHost::stopDeferringEvents): (WebCore::ApplicationCacheHost::dispatchDOMEvent): * src/ApplicationCacheHostInternal.h: (WebCore::ApplicationCacheHostInternal::notifyEventListener): (WebCore::ApplicationCacheHostInternal::notifyProgressEventListener): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
71efdccd