Skip to content

Commit

Permalink
Bug 1864973 [wpt PR 43188] - Add tests for feature detection logic, a…
Browse files Browse the repository at this point in the history
…=testonly

Automatic update from web-platform-tests
Add tests for feature detection logic

I'll be removing the feature flag in a subsequent CL now that we've
shipped, so I don't test the flag off case.

More context on the feature detection method at
WICG/turtledove#803

Bug: 1462720
Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265
Commit-Queue: Caleb Raitto <caraittochromium.org>
Reviewed-by: Matt Menke <mmenkechromium.org>
Cr-Commit-Position: refs/heads/main{#1225565}

--

wpt-commits: e95e83675b27957f4d0e60dffcb4cc6cedcccb3f
wpt-pr: 43188

UltraBlame original commit: b7a446823cf90ff4f71ea6e1ffb4fa7244d87c0e
  • Loading branch information
marco-c committed Nov 30, 2023
1 parent 8478224 commit 102b197
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ subsetTest(promise_test, async test => {
await runReportTest(
test, uuid,
directFromSellerSignalsValidatorCode(
uuid, null,
null, null),
uuid, null,
null, null),

[createSellerReportURL(uuid), createBidderReportURL(uuid)],

null,

{ directFromSellerSignalsHeaderAdSlot: 'adSlot/0'}
);
{directFromSellerSignalsHeaderAdSlot: 'adSlot/0'});
}, 'Test directFromSellerSignals with empty Ad-Auction-Signals header.');

subsetTest(promise_test, async test => {
Expand Down Expand Up @@ -495,3 +494,11 @@ subsetTest(promise_test, async test => {
{ directFromSellerSignalsHeaderAdSlot: 'adSlot' }
);
}, 'Test directFromSellerSignals with network error.');

subsetTest(promise_test, async test => {
let dfss = false;
navigator.runAdAuction({
get directFromSellerSignalsHeaderAdSlot() { dfss = true; }
}).catch((e) => {});
assert_true(dfss);
}, 'Test directFromSellerSignals feature detection.');

0 comments on commit 102b197

Please sign in to comment.