New issue
Advanced search Search tips

Issue 732003 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 703703
issue 716085



Sign in to add a comment

Add web-platform-tests for feature policy

Project Member Reported by lunalu@chromium.org, Jun 10 2017

Issue description

We need to create a directory for feature policy, and provide some framework to test each feature with feature policy.

Currently usb has feature policy test in wpt. We should do that for payment, fullscreen, and vibrate.

And we should also write a README / wiki for teams that intend to add their features to feature policy in the future.
 

Comment 1 by lunalu@chromium.org, Jun 12 2017

Owner: loonyb...@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cbcda7af9eb6627071532029b314185e34fa76e3

commit cbcda7af9eb6627071532029b314185e34fa76e3
Author: Luna Lu <loonybear@chromium.org>
Date: Tue Jun 20 23:10:29 2017

Add feature-policy to web-platform-tests

This CL creates a feature-policy directory under wpt/, as well, provides some
framework for testing features with feature policy.

Using the framework, this CL added feature policy tests for payment, and
modified existing feature policy usb tests using the framework introduced.

Bug:  732003 
Change-Id: I7d690acfe70b63d4935f6a4c6c43e94da5503827
Reviewed-on: https://chromium-review.googlesource.com/533953
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Luna Lu <loonybear@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481008}
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-payment.html
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-usb.html
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/featurepolicy.js
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/redirect-on-load.html
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-allowed-by-feature-policy-attribute.https.sub.html
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-allowed-by-feature-policy.https.sub.html
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-allowed-by-feature-policy.https.sub.html.headers
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-default-feature-policy.https.sub.html
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-disabled-by-feature-policy.https.sub.html
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-disabled-by-feature-policy.https.sub.html.headers
[delete] https://crrev.com/1775c82557d33c76060785470935797353458fd0/third_party/WebKit/LayoutTests/external/wpt/webusb/resources/check-availability.html
[delete] https://crrev.com/1775c82557d33c76060785470935797353458fd0/third_party/WebKit/LayoutTests/external/wpt/webusb/resources/featurepolicytest.js
[add] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
[modify] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/webusb/usb-allowed-by-feature-policy-attribute.https.sub.html
[modify] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/webusb/usb-allowed-by-feature-policy.https.sub.html
[modify] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/webusb/usb-default-feature-policy.https.sub.html
[modify] https://crrev.com/cbcda7af9eb6627071532029b314185e34fa76e3/third_party/WebKit/LayoutTests/external/wpt/webusb/usb-disabled-by-feature-policy.https.sub.html

Blockedon: 703703
Once feature policy is exposed via JS, write more feature policy wpt tests.
Note: tests added in comment 2 are currently disabled because of  crbug.com/737643 . https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/LayoutTests/TestExpectations#3059

Do you plan to re-enable these tests? Also, since  issue 737643  has been closed, would you mind us linking the disabled tests to this bug instead?
Talked to Ian, he said these tests should be re-enabled. CL up: https://chromium-review.googlesource.com/c/chromium/src/+/841264
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7da3a94fab6ffc2f4865d5c00654a0addb4f86dc

commit 7da3a94fab6ffc2f4865d5c00654a0addb4f86dc
Author: Robert Ma <robertma@chromium.org>
Date: Fri Dec 22 15:42:02 2017

Re-enable feature policy tests

And fix a typo in a test along the way.

Bug:  732003 ,  796617 
Change-Id: I9df6fb630139e1a2534c174c20804111a9189a31
Reviewed-on: https://chromium-review.googlesource.com/841264
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525996}
[modify] https://crrev.com/7da3a94fab6ffc2f4865d5c00654a0addb4f86dc/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/7da3a94fab6ffc2f4865d5c00654a0addb4f86dc/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforall.php

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6252427ab5415839618a0d25e4f6e61becce3923

commit 6252427ab5415839618a0d25e4f6e61becce3923
Author: Luna Lu <loonybear@chromium.org>
Date: Wed Jan 24 21:51:25 2018

Add WPT tests for feature policy

1. Added tests for header policy.
    a. document.policy shows correctly parsed policy
    b. local / remote iframes without allow attribute correctly inherit
       document.policy
    c. dynamically update allow attribute updates the policy correctly.

2. Added tests for nested policies.

Bug:  732003 
Change-Id: I869449f6bba89fc58997355df27249f403d76808
Reviewed-on: https://chromium-review.googlesource.com/796952
Commit-Queue: Luna Lu <loonybear@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531698}
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy.https.sub.html
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy.https.sub.html.sub.headers
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy.https.sub.html
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy.https.sub.html.sub.headers
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-allowedfeatures.html
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html.sub.headers
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-subframe-policy.https.sub.html
[add] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-subframe-policy.https.sub.html.sub.headers
[modify] https://crrev.com/6252427ab5415839618a0d25e4f6e61becce3923/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/featurepolicy.js

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2928474c39318c6a744da6162508b7ff5a9cf96c

