commit | c5e4b7fd15ebf1230a050e064faf06d7224947dd | [log] [tgz] |
---|---|---|
author | Nathan Memmott <memmott@chromium.org> | Tue Jun 06 22:42:45 2023 |
committer | Blink WPT Bot <blink-w3c-test-autoroller@chromium.org> | Tue Jun 06 23:13:39 2023 |
tree | c70f972d69851dfe5517abd550a0132f09a83519 | |
parent | 7690497bf37a4ecb28cf2cfef5e611c91882e76d [diff] |
Revert "Fenced frames: Local network access." This reverts commit c02af164b8b7cee63e3c97901113c386f9100e67. Reason for revert: The tests introduced in this CL are failing. Original change's description: > Fenced frames: Local network access. > > Fenced frames are only allowed in secure context. So the tests are > all in secure contexts. > > 1. Subresource fetch: > > Fenced frame's IP address space is set to `kPublic` in order to make > it subject to local network access check. > > web_tests/external/wpt/fetch/local-network-access/ > fetch.https.window.js is replicated and replaced iframes with fenced > frames. All test cases are passing with the same behaviors as iframes. > > 2. Document fetch: > > Fenced frame's document fetch initiator can only be the parent. > Fenced frames can only be navigated in two ways: > > 1. Directly by their parent, and never by another frame at a distance > via `window.location` or `window.open`; in this case the `ClientSecurityState` needs to come from the parent. > 2. By themselves; in this case the `ClientSecurityState` also needs to > come from its embedder/parent. > > The ClientSecurityState of its parent is supplied to the > NavigationURLLoader. > > web_tests/external/wpt/fetch/local-network-access/ > iframe.tentative.https.window.js is replicated and replaced iframes > with fenced frames. All test cases have the same results as the > iframe test expectations, except one: > > treat-as-public-address to local (same-origin): no preflight > required > > - Iframe: the request is made without preflight. The nested iframe is > loaded successfully. > > - Fenced frame: a preflight is made, and gets blocked. See a. below. > > I changed the test expectation for this test only. (PASS for iframe, > but FAIL for fenced frame) > > Here are some noteworthy things we observed for document fetch. The > following only applies to embedder-initiated navigations (i.e., the > initial navigation of the frame): > a. Fenced frame's document fetch's preflight request is always sent > with `Origin: null`. This applies to embedder-initiated navigations > (i.e., the initial navigation of the frame). I think this affects the > outcome of Local Network Access check algorithm. > https://source.chromium.org/chromium/chromium/src/+/main:content/browser/fenced_frame/fenced_frame.cc;l=119-126?q=fencedframe::n&ss=chromium%2Fchromium%2Fsrc > > A `null` origin implies > LocalNetworkAccessChecker::is_potentially_trustworthy_same_origin_ > will always be false. > > b. For testing purposes, we tried manually overriding the initiator > origin with a real origin and found that the preflight request still > failed. This is because the credentials mode of the navigation is > `'include'`, which prevents `Access-Control-Allow-Origin: '*'` from > working, which iframes equivalently suffer from: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/fetch/local-network-access/iframe.tentative.https.window-expected.txt?q=%22FAIL%20%22%20f:third_party%2Fblink%2Fweb_tests%2Fexternal%2Fwpt%2Ffetch%2Flocal-network-access%2Fiframe.tentative.https.window-expected.txt. > > Bug: 1420626 > Change-Id: I74c97369d235e1725c650bfe87f29372992cb56b > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4532557 > Reviewed-by: Titouan Rigoudy <titouan@chromium.org> > Reviewed-by: Alex Moshchuk <alexmos@chromium.org> > Reviewed-by: Weizhong Xia <weizhong@google.com> > Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1154027} Bug: 1420626, 1451954 Change-Id: I6782a98adb7536062c2192a0b815c0d2e8146ac2 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4595360 Owners-Override: Nathan Memmott <memmott@chromium.org> Commit-Queue: Nathan Memmott <memmott@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1154123}
The web-platform-tests Project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.
The most important sources of information and activity are:
wpt:matrix.org
matrix channel; includes participants located around the world, but busiest during the European working day.If you'd like clarification about anything, don't hesitate to ask in the chat room or on the mailing list.
Clone or otherwise get https://github.com/web-platform-tests/wpt.
Note: because of the frequent creation and deletion of branches in this repo, it is recommended to “prune” stale branches when fetching updates, i.e. use git pull --prune
(or git fetch -p && git merge
).
See the documentation website and in particular the system setup for running tests locally.
The wpt
command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:
wpt serve
- For starting the wpt http serverwpt run
- For running tests in a browserwpt lint
- For running the lint against all testswpt manifest
- For updating or generating a MANIFEST.json
test manifestwpt install
- For installing the latest release of a browser or webdriver server on the local machine.wpt serve-wave
- For starting the wpt http server and the WAVE test runner. For more details on how to use the WAVE test runner see the documentation.On Windows wpt
commands must be prefixed with python
or the path to the python binary (if python
is not in your %PATH%
).
python wpt [command]
Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt
commands.
Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false
in your working tree.
The master branch is automatically synced to wpt.live and w3c-test.org.
Save the Web, Write Some Tests!
Absolutely everyone is welcome to contribute to test development. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.
The way to contribute is just as usual:
git checkout -b topic
../wpt lint
as described above.If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!