Changeset 224337 in webkit
- Timestamp:
- Nov 2, 2017 9:58:00 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r224287 r224337 1 2017-11-02 Chris Dumez <cdumez@apple.com> 2 3 [Service Workers] Add initial implementation for try Clear Registration / Clear Registration algorithms 4 https://bugs.webkit.org/show_bug.cgi?id=179151 5 6 Reviewed by Youenn Fablet. 7 8 Rebbaseline several WPT tests now that registrations are actually removed. 9 10 * web-platform-tests/service-workers/service-worker/multi-globals/url-parsing.https-expected.txt: 11 * web-platform-tests/service-workers/service-worker/registration-basic.https-expected.txt: 12 * web-platform-tests/service-workers/service-worker/registration-scope.https-expected.txt: 13 * web-platform-tests/service-workers/service-worker/serviceworkerobject-scripturl.https-expected.txt: 14 1 15 2017-11-01 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/multi-globals/url-parsing.https-expected.txt
r224218 r224337 2 2 3 3 PASS register should use the relevant global of the object it was called on to resolve the script URL and the default scope URL 4 FAIL register should use the relevant global of the object it was called on to resolve the script URL and the given scope URL assert_equals: the given scope URL should be parsed against the relevant global expected "https://localhost:9443/service-workers/service-worker/multi-globals/relevant/scope" but got "https://localhost:9443/service-workers/service-worker/multi-globals/relevant/" 4 PASS register should use the relevant global of the object it was called on to resolve the script URL and the given scope URL 5 5 FAIL getRegistration should use the relevant global of the object it was called on to resolve the script URL assert_not_equals: the registration from the other frame should not be null got disallowed value null 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/registration-basic.https-expected.txt
r224132 r224337 1 1 2 2 PASS Registering normal scope 3 FAIL Registering scope with fragment assert_equals: A fragment should be removed from scope expected "https://localhost:9443/service-workers/service-worker/resources/registration/scope-with-fragment" but got "https://localhost:9443/service-workers/service-worker/resources/registration/normal" 3 PASS Registering scope with fragment 4 4 PASS Registering same scope as the script directory 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/registration-scope.https-expected.txt
r224132 r224337 3 3 PASS Scope including URL-encoded backslash 4 4 PASS Scope including URL-encoded multibyte characters 5 FAIL Scope including non-escaped multibyte characters assert_equals: Non-URL-encoded multibyte characters should be available. expected "https://localhost:9443/service-workers/service-worker/resources/%EF%BD%93%EF%BD%83%EF%BD%8F%EF%BD%90%EF%BD%85/non-escaped-multibyte-character-scope" but got "https://localhost:9443/service-workers/service-worker/resources/%ef%bd%93%ef%bd%83%ef%bd%8f%ef%bd%90%ef%bd%85/escaped-multibyte-character-scope" 6 FAIL Scope including self-reference assert_equals: Scope including self-reference should be normalized. expected "https://localhost:9443/service-workers/service-worker/resources/scope/self-reference-in-scope" but got "https://localhost:9443/service-workers/service-worker/resources/%ef%bd%93%ef%bd%83%ef%bd%8f%ef%bd%90%ef%bd%85/escaped-multibyte-character-scope" 7 FAIL Scope including parent-reference assert_equals: Scope including parent-reference should be normalized. expected "https://localhost:9443/service-workers/service-worker/resources/scope/parent-reference-in-scope" but got "https://localhost:9443/service-workers/service-worker/resources/%ef%bd%93%ef%bd%83%ef%bd%8f%ef%bd%90%ef%bd%85/escaped-multibyte-character-scope" 8 FAIL Scope including consecutive slashes assert_equals: Should successfully be registered. expected "https://localhost:9443/service-workers/service-worker/resources/scope////consecutive-slashes-in-scope" but got "https://localhost:9443/service-workers/service-worker/resources/%ef%bd%93%ef%bd%83%ef%bd%8f%ef%bd%90%ef%bd%85/escaped-multibyte-character-scope" 5 PASS Scope including non-escaped multibyte characters 6 PASS Scope including self-reference 7 PASS Scope including parent-reference 8 PASS Scope including consecutive slashes 9 9 FAIL Scope URL is same-origin filesystem: URL assert_throws: Registering with the scope that has same-origin filesystem: URL should fail with SecurityError. function "function () { throw e }" threw object "TypeError: Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS" that is not a DOMException SecurityError: property "code" is equal to undefined, expected 18 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/serviceworkerobject-scripturl.https-expected.txt
r224218 r224337 1 1 2 2 PASS Verify the scriptURL property: relative 3 PASS Verify the scriptURL property: with-fragment 3 FAIL Verify the scriptURL property: with-fragment assert_equals: Returned ServiceWorker object should have scriptURL expected "https://localhost:9443/service-workers/service-worker/resources/empty-worker.js" but got "https://localhost:9443/service-workers/service-worker/resources/empty-worker.js#ref" 4 4 PASS Verify the scriptURL property: absolute 5 5 -
trunk/Source/WebCore/ChangeLog
r224336 r224337 1 2017-11-02 Chris Dumez <cdumez@apple.com> 2 3 [Service Workers] Add initial implementation for try Clear Registration / Clear Registration algorithms 4 https://bugs.webkit.org/show_bug.cgi?id=179151 5 6 Reviewed by Youenn Fablet. 7 8 [Service Workers] Add initial implementation for try Clear Registration / Clear Registration algorithms: 9 - https://w3c.github.io/ServiceWorker/#try-clear-registration 10 - https://w3c.github.io/ServiceWorker/#clear-registration 11 12 * workers/service/server/SWServerJobQueue.cpp: 13 (WebCore::SWServerJobQueue::scriptFetchFinished): 14 (WebCore::SWServerJobQueue::runUnregisterJob): 15 (WebCore::SWServerJobQueue::tryClearRegistration): 16 (WebCore::SWServerJobQueue::clearRegistration): 17 * workers/service/server/SWServerJobQueue.h: 18 1 19 2017-11-02 Antti Koivisto <antti@apple.com> 2 20 -
trunk/Source/WebCore/workers/service/server/SWServerJobQueue.cpp
r224306 r224337 70 70 ASSERT(m_currentJob && m_currentJob->identifier() == result.jobIdentifier); 71 71 72 auto* registration = m_server.getRegistration(m_registrationKey); 73 ASSERT(registration); 74 72 75 if (!result.scriptError.isNull()) { 73 76 rejectCurrentJob(ExceptionData { UnknownError, makeString("Script URL ", m_currentJob->scriptURL.string(), " fetch resulted in error: ", result.scriptError.localizedDescription()) }); 74 77 75 78 // If newestWorker is null, invoke Clear Registration algorithm passing this registration as its argument. 76 // FIXME: We don't have "clear registration" yet. 79 if (!registration->getNewestWorker()) 80 clearRegistration(*registration); 77 81 78 82 return; … … 179 183 resolveCurrentUnregistrationJob(true); 180 184 181 // FIXME: Invoke Try Clear Registration with registration. 185 // Invoke Try Clear Registration with registration. 186 tryClearRegistration(*registration); 187 } 188 189 // https://w3c.github.io/ServiceWorker/#try-clear-registration-algorithm 190 void SWServerJobQueue::tryClearRegistration(SWServerRegistration& registration) 191 { 192 // FIXME: Make sure that the registration has no service worker client. 193 194 // FIXME: The specification has more complex logic here. 195 if (!registration.getNewestWorker()) 196 clearRegistration(registration); 197 } 198 199 // https://w3c.github.io/ServiceWorker/#clear-registration 200 void SWServerJobQueue::clearRegistration(SWServerRegistration& registration) 201 { 202 // FIXME: Update / terminate the registration's service workers. 203 m_server.removeRegistration(registration.key()); 182 204 } 183 205 -
trunk/Source/WebCore/workers/service/server/SWServerJobQueue.h
r224306 r224337 59 59 void runUpdateJob(const ServiceWorkerJobData&); 60 60 61 void tryClearRegistration(SWServerRegistration&); 62 void clearRegistration(SWServerRegistration&); 63 61 64 Deque<ServiceWorkerJobData> m_jobQueue; 62 65 std::unique_ptr<ServiceWorkerJobData> m_currentJob;
Note: See TracChangeset
for help on using the changeset viewer.