commit 2928474c39318c6a744da6162508b7ff5a9cf96c
Author: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Date: Thu Jan 25 04:27:13 2018

Revert "Add WPT tests for feature policy"

This reverts commit 6252427ab5415839618a0d25e4f6e61becce3923.

Reason for revert: Fails site_per_process_webkit_layout_tests

https://uberchromegw.corp.google.com/i/chromium.linux/builders/Linux%20Tests/builds/66700

Original change's description:
> Add WPT tests for feature policy
> 
> 1. Added tests for header policy.
>     a. document.policy shows correctly parsed policy
>     b. local / remote iframes without allow attribute correctly inherit
>        document.policy
>     c. dynamically update allow attribute updates the policy correctly.
> 
> 2. Added tests for nested policies.
> 
> Bug:  732003 
> Change-Id: I869449f6bba89fc58997355df27249f403d76808
> Reviewed-on: https://chromium-review.googlesource.com/796952
> Commit-Queue: Luna Lu <loonybear@chromium.org>
> Reviewed-by: Ian Clelland <iclelland@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#531698}

TBR=iclelland@chromium.org,loonybear@chromium.org

Change-Id: I7b12b6809313f91df3f742e949439719adf8b867
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  732003 
Reviewed-on: https://chromium-review.googlesource.com/885741
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531812}
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy.https.sub.html
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy.https.sub.html.sub.headers
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy.https.sub.html
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy.https.sub.html.sub.headers
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-allowedfeatures.html
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html.sub.headers
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-subframe-policy.https.sub.html
[delete] https://crrev.com/ea8b932d3e0df99e89dc606dc35335d10e414c94/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-subframe-policy.https.sub.html.sub.headers
[modify] https://crrev.com/2928474c39318c6a744da6162508b7ff5a9cf96c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/featurepolicy.js

Project Member

Comment 9 by bugdroid1@chromium.org, Feb 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a14d168b18d3f922d3943418f4987e1e1473767c

commit a14d168b18d3f922d3943418f4987e1e1473767c
Author: Luna Lu <loonybear@chromium.org>
Date: Fri Feb 23 21:21:55 2018

Reland "Add WPT tests for feature policy"

This is a reland of 6252427ab5415839618a0d25e4f6e61becce3923.

Original change's description:
> Add WPT tests for feature policy
> 
> 1. Added tests for header policy.
>     a. document.policy shows correctly parsed policy
>     b. local / remote iframes without allow attribute correctly inherit
>        document.policy
>     c. dynamically update allow attribute updates the policy correctly.
> 
> 2. Added tests for nested policies.
> 
> Bug:  732003 
> Change-Id: I869449f6bba89fc58997355df27249f403d76808
> Reviewed-on: https://chromium-review.googlesource.com/796952
> Commit-Queue: Luna Lu <loonybear@chromium.org>
> Reviewed-by: Ian Clelland <iclelland@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#531698}

Bug:  732003 
Change-Id: I46065efff8c5af2d5279721f3c759580b0807e05
Reviewed-on: https://chromium-review.googlesource.com/887324
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Luna Lu <loonybear@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538904}
[modify] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html.sub.headers
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html.sub.headers
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html.sub.headers
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html.sub.headers
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy-allowed-for-all.https.sub.html.sub.headers
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy-allowed-for-self.https.sub.html.sub.headers
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html.sub.headers
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-allowedfeatures.html
[add] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html
[modify] https://crrev.com/a14d168b18d3f922d3943418f4987e1e1473767c/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/featurepolicy.js

Blockedon: 716085
Status: Fixed (was: Started)
Project Member

Comment 12 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04

commit ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04
Author: Luna Lu <loonybear@chromium.org>
Date: Tue Mar 13 17:21:45 2018

Add WPT tests for feature policy frame policy

1. Without specifying allow attribute, frame policy inherits correctly.
2. With allow attribute, frame policy inherits from and overrides header policy
   correctly. Updating allowfullscreen and allowpaymentrequest correctly updates
   frame policy.
3. Frame policy is not affected by the frame's document policy.

Bug:  732003 
Change-Id: Ib41f883a779f11c564c91cfc03ff1224330108f5
Reviewed-on: https://chromium-review.googlesource.com/850896
Commit-Queue: Luna Lu <loonybear@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542837}
[add] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html
[add] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html.sub.headers
[add] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html
[add] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html.sub.headers
[add] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html
[add] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html.sub.headers
[add] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html
[add] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html.sub.headers
[modify] https://crrev.com/ad9cc1569959e7372a9b2e0f9c41ff6210bf6b04/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/featurepolicy.js

Sign in to add a comment