From 8969d7bdf30d00c1dd314067c3b63ddddbd03bfb Mon Sep 17 00:00:00 2001 From: Andreea Pavel Date: Thu, 28 Jun 2018 05:53:03 +0300 Subject: [PATCH] Backed out 6 changesets (bug 1468817, bug 1467656, bug 1468824, bug 1468823, bug 1467542) for wpt mass failures on a CLOSED TREE Backed out changeset 430a19ed4abb (bug 1468824) Backed out changeset 48c5051b0459 (bug 1468823) Backed out changeset 420221f34b31 (bug 1468817) Backed out changeset fc06c6dd1dad (bug 1467656) Backed out changeset d41449b85ea6 (bug 1467542) Backed out changeset 6aba20f105b0 (bug 1467542) --- testing/web-platform/meta/MANIFEST.json | 84 ++----------------- ...ch-request-css-cross-origin.https.html.ini | 4 - .../tests/css/css-fonts/idlharness.html | 19 ----- .../css/css-multicol/filter-with-abspos.html | 27 ------ .../cursor-pointer-links-001-manual.html | 16 ---- .../cursor-pointer-links-002-manual.html | 14 ---- .../cursor-pointer-links-003-manual.html | 15 ---- .../tests/interfaces/css-fonts.idl | 35 -------- ...est-css-cross-origin-mime-check.https.html | 50 +++++++++++ .../fetch-request-css-cross-origin.https.html | 81 ------------------ ...st-css-cross-origin-mime-check-iframe.html | 6 +- ...uest-css-cross-origin-mime-check-worker.js | 20 +++++ ...equest-css-cross-origin-read-contents.html | 15 ---- .../fetch-request-css-cross-origin-worker.js | 65 -------------- .../tests/tools/wptserve/wptserve/config.py | 50 ++++++----- 15 files changed, 111 insertions(+), 390 deletions(-) delete mode 100644 testing/web-platform/meta/service-workers/service-worker/fetch-request-css-cross-origin.https.html.ini delete mode 100644 testing/web-platform/tests/css/css-fonts/idlharness.html delete mode 100644 testing/web-platform/tests/css/css-multicol/filter-with-abspos.html delete mode 100644 testing/web-platform/tests/css/css-ui/cursor-pointer-links-001-manual.html delete mode 100644 testing/web-platform/tests/css/css-ui/cursor-pointer-links-002-manual.html delete mode 100644 testing/web-platform/tests/css/css-ui/cursor-pointer-links-003-manual.html delete mode 100644 testing/web-platform/tests/interfaces/css-fonts.idl create mode 100644 testing/web-platform/tests/service-workers/service-worker/fetch-request-css-cross-origin-mime-check.https.html delete mode 100644 testing/web-platform/tests/service-workers/service-worker/fetch-request-css-cross-origin.https.html create mode 100644 testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-worker.js delete mode 100644 testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-read-contents.html delete mode 100644 testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-worker.js diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 60d41725d0bb..339edf06e79d 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -9715,24 +9715,6 @@ {} ] ], - "css/css-ui/cursor-pointer-links-001-manual.html": [ - [ - "/css/css-ui/cursor-pointer-links-001-manual.html", - {} - ] - ], - "css/css-ui/cursor-pointer-links-002-manual.html": [ - [ - "/css/css-ui/cursor-pointer-links-002-manual.html", - {} - ] - ], - "css/css-ui/cursor-pointer-links-003-manual.html": [ - [ - "/css/css-ui/cursor-pointer-links-003-manual.html", - {} - ] - ], "css/css-ui/cursor-text-001.html": [ [ "/css/css-ui/cursor-text-001.html", @@ -288014,11 +287996,6 @@ {} ] ], - "interfaces/css-fonts.idl": [ - [ - {} - ] - ], "interfaces/css-typed-om.idl": [ [ {} @@ -295154,12 +295131,7 @@ {} ] ], - "service-workers/service-worker/resources/fetch-request-css-cross-origin-read-contents.html": [ - [ - {} - ] - ], - "service-workers/service-worker/resources/fetch-request-css-cross-origin-worker.js": [ + "service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-worker.js": [ [ {} ] @@ -316619,12 +316591,6 @@ {} ] ], - "css/css-fonts/idlharness.html": [ - [ - "/css/css-fonts/idlharness.html", - {} - ] - ], "css/css-fonts/test_datafont_same_origin.html": [ [ "/css/css-fonts/test_datafont_same_origin.html", @@ -318359,12 +318325,6 @@ {} ] ], - "css/css-multicol/filter-with-abspos.html": [ - [ - "/css/css-multicol/filter-with-abspos.html", - {} - ] - ], "css/css-multicol/going-out-of-flow-after-spanner.html": [ [ "/css/css-multicol/going-out-of-flow-after-spanner.html", @@ -373481,9 +373441,9 @@ {} ] ], - "service-workers/service-worker/fetch-request-css-cross-origin.https.html": [ + "service-workers/service-worker/fetch-request-css-cross-origin-mime-check.https.html": [ [ - "/service-workers/service-worker/fetch-request-css-cross-origin.https.html", + "/service-workers/service-worker/fetch-request-css-cross-origin-mime-check.https.html", {} ] ], @@ -508944,10 +508904,6 @@ "d773f016699bcdcbe54f196118de13fbdbd60a69", "testharness" ], - "css/css-fonts/idlharness.html": [ - "c8a4d33543cf5c9b77611c577116a71ca1ebfefb", - "testharness" - ], "css/css-fonts/language-specific-01.html": [ "779c6c4875d44915e4c314acc028cc5ff21c4d42", "visual" @@ -519336,10 +519292,6 @@ "43a6f9e055b908a42b5811d6ce5e48acf8c9ed08", "testharness" ], - "css/css-multicol/filter-with-abspos.html": [ - "099f4ae1562f9ba2908bfb8dfcb0a5c9afc8b423", - "testharness" - ], "css/css-multicol/float-and-block.html": [ "435614e6d5dcdbd8325687f70014bea0e3dea5f7", "reftest" @@ -538760,18 +538712,6 @@ "9bcaa9b053c7f5a9d4db008cb2be1dfa13c90ab0", "manual" ], - "css/css-ui/cursor-pointer-links-001-manual.html": [ - "4d02ce48b672e22a2fdc9e9666c638c55d9c8209", - "manual" - ], - "css/css-ui/cursor-pointer-links-002-manual.html": [ - "651a5cdf4bc7fbd83f47a4fe6260da9b375f0e37", - "manual" - ], - "css/css-ui/cursor-pointer-links-003-manual.html": [ - "52d4b8e9637151738189c848071df7f32c2f8424", - "manual" - ], "css/css-ui/cursor-text-001.html": [ "f07e9bded7606975b35d4b9514043b4a80a59562", "manual" @@ -588396,10 +588336,6 @@ "a0d53cc4e88f38cce9fd45759963e5da9a6f3dc3", "support" ], - "interfaces/css-fonts.idl": [ - "ff2d83e9468c743993c9b4a1ecf3fab09684dc16", - "support" - ], "interfaces/css-typed-om.idl": [ "36526913c07a04f9fd329a5650430db82407d766", "support" @@ -609680,8 +609616,8 @@ "01a5220ff2abe5735d7b03c2ee3ccbe21c9a260e", "testharness" ], - "service-workers/service-worker/fetch-request-css-cross-origin.https.html": [ - "91ec6e3e7e56f20058cd32e97dad0d245eda7d79", + "service-workers/service-worker/fetch-request-css-cross-origin-mime-check.https.html": [ + "d41f17b4a7ea596ba38a91cfbd910aa6be43e70f", "testharness" ], "service-workers/service-worker/fetch-request-css-images.https.html": [ @@ -610465,7 +610401,7 @@ "support" ], "service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-iframe.html": [ - "f014972c2230bd056c4b76e4a414c70e68477be9", + "77fdb8a4bf48160dacb9b463fa075a91b1d34b10", "support" ], "service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-same.css": [ @@ -610476,12 +610412,8 @@ "9770895a8ca9897a13b5f116e12b2b47dd59f009", "support" ], - "service-workers/service-worker/resources/fetch-request-css-cross-origin-read-contents.html": [ - "fcec3ece697564806719b32ca6144432f8216d9e", - "support" - ], - "service-workers/service-worker/resources/fetch-request-css-cross-origin-worker.js": [ - "20eaf7162096519d6811e4b5d513ca70fc46e8b6", + "service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-worker.js": [ + "5bdb78b2d188d06eea4a0243d7cf35c5542d868f", "support" ], "service-workers/service-worker/resources/fetch-request-fallback-iframe.html": [ diff --git a/testing/web-platform/meta/service-workers/service-worker/fetch-request-css-cross-origin.https.html.ini b/testing/web-platform/meta/service-workers/service-worker/fetch-request-css-cross-origin.https.html.ini deleted file mode 100644 index 7802d489f62e..000000000000 --- a/testing/web-platform/meta/service-workers/service-worker/fetch-request-css-cross-origin.https.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[fetch-request-css-cross-origin.https.html] - [Same-origin policy for access to CSS resources fetched via service worker] - expected: FAIL - diff --git a/testing/web-platform/tests/css/css-fonts/idlharness.html b/testing/web-platform/tests/css/css-fonts/idlharness.html deleted file mode 100644 index 9209144c3e51..000000000000 --- a/testing/web-platform/tests/css/css-fonts/idlharness.html +++ /dev/null @@ -1,19 +0,0 @@ - -css-fonts IDL tests - - - - - - diff --git a/testing/web-platform/tests/css/css-multicol/filter-with-abspos.html b/testing/web-platform/tests/css/css-multicol/filter-with-abspos.html deleted file mode 100644 index 763bf1fc5a13..000000000000 --- a/testing/web-platform/tests/css/css-multicol/filter-with-abspos.html +++ /dev/null @@ -1,27 +0,0 @@ - -Filtered block becomes containing block of absolutely positioned child - - - -
-
- -
-
-
-
- - - diff --git a/testing/web-platform/tests/css/css-ui/cursor-pointer-links-001-manual.html b/testing/web-platform/tests/css/css-ui/cursor-pointer-links-001-manual.html deleted file mode 100644 index 4d4be0d303a6..000000000000 --- a/testing/web-platform/tests/css/css-ui/cursor-pointer-links-001-manual.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -CSS Basic User Interface Test: pointer cursor on svg links - - - - - - -

The test passes if, when moved over the blue text, the cursor indicates a link. Often rendered as the backside of a hand with the index finger poiting and the other fingers closed.

- - Hover me - - diff --git a/testing/web-platform/tests/css/css-ui/cursor-pointer-links-002-manual.html b/testing/web-platform/tests/css/css-ui/cursor-pointer-links-002-manual.html deleted file mode 100644 index fc9c2a3d63f8..000000000000 --- a/testing/web-platform/tests/css/css-ui/cursor-pointer-links-002-manual.html +++ /dev/null @@ -1,14 +0,0 @@ - - - -CSS Basic User Interface Test: pointer cursor on svg links - - - - - - -

The test passes if, when moved over the blue text, the cursor indicates a link. Often rendered as the backside of a hand with the index finger poiting and the other fingers closed.

- Hover me - diff --git a/testing/web-platform/tests/css/css-ui/cursor-pointer-links-003-manual.html b/testing/web-platform/tests/css/css-ui/cursor-pointer-links-003-manual.html deleted file mode 100644 index ceaa17484751..000000000000 --- a/testing/web-platform/tests/css/css-ui/cursor-pointer-links-003-manual.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -CSS Basic User Interface Test: pointer cursor on svg links - - - - - - -

The test passes if, when moved over the blue box, the cursor indicates a link. Often rendered as the backside of a hand with the index finger poiting and the other fingers closed.

- - blue square - diff --git a/testing/web-platform/tests/interfaces/css-fonts.idl b/testing/web-platform/tests/interfaces/css-fonts.idl deleted file mode 100644 index 7cb29f28432e..000000000000 --- a/testing/web-platform/tests/interfaces/css-fonts.idl +++ /dev/null @@ -1,35 +0,0 @@ -// GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the -// "CSS Fonts Module Level 4" spec. -// See: https://drafts.csswg.org/css-fonts-4/ - -[Exposed=Window] -interface CSSFontFaceRule : CSSRule { - readonly attribute CSSStyleDeclaration style; -}; - -partial interface CSSRule { const unsigned short FONT_FEATURE_VALUES_RULE = 14; -}; -interface CSSFontFeatureValuesRule : CSSRule { attribute CSSOMString fontFamily; - readonly attribute CSSFontFeatureValuesMap annotation; - readonly attribute CSSFontFeatureValuesMap ornaments; - readonly attribute CSSFontFeatureValuesMap stylistic; - readonly attribute CSSFontFeatureValuesMap swash; - readonly attribute CSSFontFeatureValuesMap characterVariant; - readonly attribute CSSFontFeatureValuesMap styleset; -}; - -interface CSSFontFeatureValuesMap { - maplike>; - void set(CSSOMString featureValueName, - (unsigned long or sequence) values); -}; -partial interface CSSRule { - const unsigned short FONT_PALETTE_VALUES_RULE = 15; -}; - -interface CSSFontPaletteValuesRule : CSSRule { - maplike; - attribute CSSOMString fontFamily; - attribute CSSOMString basePalette; -}; diff --git a/testing/web-platform/tests/service-workers/service-worker/fetch-request-css-cross-origin-mime-check.https.html b/testing/web-platform/tests/service-workers/service-worker/fetch-request-css-cross-origin-mime-check.https.html new file mode 100644 index 000000000000..7835f60a2ca1 --- /dev/null +++ b/testing/web-platform/tests/service-workers/service-worker/fetch-request-css-cross-origin-mime-check.https.html @@ -0,0 +1,50 @@ + +Service Worker: Mime type checking of CSS files fetched via SW. + + + + + diff --git a/testing/web-platform/tests/service-workers/service-worker/fetch-request-css-cross-origin.https.html b/testing/web-platform/tests/service-workers/service-worker/fetch-request-css-cross-origin.https.html deleted file mode 100644 index 2cdfdea996f7..000000000000 --- a/testing/web-platform/tests/service-workers/service-worker/fetch-request-css-cross-origin.https.html +++ /dev/null @@ -1,81 +0,0 @@ - -Service Worker: Cross-origin CSS files fetched via SW. - - - - - diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-iframe.html b/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-iframe.html index 9a4adedb84d4..dcb82871354e 100644 --- a/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-iframe.html +++ b/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-iframe.html @@ -5,11 +5,11 @@ #sameOriginHtml { color: red; } #synthetic { color: red; } - - + + - +

I should be blue

I should be blue

I should be blue

diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-worker.js b/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-worker.js new file mode 100644 index 000000000000..274142f5ce44 --- /dev/null +++ b/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-mime-check-worker.js @@ -0,0 +1,20 @@ +importScripts('/common/get-host-info.sub.js'); +importScripts('test-helpers.sub.js'); + +self.addEventListener('fetch', function(event) { + if (event.request.url.indexOf('cross-origin-css.css') != -1) { + event.respondWith(fetch( + get_host_info()['HTTPS_REMOTE_ORIGIN'] + base_path() + + 'fetch-request-css-cross-origin-mime-check-cross.css', + {mode: 'no-cors'})); + } else if (event.request.url.indexOf('cross-origin-html.css') != -1) { + event.respondWith(fetch( + get_host_info()['HTTPS_REMOTE_ORIGIN'] + base_path() + + 'fetch-request-css-cross-origin-mime-check-cross.html', + {mode: 'no-cors'})); + } else if (event.request.url.indexOf('synthetic.css') != -1) { + event.respondWith(new Response("#synthetic { color: blue; }")); + } else { + event.respondWith(fetch(event.request)); + } + }); diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-read-contents.html b/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-read-contents.html deleted file mode 100644 index c902366b023a..000000000000 --- a/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-read-contents.html +++ /dev/null @@ -1,15 +0,0 @@ - - -iframe: cross-origin CSS via service worker - - - - - - - - - - - - diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-worker.js b/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-worker.js deleted file mode 100644 index a71e91216c10..000000000000 --- a/testing/web-platform/tests/service-workers/service-worker/resources/fetch-request-css-cross-origin-worker.js +++ /dev/null @@ -1,65 +0,0 @@ -importScripts('/common/get-host-info.sub.js'); -importScripts('test-helpers.sub.js'); - -const HOST_INFO = get_host_info(); -const REMOTE_ORIGIN = HOST_INFO.HTTPS_REMOTE_ORIGIN; -const BASE_PATH = base_path(); -const CSS_FILE = 'fetch-request-css-cross-origin-mime-check-cross.css'; -const HTML_FILE = 'fetch-request-css-cross-origin-mime-check-cross.html'; - -function add_pipe_header(url_str, header) { - if (url_str.indexOf('?pipe=') == -1) { - url_str += '?pipe='; - } else { - url_str += '|'; - } - url_str += `header${header}`; - return url_str; -} - -self.addEventListener('fetch', function(event) { - const url = new URL(event.request.url); - - const use_mime = - (url.searchParams.get('mime') != 'no'); - const mime_header = '(Content-Type, text/css)'; - - const use_cors = - (url.searchParams.has('cors')); - const cors_header = '(Access-Control-Allow-Origin, *)'; - - const file = url.pathname.substring(url.pathname.lastIndexOf('/') + 1); - - // Respond with a cross-origin CSS resource, using CORS if desired. - if (file == 'cross-origin-css.css') { - let fetch_url = REMOTE_ORIGIN + BASE_PATH + CSS_FILE; - if (use_mime) - fetch_url = add_pipe_header(fetch_url, mime_header); - if (use_cors) - fetch_url = add_pipe_header(fetch_url, cors_header); - const mode = use_cors ? 'cors' : 'no-cors'; - event.respondWith(fetch(fetch_url, {'mode': mode})); - return; - } - - // Respond with a cross-origin CSS resource with an HTML name. This is only - // used in the MIME sniffing test, so MIME is never added. - if (file == 'cross-origin-html.css') { - const fetch_url = REMOTE_ORIGIN + BASE_PATH + HTML_FILE; - event.respondWith(fetch(fetch_url, {mode: 'no-cors'})); - return; - } - - // Respond with synthetic CSS. - if (file == 'synthetic.css') { - let headers = {}; - if (use_mime) { - headers['Content-Type'] = 'text/css'; - } - - event.respondWith(new Response("#synthetic { color: blue; }", {headers})); - return; - } - - // Otherwise, fallback to network. - }); diff --git a/testing/web-platform/tests/tools/wptserve/wptserve/config.py b/testing/web-platform/tests/tools/wptserve/wptserve/config.py index 3e4729a7f037..d52d18da31a5 100644 --- a/testing/web-platform/tests/tools/wptserve/wptserve/config.py +++ b/testing/web-platform/tests/tools/wptserve/wptserve/config.py @@ -1,5 +1,6 @@ import logging import os +from threading import Lock from collections import defaultdict, Mapping @@ -73,6 +74,8 @@ class Config(Mapping): self.log_level = level_name self._logger_name = logger.name + self._ports_lock = Lock() + for k, v in self._default.iteritems(): setattr(self, k, kwargs.pop(k, v)) @@ -137,31 +140,38 @@ class Config(Mapping): @property def ports(self): - # To make this method thread-safe, we write to a temporary dict first, - # and change self._computed_ports to the new dict at last atomically. - new_ports = defaultdict(list) + with self._ports_lock: + try: + old_ports = self._computed_ports + except AttributeError: + old_ports = {} - try: - old_ports = self._computed_ports - except AttributeError: - old_ports = {} + self._computed_ports = defaultdict(list) - for scheme, ports in self._ports.iteritems(): - for i, port in enumerate(ports): - if scheme in ["wss", "https"] and not self.ssl_env.ssl_enabled: - port = None - if port == "auto": - try: - port = old_ports[scheme][i] - except (KeyError, IndexError): - port = get_port(self.server_host) - else: - port = port - new_ports[scheme].append(port) + for scheme, ports in self._ports.iteritems(): + for i, port in enumerate(ports): + if scheme in ["wss", "https"] and not self.ssl_env.ssl_enabled: + port = None + if port == "auto": + try: + port = old_ports[scheme][i] + except (KeyError, IndexError): + port = get_port(self.server_host) + else: + port = port + self._computed_ports[scheme].append(port) - self._computed_ports = new_ports return self._computed_ports + def __getstate__(self): + state = self.__dict__ + del state["_ports_lock"] + return state + + def __setstate__(self, state): + state["_ports_lock"] = Lock() + self.__dict__ = state + @ports.setter def ports(self, v): self._ports = v