From 908e01b4990e8a783150b9d54b37c016eb0815c8 Mon Sep 17 00:00:00 2001 From: WPT Sync Bot Date: Sun, 25 Feb 2018 20:08:45 -0500 Subject: [PATCH] Update web-platform-tests to revision 5ca972e15cfa80277964645d9ee5ccd87a661337 --- tests/wpt/metadata/MANIFEST.json | 225 ++++++++++++++---- .../vh_not_refreshing_on_chrome.html.ini | 2 - .../opening-the-input-stream/010.html.ini | 4 - .../css/css-typed-om/resources/testhelper.js | 6 - .../normalize-image.html | 30 +++ .../normalize-resource.tentative.html | 56 ----- .../cssImageValue.html | 19 ++ .../cssUrlImageValue.tentative.html | 15 -- .../cssUrlImageValue-interface.html | 22 -- .../cssUrlImageValue-invalid.html | 17 -- .../cssUrlImageValue.html | 81 ------- .../properties/resources/testsuite.js | 40 ++-- ...ader-policy-allowed-for-all.https.sub.html | 46 ++++ ...allowed-for-all.https.sub.html.sub.headers | 1 + ...der-policy-allowed-for-self.https.sub.html | 46 ++++ ...llowed-for-self.https.sub.html.sub.headers | 1 + ...der-policy-allowed-for-some.https.sub.html | 52 ++++ ...llowed-for-some.https.sub.html.sub.headers | 1 + ...r-policy-disallowed-for-all.https.sub.html | 46 ++++ ...allowed-for-all.https.sub.html.sub.headers | 2 + ...ader-policy-allowed-for-all.https.sub.html | 61 +++++ ...allowed-for-all.https.sub.html.sub.headers | 1 + ...der-policy-allowed-for-self.https.sub.html | 62 +++++ ...llowed-for-self.https.sub.html.sub.headers | 1 + ...r-policy-disallowed-for-all.https.sub.html | 50 ++++ ...allowed-for-all.https.sub.html.sub.headers | 1 + .../feature-policy-allowedfeatures.html | 7 + ...licy-nested-subframe-policy.https.sub.html | 50 ++++ .../feature-policy/resources/featurepolicy.js | 136 +++++++++++ .../interfaces/css-typed-om.idl | 19 +- 30 files changed, 811 insertions(+), 289 deletions(-) delete mode 100644 tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini delete mode 100644 tests/wpt/metadata/html/dom/dynamic-markup-insertion/opening-the-input-stream/010.html.ini create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-normalization/normalize-image.html delete mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-normalization/normalize-resource.tentative.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssImageValue.html delete mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssUrlImageValue.tentative.html delete mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html delete mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html delete mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html.sub.headers create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html.sub.headers create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html.sub.headers create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html.sub.headers create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html.sub.headers create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html.sub.headers create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html.sub.headers create mode 100644 tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-allowedfeatures.html create mode 100644 tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 133db7d46bd..6a712f8e84a 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -271288,6 +271288,41 @@ {} ] ], + "feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html.sub.headers": [ + [ + {} + ] + ], "feature-policy/payment-allowed-by-feature-policy.https.sub.html.headers": [ [ {} @@ -271313,6 +271348,11 @@ {} ] ], + "feature-policy/resources/feature-policy-allowedfeatures.html": [ + [ + {} + ] + ], "feature-policy/resources/feature-policy-autoplay.html": [ [ {} @@ -271323,6 +271363,11 @@ {} ] ], + "feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html": [ + [ + {} + ] + ], "feature-policy/resources/feature-policy-payment.html": [ [ {} @@ -315455,15 +315500,15 @@ {} ] ], - "css/css-typed-om/stylevalue-normalization/normalize-numeric.tentative.html": [ + "css/css-typed-om/stylevalue-normalization/normalize-image.html": [ [ - "/css/css-typed-om/stylevalue-normalization/normalize-numeric.tentative.html", + "/css/css-typed-om/stylevalue-normalization/normalize-image.html", {} ] ], - "css/css-typed-om/stylevalue-normalization/normalize-resource.tentative.html": [ + "css/css-typed-om/stylevalue-normalization/normalize-numeric.tentative.html": [ [ - "/css/css-typed-om/stylevalue-normalization/normalize-resource.tentative.html", + "/css/css-typed-om/stylevalue-normalization/normalize-numeric.tentative.html", {} ] ], @@ -315509,6 +315554,12 @@ {} ] ], + "css/css-typed-om/stylevalue-serialization/cssImageValue.html": [ + [ + "/css/css-typed-om/stylevalue-serialization/cssImageValue.html", + {} + ] + ], "css/css-typed-om/stylevalue-serialization/cssKeywordValue.tentative.html": [ [ "/css/css-typed-om/stylevalue-serialization/cssKeywordValue.tentative.html", @@ -315545,12 +315596,6 @@ {} ] ], - "css/css-typed-om/stylevalue-serialization/cssUrlImageValue.tentative.html": [ - [ - "/css/css-typed-om/stylevalue-serialization/cssUrlImageValue.tentative.html", - {} - ] - ], "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html": [ [ "/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html", @@ -315653,24 +315698,6 @@ {} ] ], - "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html": [ - [ - "/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html", - {} - ] - ], - "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html": [ - [ - "/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html", - {} - ] - ], - "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html": [ - [ - "/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html", - {} - ] - ], "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html": [ [ "/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html", @@ -322809,6 +322836,48 @@ {} ] ], + "feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html": [ + [ + "/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html": [ + [ + "/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html": [ + [ + "/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html": [ + [ + "/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html": [ + [ + "/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html": [ + [ + "/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html": [ + [ + "/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html", + {} + ] + ], "feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [ [ "/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html", @@ -519455,19 +519524,19 @@ "testharness" ], "css/css-typed-om/resources/testhelper.js": [ - "4465d71eb78c55793d0fb9929cb50b658effde4e", + "8721d62337a2183c1911a9818f65a32f13c50275", "support" ], "css/css-typed-om/stylevalue-normalization/normalize-ident.tentative.html": [ "162ce70613e78bb007ea24ea525ec78ef17cd3bd", "testharness" ], - "css/css-typed-om/stylevalue-normalization/normalize-numeric.tentative.html": [ - "65c2418988148bf9662f5f502bb4650cc6105a85", + "css/css-typed-om/stylevalue-normalization/normalize-image.html": [ + "8b1e6ee80ae4f8c15e93ec373302983237e259cf", "testharness" ], - "css/css-typed-om/stylevalue-normalization/normalize-resource.tentative.html": [ - "fb966359dae9203a6ef503af8c5dc2c5c20652b2", + "css/css-typed-om/stylevalue-normalization/normalize-numeric.tentative.html": [ + "65c2418988148bf9662f5f502bb4650cc6105a85", "testharness" ], "css/css-typed-om/stylevalue-normalization/normalize-tokens.tentative.html": [ @@ -519502,6 +519571,10 @@ "2b6761e72a7867218d2f9d9f780569b342c1d89c", "testharness" ], + "css/css-typed-om/stylevalue-serialization/cssImageValue.html": [ + "22842f8738aab99af0c5c76977976c8e2de788a6", + "testharness" + ], "css/css-typed-om/stylevalue-serialization/cssKeywordValue.tentative.html": [ "004752ad2e9682845697d668af158679031f65dc", "testharness" @@ -519526,10 +519599,6 @@ "d2881899fa46277dc15828dca1354d7adfe422c0", "testharness" ], - "css/css-typed-om/stylevalue-serialization/cssUrlImageValue.tentative.html": [ - "7b7fa7d06c5dcf614864bab0adef083359278ab6", - "testharness" - ], "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html": [ "63600cc74e62ecbaf98bf786de17362764ec947e", "testharness" @@ -519598,18 +519667,6 @@ "46d36ae2dc68f3f3f1cee5d85cb5f496b7c3fa67", "testharness" ], - "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html": [ - "5565653081f6615d8d88323b98ed670a653bef9b", - "testharness" - ], - "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html": [ - "2d776d5a92feebe4803434878c3f76973313063b", - "testharness" - ], - "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html": [ - "800e58619dc18c65ae0cae405f44d71c93080f01", - "testharness" - ], "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html": [ "ba012ace40e63718694a8cd91ba74039787ff666", "testharness" @@ -519859,7 +519916,7 @@ "testharness" ], "css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [ - "a3df35f32209493e429282b89f4fdcc6581abe07", + "f09e5026ade5e844fdb5241fa5fea082379ef420", "support" ], "css/css-typed-om/the-stylepropertymap/properties/right.html": [ @@ -547286,6 +547343,62 @@ "2ae1da8e026e63625a6168b842303cc156963ced", "support" ], + "feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html": [ + "4d27ea669ef4362242db87a5abda1589b985bf20", + "testharness" + ], + "feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html.sub.headers": [ + "bfcf350d87faae8e6cf4b2beb9fee84957cac449", + "support" + ], + "feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html": [ + "0d4facd79afb3a504aea2945937abdc12687eb12", + "testharness" + ], + "feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html.sub.headers": [ + "ea3519ed0612b18268c0df22a1c9472e404c2573", + "support" + ], + "feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html": [ + "0874eda2163926eb3bac6578141ea7099d02658d", + "testharness" + ], + "feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html.sub.headers": [ + "035bf4abe912636d5bd070eb20d573cf9c464565", + "support" + ], + "feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html": [ + "bd1232467941a7760f4df7432bfc80733604575d", + "testharness" + ], + "feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html.sub.headers": [ + "256d942867a563b1053629884cdeb52f6d5096ca", + "support" + ], + "feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html": [ + "593523f11a7209097771a713f28e5c497f05faa1", + "testharness" + ], + "feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html.sub.headers": [ + "bfcf350d87faae8e6cf4b2beb9fee84957cac449", + "support" + ], + "feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html": [ + "56d721c8f2640eee31bf1148db07e91bbf812f46", + "testharness" + ], + "feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html.sub.headers": [ + "ea3519ed0612b18268c0df22a1c9472e404c2573", + "support" + ], + "feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html": [ + "69b7667d23f4a49ef8d8ed5a8c5fece2b987d718", + "testharness" + ], + "feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html.sub.headers": [ + "f20475f628a5f4a3067b8682019054e3f31c703a", + "support" + ], "feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [ "22d155755cd7aaff8a1c40c597468066f01eb13b", "testharness" @@ -547346,6 +547459,10 @@ "6b1dd45e19dff4759b4d165cdfd59970e4212058", "support" ], + "feature-policy/resources/feature-policy-allowedfeatures.html": [ + "0a1d2012f5ceb69ac0e3f358f594bb71141fd805", + "support" + ], "feature-policy/resources/feature-policy-autoplay.html": [ "34eb416a1b8981460d2055108b255bec7f639f04", "support" @@ -547354,6 +547471,10 @@ "5d4a1f3eaf253211128f35990a94e1e0c91c1391", "support" ], + "feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html": [ + "c259c3a175099778b66b980876b74a112276855b", + "support" + ], "feature-policy/resources/feature-policy-payment.html": [ "958b32f77b02f2ff80cf174aadac62237d79056b", "support" @@ -547375,7 +547496,7 @@ "support" ], "feature-policy/resources/featurepolicy.js": [ - "d2d5194fab261d7aa0b8d1b31077a42316f5f351", + "f6bb46c7ababec6a7902b1ed2b00a7803e0a7e1d", "support" ], "feature-policy/resources/picture-in-picture.js": [ @@ -568847,7 +568968,7 @@ "support" ], "interfaces/css-typed-om.idl": [ - "81635661dbf769b0099d04ae7820784348f58e30", + "3c918afebfb20266dd4003e71a008ed19c448fbc", "support" ], "interfaces/cssom-view.idl": [ diff --git a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini deleted file mode 100644 index 26435e28b09..00000000000 --- a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[vh_not_refreshing_on_chrome.html] - expected: FAIL diff --git a/tests/wpt/metadata/html/dom/dynamic-markup-insertion/opening-the-input-stream/010.html.ini b/tests/wpt/metadata/html/dom/dynamic-markup-insertion/opening-the-input-stream/010.html.ini deleted file mode 100644 index 33164945eb6..00000000000 --- a/tests/wpt/metadata/html/dom/dynamic-markup-insertion/opening-the-input-stream/010.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[010.html] - [Salvagability of document.opened document] - expected: FAIL - diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/resources/testhelper.js b/tests/wpt/web-platform-tests/css/css-typed-om/resources/testhelper.js index 91af64cfca6..cae0e2703c7 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/resources/testhelper.js +++ b/tests/wpt/web-platform-tests/css/css-typed-om/resources/testhelper.js @@ -66,12 +66,6 @@ function assert_style_value_equals(a, b) { case 'CSSMatrixComponent': assert_matrix_approx_equals(a.matrix, b.matrix, 1e-6); break; - case 'CSSURLImageValue': - assert_equals(a.instrinsicWidth, b.instrinsicWidth); - assert_equals(a.instrinsicHeight, b.instrinsicHeight); - assert_equals(a.instrinsicRatio, b.instrinsicRatio); - assert_equals(a.url, b.url); - break; default: assert_equals(a, b); break; diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-normalization/normalize-image.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-normalization/normalize-image.html new file mode 100644 index 00000000000..0b60ec4442b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-normalization/normalize-image.html @@ -0,0 +1,30 @@ + + +CSSImageValue normalization tests + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-normalization/normalize-resource.tentative.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-normalization/normalize-resource.tentative.html deleted file mode 100644 index a97227747d5..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-normalization/normalize-resource.tentative.html +++ /dev/null @@ -1,56 +0,0 @@ - - -CSSResourceValue normalization tests - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssImageValue.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssImageValue.html new file mode 100644 index 00000000000..92256e59673 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssImageValue.html @@ -0,0 +1,19 @@ + + +CSSURLImageValue serialization tests + + + + + +
+
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssUrlImageValue.tentative.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssUrlImageValue.tentative.html deleted file mode 100644 index c97ed0d1b41..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssUrlImageValue.tentative.html +++ /dev/null @@ -1,15 +0,0 @@ - - -IDL-constructed CSSURLImageValue serialization tests - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html deleted file mode 100644 index ed86054026f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html +++ /dev/null @@ -1,22 +0,0 @@ - - -CSSURLImageValue IDL - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html deleted file mode 100644 index 8d6370a223a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSSURLImageValue Error Handling - - - - - -
- diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html deleted file mode 100644 index abc944fcfb0..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html +++ /dev/null @@ -1,81 +0,0 @@ - - -CSSURLImageValue - - - - - - -
- diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js index a198c414246..b4ed1e7a080 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js @@ -145,22 +145,6 @@ const gTestSyntaxExamples = { } ], }, - '': { - description: 'an image', - examples: [ - { - description: "a PNG image", - input: new CSSURLImageValue('/media/1x1.png'), - defaultComputed: (_, result) => { - // URLs compute to absolute URLs - assert_true(result instanceof CSSURLImageValue, - 'Computed value should be a CSSURLImageValue'); - assert_true(result.url.endsWith('/media/1x1.png'), - 'Computed value should be an absolute URL'); - } - } - ], - }, '': { description: 'a transform', examples: [ @@ -218,6 +202,24 @@ function testPropertyValid(propertyName, examples, specified, computed, descript }, `Can set '${propertyName}' to ${description}`); } +// We have to special case CSSImageValue as they cannot be created with a +// constructor and are completely opaque. +function testIsImageValidForProperty(propertyName) { + test(t => { + let element1 = createDivWithStyle(t, `${propertyName}: url("/media/1x1-green.png")`); + let element2 = createDivWithStyle(t); + + const result = element1.attributeStyleMap.get(propertyName); + assert_not_equals(result, null, 'Image value must not be null'); + assert_class_string(result, 'CSSImageValue', + 'Image value must be a CSSImageValue'); + + element2.attributeStyleMap.set(propertyName, result); + assert_equals(element2.style[propertyName], element1.style[propertyName], + 'Image value can be set on different element'); + }, `Can set '${propertyName}' to an image`); +} + // Test that styleMap.set throws for invalid values function testPropertyInvalid(propertyName, examples, description) { test(t => { @@ -289,6 +291,12 @@ function runPropertyTests(propertyName, testCases) { 'CSS-wide keywords'); for (const testCase of testCases) { + // is a special case + if (testCase.syntax === '') { + testIsImageValidForProperty(propertyName); + continue; + } + // Retrieve test examples for this test case's syntax. If the syntax // looks like a keyword, then create an example on the fly. const syntaxExamples = testCase.syntax.match(/^[a-z\-]+$/) ? diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html new file mode 100644 index 00000000000..3334b97247e --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html.sub.headers new file mode 100644 index 00000000000..111121a52fb --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen *; diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html new file mode 100644 index 00000000000..60e22f4aec8 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html.sub.headers new file mode 100644 index 00000000000..0cc259b24f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen 'self'; diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html new file mode 100644 index 00000000000..cce2fdb1b9f --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html @@ -0,0 +1,52 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html.sub.headers new file mode 100644 index 00000000000..c2493a08903 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen 'self' https://{{domains[www]}}:{{ports[https][0]}} https://www.example.com; diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html new file mode 100644 index 00000000000..c025705a36b --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html.sub.headers new file mode 100644 index 00000000000..04d160ae103 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html.sub.headers @@ -0,0 +1,2 @@ +Feature-Policy: fullscreen 'none'; + diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html new file mode 100644 index 00000000000..289fd508444 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html @@ -0,0 +1,61 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html.sub.headers new file mode 100644 index 00000000000..111121a52fb --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen *; diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html new file mode 100644 index 00000000000..274b3ebe907 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html @@ -0,0 +1,62 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html.sub.headers new file mode 100644 index 00000000000..0cc259b24f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen 'self'; diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html new file mode 100644 index 00000000000..f15b43576f2 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html @@ -0,0 +1,50 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html.sub.headers new file mode 100644 index 00000000000..961d40336ae --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen 'none'; diff --git a/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-allowedfeatures.html b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-allowedfeatures.html new file mode 100644 index 00000000000..9cc8e1e33a3 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-allowedfeatures.html @@ -0,0 +1,7 @@ + diff --git a/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html new file mode 100644 index 00000000000..3d9530c26f6 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html @@ -0,0 +1,50 @@ + + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js b/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js index b08d560d143..925408ea8a4 100644 --- a/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js +++ b/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js @@ -247,3 +247,139 @@ function run_all_fp_tests_allow_all( 'Feature policy "' + feature_name + '" can be disabled in cross-origin iframes using "allow" attribute.'); } + +// This function tests that a given policy allows each feature for the correct +// list of origins specified by the |expected_policy|. +// Arguments: +// expected_policy: A list of {feature, allowlist} pairs where the feature is +// enabled for every origin in the allowlist, in the |policy|. +// policy: Either a document.policy or a iframe.policy to be tested. +// message: A short description of what policy is being tested. +function test_allowlists(expected_policy, policy, message) { + for (var allowlist of allowlists) { + test(function() { + assert_array_equals( + policy.getAllowlistForFeature(allowlist.feature), + allowlist.allowlist); + }, message + ' for feature ' + allowlist.feature); + } +} + +// This function tests that a subframe's document policy allows a given feature. +// A feature is allowed in a frame either through inherited policy or specified +// by iframe allow attribute. +// Arguments: +// test: test created by testharness. Examples: async_test, promise_test. +// feature: feature name that should be allowed in the frame. +// src: the URL to load in the frame. +// allow: the allow attribute (container policy) of the iframe +function test_allowed_feature_for_subframe(message, feature, src, allow) { + let frame = document.createElement('iframe'); + if (typeof allow !== 'undefined') { + frame.allow = allow; + } + promise_test(function() { + frame.src = src; + return new Promise(function(resolve, reject) { + window.addEventListener('message', function handler(evt) { + resolve(evt.data); + }, { once: true }); + document.body.appendChild(frame); + }).then(function(data) { + assert_true(data.includes(feature), feature); + }); + }, message); +} + +// This function tests that a subframe's document policy disallows a given +// feature. A feature is allowed in a frame either through inherited policy or +// specified by iframe allow attribute. +// Arguments: +// test: test created by testharness. Examples: async_test, promise_test. +// feature: feature name that should not be allowed in the frame. +// src: the URL to load in the frame. +// allow: the allow attribute (container policy) of the iframe +function test_disallowed_feature_for_subframe(message, feature, src, allow) { + let frame = document.createElement('iframe'); + if (typeof allow !== 'undefined') { + frame.allow = allow; + } + promise_test(function() { + frame.src = src; + return new Promise(function(resolve, reject) { + window.addEventListener('message', function handler(evt) { + resolve(evt.data); + }, { once: true }); + document.body.appendChild(frame); + }).then(function(data) { + assert_false(data.includes(feature), feature); + }); + }, message); +} + +// This function tests that a subframe with header policy defined on a given +// feature allows and disallows the feature as expected. +// Arguments: +// feature: feature name. +// frame_header_policy: either *, 'self' or 'none', defines the frame +// document's header policy on |feature|. +// src: the URL to load in the frame. +// test_expects: contains 6 expected results of either |feature| is allowed +// or not inside of a local or remote iframe nested inside +// the subframe given the header policy to be either *, +// 'slef', or 'none'. +// test_name: name of the test. +function test_subframe_header_policy( + feature, frame_header_policy, src, test_expects, test_name) { + let frame = document.createElement('iframe'); + promise_test(function() { + frame.src = src + '?pipe=sub|header(Feature-Policy,' + feature + ' ' + + frame_header_policy + ';)'; + return new Promise(function(resolve, reject) { + let results = []; + window.addEventListener('message', function handler(evt) { + results.push(evt.data); + if (results.length >= 6) { + resolve(results); + } + }); + document.body.appendChild(frame); + }).then(function(results) { + for (var j = 0; j < results.length; j++) { + var data = results[j]; + + function test_result(message, test_expect) { + if (test_expect) { + assert_true(data.allowedfeatures.includes(feature), message); + } else { + assert_false(data.allowedfeatures.includes(feature), message); + } + } + + if (data.frame === 'local') { + if (data.policy === '*') { + test_result('local_all:', test_expects.local_all); + } + if (data.policy === '\'self\'') { + test_result('local_self:', test_expects.local_self); + } + if (data.policy === '\'none\'') { + test_result('local_none:', test_expects.local_none); + } + } + + if (data.frame === 'remote') { + if (data.policy === '*') { + test_result('remote_all:', test_expects.remote_all); + } + if (data.policy === '\'self\'') { + test_result('remote_self:', test_expects.remote_self); + } + if (data.policy === '\'none\'') { + test_result('remote_none:', test_expects.remote_none); + } + } + } + }); + }, test_name); +} diff --git a/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl b/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl index 2744076d9c1..6c33907a048 100644 --- a/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl +++ b/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl @@ -308,23 +308,6 @@ interface CSSPositionValue : CSSStyleValue { attribute CSSNumericValue y; }; -enum CSSResourceState {"unloaded", "loading", "loaded", "error"}; - [Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] -interface CSSResourceValue : CSSStyleValue { - readonly attribute CSSResourceState state; -}; - - -[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] -interface CSSImageValue : CSSResourceValue { - readonly attribute double? intrinsicWidth; - readonly attribute double? intrinsicHeight; - readonly attribute double? intrinsicRatio; -}; - -[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), - Constructor(USVString url)] -interface CSSURLImageValue : CSSImageValue { - readonly attribute USVString url; +interface CSSImageValue : CSSStyleValue { };