Diff
Modified: trunk/LayoutTests/ChangeLog (244775 => 244776)
--- trunk/LayoutTests/ChangeLog 2019-04-30 16:07:48 UTC (rev 244775)
+++ trunk/LayoutTests/ChangeLog 2019-04-30 16:23:20 UTC (rev 244776)
@@ -1,3 +1,12 @@
+2019-04-30 Youenn Fablet <[email protected]>
+
+ Update WPT service-worker resource-timing test to use hosts[alt]
+ https://bugs.webkit.org/show_bug.cgi?id=197329
+
+ Reviewed by Chris Dumez.
+
+ * TestExpectations:
+
2019-04-30 Zalan Bujtas <[email protected]>
Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
Modified: trunk/LayoutTests/TestExpectations (244775 => 244776)
--- trunk/LayoutTests/TestExpectations 2019-04-30 16:07:48 UTC (rev 244775)
+++ trunk/LayoutTests/TestExpectations 2019-04-30 16:23:20 UTC (rev 244776)
@@ -211,7 +211,7 @@
# Newly imported service worker tests that are flaky.
imported/w3c/web-platform-tests/service-workers/service-worker/navigation-redirect-to-http.https.html [ Pass Failure ]
-imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html [ Pass Failure ]
+imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/service-workers/service-worker/worker-client-id.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/xhr/event-timeout-order.htm [ Pass Failure ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (244775 => 244776)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-04-30 16:07:48 UTC (rev 244775)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-04-30 16:23:20 UTC (rev 244776)
@@ -1,3 +1,19 @@
+2019-04-30 Youenn Fablet <[email protected]>
+
+ Update WPT service-worker resource-timing test to use hosts[alt]
+ https://bugs.webkit.org/show_bug.cgi?id=197329
+
+ Reviewed by Chris Dumez.
+
+ Set alt server as 127.0.0.1.
+ Use hosts[alt][] instead of domains[www] to trigger a cross origin load.
+
+ * resources/config.json:
+ * web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt: Removed.
+ * web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt: Added.
+ * web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html.
+ * web-platform-tests/service-workers/service-worker/resources/resource-timing-iframe.sub.html:
+
2019-04-29 Javier Fernandez <[email protected]>
line should not be broken before the first space after a word
Modified: trunk/LayoutTests/imported/w3c/resources/config.json (244775 => 244776)
--- trunk/LayoutTests/imported/w3c/resources/config.json 2019-04-30 16:07:48 UTC (rev 244775)
+++ trunk/LayoutTests/imported/w3c/resources/config.json 2019-04-30 16:23:20 UTC (rev 244776)
@@ -1,4 +1,5 @@
{"browser_host": "localhost",
+ "alternate_hosts": { "alt": "127.0.0.1" },
"ports":{"http":[8800, 8801],
"https":[9443],
"ws":[49001]},
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt (244775 => 244776)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt 2019-04-30 16:07:48 UTC (rev 244775)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt 2019-04-30 16:23:20 UTC (rev 244776)
@@ -1,9 +0,0 @@
-Blocked access to external URL https://www1.localhost:9443/service-workers/service-worker/resources/square.png
-Blocked access to external URL https://www1.localhost:9443/service-workers/service-worker/resources/missing.jpg
-Blocked access to external URL https://www1.localhost:9443/service-workers/service-worker/resources/square.png
-Blocked access to external URL https://www1.localhost:9443/service-workers/service-worker/resources/missing.jpg
-
-
-FAIL Controlled resource loads assert_greater_than: Generated response expected a number greater than 0 but got 0
-PASS Non-controlled resource loads
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html (244775 => 244776)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html 2019-04-30 16:07:48 UTC (rev 244775)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html 2019-04-30 16:23:20 UTC (rev 244776)
@@ -1,144 +0,0 @@
-<!DOCTYPE html>
-<script src=""
-<script src=""
-<script src=""
-<script src=""
-<script>
-function resourceUrl(path) {
- return get_host_info()['HTTPS_ORIGIN'] + base_path() + path;
-}
-
-function crossOriginUrl(path) {
- return get_host_info()['HTTPS_REMOTE_ORIGIN'] + base_path() + path;
-}
-
-function verify(options) {
- const url = "" === 'cross-origin' ? crossOriginUrl(options.resource)
- : resourceUrl(options.resource);
- const entryList = options.performance.getEntriesByName(url);
- if (options.should_no_performance_entry) {
- // The performance timeline may not have an entry for a resource
- // which failed to load.
- assert_equals(entryList.length, 0, options.description);
- return;
- }
- assert_equals(entryList.length, 1, options.description);
- const entry = entryList[0];
- assert_equals(entry.entryType, 'resource', options.description);
- assert_greater_than(entry.workerStart, 0, options.description);
- assert_greater_than_equal(entry.workerStart, entry.startTime, options.description);
- assert_less_than_equal(entry.workerStart, entry.fetchStart, options.description);
- if (options.mode === 'cross-origin') {
- assert_equals(entry.responseStart, 0, options.description);
- assert_greater_than_equal(entry.responseEnd, entry.fetchStart, options.description);
- } else {
- assert_greater_than_equal(entry.responseStart, entry.fetchStart, options.description);
- assert_greater_than_equal(entry.responseEnd, entry.responseStart, options.description);
- }
- assert_greater_than(entry.responseEnd, entry.fetchStart, options.description);
- assert_greater_than(entry.duration, 0, options.description);
- if (options.resource.indexOf('redirect.py') != -1) {
- assert_less_than_equal(entry.workerStart, entry.redirectStart,
- options.description);
- } else {
- assert_equals(entry.redirectStart, 0, options.description);
- }
-}
-
-promise_test(function(t) {
- const worker_url = 'resources/resource-timing-worker.js';
- const scope = 'resources/resource-timing-iframe.sub.html';
- let registration;
-
- return service_worker_unregister_and_register(t, worker_url, scope)
- .then(function(r) {
- registration = r;
- return wait_for_state(t, r.installing, 'activated');
- })
- .then(function() {
- return with_iframe(scope);
- })
- .then(function(frame) {
- const performance = frame.contentWindow.performance;
- verify({
- performance: performance,
- resource: 'resources/dummy.js',
- mode: 'same-origin',
- description: 'Generated response',
- });
- verify({
- performance: performance,
- resource: 'resources/empty.js',
- mode: 'same-origin',
- description: 'Network fallback',
- });
- verify({
- performance: performance,
- resource: 'resources/redirect.py?Redirect=empty.js',
- mode: 'same-origin',
- description: 'Redirect',
- });
- verify({
- performance: performance,
- resource: 'resources/square.png',
- mode: 'same-origin',
- description: 'Network fallback image',
- });
- // Test that worker start is available on cross-origin no-cors
- // subresources.
- verify({
- performance: performance,
- resource: 'resources/square.png',
- mode: 'cross-origin',
- description: 'Network fallback cross-origin image',
- });
-
- // Tests for resouces which failed to load.
- verify({
- performance: performance,
- resource: 'resources/missing.jpg',
- mode: 'same-origin',
- description: 'Network fallback load failure',
- should_no_performance_entry: true,
- });
- verify({
- performance: performance,
- resource: 'resources/missing.jpg',
- mode: 'cross-origin',
- description: 'Network fallback cross-origin load failure',
- should_no_performance_entry: true,
- });
- // Tests for respondWith(fetch()).
- verify({
- performance: performance,
- resource: 'resources/missing.jpg?SWRespondsWithFetch',
- mode: 'same-origin',
- description: 'Resource in iframe, nonexistent but responded with fetch to another.',
- });
- verify({
- performance: performance,
- resource: 'resources/dummy.txt?SWFetched',
- mode: 'same-origin',
- description: 'Resource fetched as response from missing.jpg?SWRespondsWithFetch.',
- should_no_performance_entry: true,
- });
- // Test for a normal resource that is unaffected by the Service Worker.
- verify({
- performance: performance,
- resource: 'resources/empty-worker.js',
- mode: 'same-origin',
- description: 'Resource untouched by the Service Worker.',
- });
-
- frame.remove();
- return registration.unregister();
- });
-}, 'Controlled resource loads');
-
-test(() => {
- const url = ""
- const entry = window.performance.getEntriesByName(url)[0];
- assert_equals(entry.workerStart, 0, 'Non-controlled');
-}, 'Non-controlled resource loads');
-
-</script>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt (0 => 244776)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt 2019-04-30 16:23:20 UTC (rev 244776)
@@ -0,0 +1,5 @@
+
+
+FAIL Controlled resource loads assert_greater_than: Generated response expected a number greater than 0 but got 0
+PASS Non-controlled resource loads
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html (from rev 244775, trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html) (0 => 244776)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html 2019-04-30 16:23:20 UTC (rev 244776)
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<script src=""
+<script src=""
+<script src=""
+<script>
+function resourceUrl(path) {
+ return "https://{{host}}:{{ports[https][0]}}" + base_path() + path;
+}
+
+function crossOriginUrl(path) {
+ return "https://{{hosts[alt][]}}:{{ports[https][0]}}" + base_path() + path;
+}
+
+function verify(options) {
+ const url = "" === 'cross-origin' ? crossOriginUrl(options.resource)
+ : resourceUrl(options.resource);
+ const entryList = options.performance.getEntriesByName(url);
+ if (options.should_no_performance_entry) {
+ // The performance timeline may not have an entry for a resource
+ // which failed to load.
+ assert_equals(entryList.length, 0, options.description);
+ return;
+ }
+ assert_equals(entryList.length, 1, options.description);
+ const entry = entryList[0];
+ assert_equals(entry.entryType, 'resource', options.description);
+ assert_greater_than(entry.workerStart, 0, options.description);
+ assert_greater_than_equal(entry.workerStart, entry.startTime, options.description);
+ assert_less_than_equal(entry.workerStart, entry.fetchStart, options.description);
+ if (options.mode === 'cross-origin') {
+ assert_equals(entry.responseStart, 0, options.description);
+ assert_greater_than_equal(entry.responseEnd, entry.fetchStart, options.description);
+ } else {
+ assert_greater_than_equal(entry.responseStart, entry.fetchStart, options.description);
+ assert_greater_than_equal(entry.responseEnd, entry.responseStart, options.description);
+ }
+ assert_greater_than(entry.responseEnd, entry.fetchStart, options.description);
+ assert_greater_than(entry.duration, 0, options.description);
+ if (options.resource.indexOf('redirect.py') != -1) {
+ assert_less_than_equal(entry.workerStart, entry.redirectStart,
+ options.description);
+ } else {
+ assert_equals(entry.redirectStart, 0, options.description);
+ }
+}
+
+promise_test(function(t) {
+ const worker_url = 'resources/resource-timing-worker.js';
+ const scope = 'resources/resource-timing-iframe.sub.html';
+ let registration;
+
+ return service_worker_unregister_and_register(t, worker_url, scope)
+ .then(function(r) {
+ registration = r;
+ return wait_for_state(t, r.installing, 'activated');
+ })
+ .then(function() {
+ return with_iframe(scope);
+ })
+ .then(function(frame) {
+ const performance = frame.contentWindow.performance;
+ verify({
+ performance: performance,
+ resource: 'resources/dummy.js',
+ mode: 'same-origin',
+ description: 'Generated response',
+ });
+ verify({
+ performance: performance,
+ resource: 'resources/empty.js',
+ mode: 'same-origin',
+ description: 'Network fallback',
+ });
+ verify({
+ performance: performance,
+ resource: 'resources/redirect.py?Redirect=empty.js',
+ mode: 'same-origin',
+ description: 'Redirect',
+ });
+ verify({
+ performance: performance,
+ resource: 'resources/square.png',
+ mode: 'same-origin',
+ description: 'Network fallback image',
+ });
+ // Test that worker start is available on cross-origin no-cors
+ // subresources.
+ verify({
+ performance: performance,
+ resource: 'resources/square.png',
+ mode: 'cross-origin',
+ description: 'Network fallback cross-origin image',
+ });
+
+ // Tests for resouces which failed to load.
+ verify({
+ performance: performance,
+ resource: 'resources/missing.jpg',
+ mode: 'same-origin',
+ description: 'Network fallback load failure',
+ should_no_performance_entry: true,
+ });
+ verify({
+ performance: performance,
+ resource: 'resources/missing.jpg',
+ mode: 'cross-origin',
+ description: 'Network fallback cross-origin load failure',
+ should_no_performance_entry: true,
+ });
+ // Tests for respondWith(fetch()).
+ verify({
+ performance: performance,
+ resource: 'resources/missing.jpg?SWRespondsWithFetch',
+ mode: 'same-origin',
+ description: 'Resource in iframe, nonexistent but responded with fetch to another.',
+ });
+ verify({
+ performance: performance,
+ resource: 'resources/dummy.txt?SWFetched',
+ mode: 'same-origin',
+ description: 'Resource fetched as response from missing.jpg?SWRespondsWithFetch.',
+ should_no_performance_entry: true,
+ });
+ // Test for a normal resource that is unaffected by the Service Worker.
+ verify({
+ performance: performance,
+ resource: 'resources/empty-worker.js',
+ mode: 'same-origin',
+ description: 'Resource untouched by the Service Worker.',
+ });
+
+ frame.remove();
+ return registration.unregister();
+ });
+}, 'Controlled resource loads');
+
+test(() => {
+ const url = ""
+ const entry = window.performance.getEntriesByName(url)[0];
+ assert_equals(entry.workerStart, 0, 'Non-controlled');
+}, 'Non-controlled resource loads');
+
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/resource-timing-iframe.sub.html (244775 => 244776)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/resource-timing-iframe.sub.html 2019-04-30 16:07:48 UTC (rev 244775)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/resource-timing-iframe.sub.html 2019-04-30 16:23:20 UTC (rev 244776)
@@ -3,8 +3,8 @@
<script src=""
<script src=""
<img src=""
-<img src=""
+<img src=""
<img src=""
-<img src=""
+<img src=""
<img src=''>
<script src=''></script>