Files
tubestation/testing/web-platform/tests/browsing-topics/fetch-without-topics-flag.tentative.https.html
Yao Xiao e7e6939412 Bug 1814552 [wpt PR 38316] - [Topics] add web-platform-tests, a=testonly
Automatic update from web-platform-tests
[Topics] add web-platform-tests

Add basic API surface tests and permissions error tests.

An empty result is distinguishable with an error case. Right now
we cannot handle the requests more realistically to get non-empty
topics, as we are missing relevant mocks for History APIs, etc, and
those will be P2/future work.

Also, change the default permissions from false to true in
ContentBrowserClient::HandleTopicsWebApi(). This seems to be a
common practice to allow writing WPTs (e.g. ContentBrowserClient::AllowWorkerIndexedDB() also returns true, etc.).

Bug: 1381167
Change-Id: Iba75c684c70bbd79109f66405f892b229cd2245f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4215915
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1104127}

--

wpt-commits: ca56f0ecba108bfb211eb0b3e5755f47401f275c
wpt-pr: 38316
2023-03-02 11:01:31 +00:00

16 lines
506 B
HTML

<!doctype html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
promise_test(async t => {
let response = await fetch('./resources/check-topics-request-header.py');
let topics_header = await response.text();
// The request was not eligible for topics, as the `browsingTopics` flag
// was not set.
assert_equals(topics_header, "NO_TOPICS_HEADER");
}, 'test fetch(<url>)');
</script>
</body>