Changeset 264542 in webkit
- Timestamp:
- Jul 17, 2020, 3:57:05 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 28 added
- 8 deleted
- 9 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r264541 r264542 1 2020-07-17 Chris Dumez <cdumez@apple.com> 2 3 Resync web-platform-tests/background-fetch from upstream 4 https://bugs.webkit.org/show_bug.cgi?id=214495 5 6 Reviewed by Geoffrey Garen. 7 8 Resync web-platform-tests/background-fetch from upstream 81de986322a0de90f2. 9 10 * resources/import-expectations.json: 11 * web-platform-tests/background-fetch/META.yml: Added. 12 * web-platform-tests/background-fetch/OWNERS: Removed. 13 * web-platform-tests/background-fetch/abort.https.window.html: Added. 14 * web-platform-tests/background-fetch/abort.https.window.js: Added. 15 (backgroundFetchTest.async test): 16 (backgroundFetch.await.new.Promise.resolve.registration.onprogress.async event): 17 * web-platform-tests/background-fetch/content-security-policy.https.window.html: Added. 18 * web-platform-tests/background-fetch/content-security-policy.https.window.js: 19 (backgroundFetchTest): 20 * web-platform-tests/background-fetch/credentials-in-url.https.window.js: Removed. 21 * web-platform-tests/background-fetch/dangling-markup.https.window.js: Removed. 22 * web-platform-tests/background-fetch/fetch-uploads.https.window.html: Added. 23 * web-platform-tests/background-fetch/fetch-uploads.https.window.js: Added. 24 (backgroundFetchTest.async test): 25 * web-platform-tests/background-fetch/fetch.https.window.html: Added. 26 * web-platform-tests/background-fetch/fetch.https.window.js: Added. 27 (promise_test.async test): 28 (backgroundFetchTest.async test): 29 * web-platform-tests/background-fetch/get-ids.https.window.html: Added. 30 * web-platform-tests/background-fetch/get-ids.https.window.js: Added. 31 (promise_test.async test): 32 (backgroundFetchTest.async test): 33 * web-platform-tests/background-fetch/get.https.window.html: Added. 34 * web-platform-tests/background-fetch/get.https.window.js: Added. 35 (promise_test.async test): 36 (backgroundFetchTest.async test): 37 * web-platform-tests/background-fetch/idlharness.https.any.html: Added. 38 * web-platform-tests/background-fetch/idlharness.https.any.js: Added. 39 * web-platform-tests/background-fetch/idlharness.https.any.worker.html: Added. 40 * web-platform-tests/background-fetch/interfaces-worker.https-expected.txt: Removed. 41 * web-platform-tests/background-fetch/interfaces-worker.https.html: Removed. 42 * web-platform-tests/background-fetch/interfaces.html: Removed. 43 * web-platform-tests/background-fetch/interfaces.worker.js: Removed. 44 * web-platform-tests/background-fetch/match.https.window.html: Added. 45 * web-platform-tests/background-fetch/match.https.window.js: Added. 46 (backgroundFetchTest.async test): 47 * web-platform-tests/background-fetch/mixed-content-and-allowed-schemes.https.window.html: Added. 48 * web-platform-tests/background-fetch/mixed-content-and-allowed-schemes.https.window.js: 49 (backgroundFetchTest): 50 * web-platform-tests/background-fetch/port-blocking.https.window.html: Added. 51 * web-platform-tests/background-fetch/port-blocking.https.window.js: 52 (backgroundFetchTest): 53 * web-platform-tests/background-fetch/resources/feature-name.txt: Added. 54 * web-platform-tests/background-fetch/resources/sw.js: Removed. 55 * web-platform-tests/background-fetch/resources/upload.py: Added. 56 (main): 57 * web-platform-tests/background-fetch/resources/utils.js: 58 (async getMessageFromServiceWorker.return.new.Promise): 59 (async getMessageFromServiceWorker): 60 (async registerAndActivateServiceWorker): 61 (backgroundFetchTest): 62 (async uniqueId): 63 * web-platform-tests/background-fetch/resources/w3c-import.log: 64 * web-platform-tests/background-fetch/service_workers/sw-abort.js: Added. 65 (async getFetchResult): 66 * web-platform-tests/background-fetch/service_workers/sw-helpers.js: Added. 67 (sendMessageToDocument): 68 (cloneRegistration.deepCopy): 69 (cloneRegistration): 70 * web-platform-tests/background-fetch/service_workers/sw-update-ui.js: Added. 71 (async updateUI): 72 * web-platform-tests/background-fetch/service_workers/sw.js: Added. 73 (async getFetchResult): 74 (handleBackgroundFetchEvent.switch.async bind): 75 * web-platform-tests/background-fetch/service_workers/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/w3c-import.log. 76 * web-platform-tests/background-fetch/update-ui.https.window.html: Added. 77 * web-platform-tests/background-fetch/update-ui.https.window.js: Added. 78 (backgroundFetchTest.async test): 79 * web-platform-tests/background-fetch/w3c-import.log: 80 1 81 2020-07-17 Chris Dumez <cdumez@apple.com> 2 82 -
trunk/LayoutTests/imported/w3c/resources/import-expectations.json
r264432 r264542 51 51 "web-platform-tests/audio-output": "skip", 52 52 "web-platform-tests/auxclick": "skip", 53 "web-platform-tests/background-fetch": "import", 53 54 "web-platform-tests/battery-status": "skip", 54 55 "web-platform-tests/beacon": "import", -
trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/content-security-policy.https.window.js
r222307 r264542 15 15 16 16 backgroundFetchTest((t, bgFetch) => { 17 return promise_rejects (18 t, new TypeError(),19 bgFetch.fetch(unique Tag(), 'https://example.com'));17 return promise_rejects_js( 18 t, TypeError, 19 bgFetch.fetch(uniqueId(), 'https://example.com')); 20 20 }, 'fetch blocked by CSP should reject'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/mixed-content-and-allowed-schemes.https.window.js
r230330 r264542 16 16 17 17 backgroundFetchTest((t, bgFetch) => { 18 return bgFetch.fetch(unique Tag(), 'https://example.com');18 return bgFetch.fetch(uniqueId(), 'https://example.com'); 19 19 }, 'https: fetch should register ok'); 20 20 21 21 backgroundFetchTest((t, bgFetch) => { 22 return bgFetch.fetch(unique Tag(), 'http://127.0.0.1');22 return bgFetch.fetch(uniqueId(), 'http://127.0.0.1'); 23 23 }, 'loopback IPv4 http: fetch should register ok'); 24 24 25 25 backgroundFetchTest((t, bgFetch) => { 26 return bgFetch.fetch(unique Tag(), 'http://[::1]');26 return bgFetch.fetch(uniqueId(), 'http://[::1]'); 27 27 }, 'loopback IPv6 http: fetch should register ok'); 28 28 29 29 backgroundFetchTest((t, bgFetch) => { 30 return bgFetch.fetch(unique Tag(), 'http://localhost');30 return bgFetch.fetch(uniqueId(), 'http://localhost'); 31 31 }, 'localhost http: fetch should register ok'); 32 32 33 33 backgroundFetchTest((t, bgFetch) => { 34 return promise_rejects(t, new TypeError(), 35 bgFetch.fetch(uniqueTag(), 'http://example.com')); 36 }, 'non-loopback http: fetch should reject'); 37 38 backgroundFetchTest((t, bgFetch) => { 39 return promise_rejects(t, new TypeError(), 40 bgFetch.fetch(uniqueTag(), 'http://192.0.2.0')); 41 }, 'non-loopback IPv4 http: fetch should reject'); 42 43 backgroundFetchTest((t, bgFetch) => { 44 return promise_rejects(t, new TypeError(), 45 bgFetch.fetch(uniqueTag(), 'http://[2001:db8::1]')); 46 }, 'non-loopback IPv6 http: fetch should reject'); 47 48 backgroundFetchTest((t, bgFetch) => { 49 return promise_rejects(t, new TypeError(), 50 bgFetch.fetch(uniqueTag(), ['https://example.com', 51 'http://example.com'])); 52 }, 'https: and non-loopback http: fetch should reject'); 53 54 backgroundFetchTest((t, bgFetch) => { 55 return promise_rejects(t, new TypeError(), 56 bgFetch.fetch(uniqueTag(), ['http://example.com', 57 'https://example.com'])); 58 }, 'non-loopback http: and https: fetch should reject'); 59 60 61 backgroundFetchTest((t, bgFetch) => { 62 return promise_rejects(t, new TypeError(), 63 bgFetch.fetch(uniqueTag(), 'wss:127.0.0.1')); 34 return promise_rejects_js(t, TypeError, 35 bgFetch.fetch(uniqueId(), 'wss:127.0.0.1')); 64 36 }, 'wss: fetch should reject'); 65 37 66 38 backgroundFetchTest((t, bgFetch) => { 67 return promise_rejects (t, new TypeError(),68 bgFetch.fetch(unique Tag(), 'file:///'));39 return promise_rejects_js(t, TypeError, 40 bgFetch.fetch(uniqueId(), 'file:///')); 69 41 }, 'file: fetch should reject'); 70 42 71 43 backgroundFetchTest((t, bgFetch) => { 72 return promise_rejects (t, new TypeError(),73 bgFetch.fetch(unique Tag(), 'data:text/plain,foo'));44 return promise_rejects_js(t, TypeError, 45 bgFetch.fetch(uniqueId(), 'data:text/plain,foo')); 74 46 }, 'data: fetch should reject'); 75 47 76 48 backgroundFetchTest((t, bgFetch) => { 77 return promise_rejects (t, new TypeError(),78 bgFetch.fetch(unique Tag(), 'foobar:bazqux'));49 return promise_rejects_js(t, TypeError, 50 bgFetch.fetch(uniqueId(), 'foobar:bazqux')); 79 51 }, 'unknown scheme fetch should reject'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/port-blocking.https.window.js
r222307 r264542 10 10 11 11 backgroundFetchTest((t, bgFetch) => { 12 return bgFetch.fetch(unique Tag(), 'https://example.com');12 return bgFetch.fetch(uniqueId(), 'https://example.com'); 13 13 }, 'fetch to default https port should register ok'); 14 14 15 15 backgroundFetchTest((t, bgFetch) => { 16 return bgFetch.fetch(unique Tag(), 'http://127.0.0.1');16 return bgFetch.fetch(uniqueId(), 'http://127.0.0.1'); 17 17 }, 'fetch to default http port should register ok'); 18 18 19 19 backgroundFetchTest((t, bgFetch) => { 20 return bgFetch.fetch(unique Tag(), 'https://example.com:443');20 return bgFetch.fetch(uniqueId(), 'https://example.com:443'); 21 21 }, 'fetch to port 443 should register ok'); 22 22 23 23 backgroundFetchTest((t, bgFetch) => { 24 return bgFetch.fetch(unique Tag(), 'https://example.com:80');24 return bgFetch.fetch(uniqueId(), 'https://example.com:80'); 25 25 }, 'fetch to port 80 should register ok, even over https'); 26 26 27 27 backgroundFetchTest((t, bgFetch) => { 28 return bgFetch.fetch(unique Tag(), 'https://example.com:8080');28 return bgFetch.fetch(uniqueId(), 'https://example.com:8080'); 29 29 }, 'fetch to non-default non-bad port (8080) should register ok'); 30 30 31 31 backgroundFetchTest((t, bgFetch) => { 32 return promise_rejects (33 t, new TypeError(),34 bgFetch.fetch(unique Tag(), 'https://example.com:587'));32 return promise_rejects_js( 33 t, TypeError, 34 bgFetch.fetch(uniqueId(), 'https://example.com:587')); 35 35 }, 'fetch to bad port (SMTP) should reject'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/utils.js
r222307 r264542 1 1 'use strict'; 2 2 3 let nextBackgroundFetchId = 0; 4 5 // Waits for a single message received from a registered Service Worker. 6 async function getMessageFromServiceWorker() { 7 return new Promise(resolve => { 8 function listener(event) { 9 navigator.serviceWorker.removeEventListener('message', listener); 10 resolve(event.data); 11 } 12 13 navigator.serviceWorker.addEventListener('message', listener); 14 }); 15 } 16 17 // Registers the |name| instrumentation Service Worker located at "service_workers/" 18 // with a scope unique to the test page that's running, and waits for it to be 19 // activated. The Service Worker will be unregistered automatically. 20 // 3 21 // Depends on /service-workers/service-worker/resources/test-helpers.sub.js 4 async function registerAndActivateServiceWorker(test) { 5 const script = 'resources/sw.js'; 6 const scope = 'resources/scope' + location.pathname; 22 async function registerAndActivateServiceWorker(test, name) { 23 const script = `service_workers/${name}`; 24 const scope = 'service_workers/scope' + location.pathname; 25 7 26 let serviceWorkerRegistration = 8 27 await service_worker_unregister_and_register(test, script, scope); 9 add_completion_callback(() => { 10 serviceWorkerRegistration.unregister();11 }); 28 29 add_completion_callback(() => serviceWorkerRegistration.unregister()); 30 12 31 await wait_for_state(test, serviceWorkerRegistration.installing, 'activated'); 13 32 return serviceWorkerRegistration; 14 33 } 15 34 16 function backgroundFetchTest(func, description) { 35 // Creates a Promise test for |func| given the |description|. The |func| will be 36 // executed with the `backgroundFetch` object of an activated Service Worker 37 // Registration. 38 // |workerName| is the name of the service worker file in the service_workers 39 // directory to register. 40 function backgroundFetchTest(func, description, workerName = 'sw.js') { 17 41 promise_test(async t => { 18 const serviceWorkerRegistration = await registerAndActivateServiceWorker(t); 42 const serviceWorkerRegistration = 43 await registerAndActivateServiceWorker(t, workerName); 44 serviceWorkerRegistration.active.postMessage(null); 45 46 assert_equals(await getMessageFromServiceWorker(), 'ready'); 47 19 48 return func(t, serviceWorkerRegistration.backgroundFetch); 20 49 }, description); 21 50 } 22 51 23 let _nextBackgroundFetchTag = 0; 24 function unique Tag() {25 return ' tag' + _nextBackgroundFetchTag++;52 // Returns a Background Fetch ID that's unique for the current page. 53 function uniqueId() { 54 return 'id' + nextBackgroundFetchId++; 26 55 } -
trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/w3c-import.log
r222307 r264542 2 2 Do NOT modify these tests directly in WebKit. 3 3 Instead, create a pull request on the WPT github: 4 https://github.com/w 3c/web-platform-tests4 https://github.com/web-platform-tests/wpt 5 5 6 6 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport … … 15 15 ------------------------------------------------------------------------ 16 16 List of files: 17 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/sw.js 17 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/feature-name.txt 18 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/upload.py 18 19 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/utils.js -
trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/service_workers/w3c-import.log
r264541 r264542 2 2 Do NOT modify these tests directly in WebKit. 3 3 Instead, create a pull request on the WPT github: 4 https://github.com/w 3c/web-platform-tests4 https://github.com/web-platform-tests/wpt 5 5 6 6 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport … … 15 15 ------------------------------------------------------------------------ 16 16 List of files: 17 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/sw.js 18 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/resources/utils.js 17 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/service_workers/sw-abort.js 18 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/service_workers/sw-helpers.js 19 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/service_workers/sw-update-ui.js 20 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/service_workers/sw.js -
trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/w3c-import.log
r230330 r264542 2 2 Do NOT modify these tests directly in WebKit. 3 3 Instead, create a pull request on the WPT github: 4 https://github.com/w 3c/web-platform-tests4 https://github.com/web-platform-tests/wpt 5 5 6 6 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport … … 15 15 ------------------------------------------------------------------------ 16 16 List of files: 17 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/OWNERS 17 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/META.yml 18 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/abort.https.window.js 18 19 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/content-security-policy.https.window.js 19 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/credentials-in-url.https.window.js 20 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/dangling-markup.https.window.js 21 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https.html 22 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces.html 23 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces.worker.js 20 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/fetch-uploads.https.window.js 21 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/fetch.https.window.js 22 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/get-ids.https.window.js 23 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/get.https.window.js 24 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/idlharness.https.any.js 25 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/match.https.window.js 24 26 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/mixed-content-and-allowed-schemes.https.window.js 25 27 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/port-blocking.https.window.js 28 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/update-ui.https.window.js -
trunk/LayoutTests/platform/gtk/TestExpectations
r264532 r264542 971 971 972 972 # FIXME: This can't be the right bug number. 973 webkit.org/b/175419 imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https.html [ Failure ]974 webkit.org/b/175419 imported/w3c/web-platform-tests/background-fetch/interfaces.html [ Failure ]975 973 webkit.org/b/175419 imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https.html [ Failure Pass ] 976 974
Note:
See TracChangeset
for help on using the changeset viewer.