Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/fixtures/wpt/common/redirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ def main(request, response):
The request should typically have two query parameters:
status - The status to use for the redirection. Defaults to 302.
location - The resource to redirect to.

This utility optionally supports CORS (iff the `enable-cors` query param is
present).
"""
status = 302
if b"status" in request.GET:
Expand All @@ -17,3 +20,10 @@ def main(request, response):
location = request.GET.first(b"location")

response.headers.set(b"Location", location)

if request.GET.get(b"enable-cors") is not None:
origin = request.headers.get(b"Origin")
if origin:
response.headers.set(b"Content-Type", b"text/plain")
response.headers.set(b"Access-Control-Allow-Origin", origin)
response.headers.set(b"Access-Control-Allow-Credentials", 'true')
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// META: script=../../../service-workers/service-worker/resources/test-helpers.sub.js

promise_test(async t => {
const frame = await with_iframe('./resources/hello.html.br');
assert_equals(frame.contentDocument.body.textContent, 'Hello world');
}, `Naigation to br encoded page`);
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Content-type: text/html
Content-Encoding: br
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// META: script=../../../service-workers/service-worker/resources/test-helpers.sub.js

promise_test(async t => {
const frame = await with_iframe('./resources/hello.html.gz');
assert_equals(frame.contentDocument.body.textContent, 'Hello world');
}, `Naigation to gzip encoded page`);
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Content-type: text/html
Content-Encoding: gzip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Content-type: text/html
Content-Encoding: zstd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// META: script=../../../service-workers/service-worker/resources/test-helpers.sub.js

promise_test(async t => {
const frame = await with_iframe('./resources/hello.html.zst');
assert_equals(frame.contentDocument.body.textContent, 'Hello world');
}, `Naigation to zstd encoded page`);
10 changes: 0 additions & 10 deletions test/fixtures/wpt/interfaces/DOM-Parsing.idl

This file was deleted.

4 changes: 0 additions & 4 deletions test/fixtures/wpt/interfaces/SVG.idl
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,6 @@ interface SVGAnimatedPreserveAspectRatio {
[SameObject] readonly attribute SVGPreserveAspectRatio animVal;
};

[Exposed=Window]
interface SVGPathElement : SVGGeometryElement {
};

[Exposed=Window]
interface SVGRectElement : SVGGeometryElement {
[SameObject] readonly attribute SVGAnimatedLength x;
Expand Down
12 changes: 11 additions & 1 deletion test/fixtures/wpt/interfaces/css-mixins.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
// Source: CSS Functions and Mixins Module (https://drafts.csswg.org/css-mixins-1/)

[Exposed=Window]
interface CSSFunctionRule : CSSGroupingRule { };
interface CSSFunctionRule : CSSGroupingRule {
readonly attribute CSSOMString name;
sequence<FunctionParameter> getParameters();
readonly attribute CSSOMString returnType;
};

dictionary FunctionParameter {
required CSSOMString name;
required CSSOMString type;
CSSOMString? defaultValue;
};

[Exposed=Window]
interface CSSFunctionDescriptors : CSSStyleDeclaration {
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/wpt/interfaces/dom.idl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ interface mixin ParentNode {
[CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
[CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);

[CEReactions] undefined moveBefore(Node node, Node? child);

Element? querySelector(DOMString selectors);
[NewObject] NodeList querySelectorAll(DOMString selectors);
};
Expand Down
8 changes: 8 additions & 0 deletions test/fixtures/wpt/interfaces/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,7 @@ interface mixin CanvasPathDrawingStyles {

interface mixin CanvasTextDrawingStyles {
// text
attribute DOMString lang; // (default: "inherit")
attribute DOMString font; // (default 10px sans-serif)
attribute CanvasTextAlign textAlign; // (default: "start")
attribute CanvasTextBaseline textBaseline; // (default: "alphabetic")
Expand Down Expand Up @@ -2368,6 +2369,13 @@ partial interface Range {
[CEReactions, NewObject] DocumentFragment createContextualFragment((TrustedHTML or DOMString) string);
};

[Exposed=Window]
interface XMLSerializer {
constructor();

DOMString serializeToString(Node root);
};

[Exposed=Window]
interface Navigator {
// objects implementing this interface also implement the interfaces given below
Expand Down
17 changes: 8 additions & 9 deletions test/fixtures/wpt/interfaces/ppa.idl
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ partial interface Navigator {
enum PrivateAttributionProtocol { "dap-12-histogram", "tee-00" };

dictionary PrivateAttributionAggregationService {
required DOMString url;
required DOMString protocol;
};

[SecureContext, Exposed=Window]
interface PrivateAttributionAggregationServices {
readonly setlike<PrivateAttributionAggregationService>;
readonly maplike<USVString, PrivateAttributionAggregationService>;
};

[SecureContext, Exposed=Window]
Expand All @@ -27,7 +26,7 @@ interface PrivateAttribution {
dictionary PrivateAttributionImpressionOptions {
required unsigned long histogramIndex;
unsigned long filterData = 0;
required DOMString conversionSite;
required USVString conversionSite;
unsigned long lifetimeDays = 30;
};

Expand All @@ -37,19 +36,19 @@ partial interface PrivateAttribution {
};

dictionary PrivateAttributionConversionOptions {
required DOMString aggregationService;
required USVString aggregationService;
double epsilon = 1.0;

required unsigned long histogramSize;

unsigned long lookbackDays;
unsigned long filterData;
sequence<USVString> impressionSites = [];
sequence<USVString> intermediarySites = [];

PrivateAttributionLogic logic = "last-touch";
unsigned long value = 1;
unsigned long maxValue = 1;

unsigned long lookbackDays;
unsigned long filterData;
sequence<DOMString> impressionSites = [];
sequence<DOMString> intermediarySites = [];
};

dictionary PrivateAttributionConversionResult {
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/wpt/interfaces/private-aggregation-api.idl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
SecureContext]
interface PrivateAggregation {
undefined contributeToHistogram(PAHistogramContribution contribution);
undefined contributeToHistogramOnEvent(DOMString event,
record<DOMString, any> contribution);
undefined enableDebugMode(optional PADebugModeOptions options = {});
};

Expand Down
61 changes: 0 additions & 61 deletions test/fixtures/wpt/interfaces/sanitizer-api.tentative.idl

This file was deleted.

4 changes: 1 addition & 3 deletions test/fixtures/wpt/interfaces/shared-storage.idl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ dictionary SharedStorageSetMethodOptions : SharedStorageModifierMethodOptions {

[Exposed=(Window,SharedStorageWorklet)]
interface SharedStorage {
Promise<DOMString> get(DOMString key);
Promise<any> set(DOMString key,
DOMString value,
optional SharedStorageSetMethodOptions options = {});
Expand All @@ -97,9 +98,6 @@ interface SharedStorage {
[Exposed=Window]
readonly attribute SharedStorageWorklet worklet;

[Exposed=SharedStorageWorklet]
Promise<DOMString> get(DOMString key);

[Exposed=SharedStorageWorklet]
Promise<unsigned long> length();

Expand Down
31 changes: 31 additions & 0 deletions test/fixtures/wpt/interfaces/svg-paths.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: SVG Paths (https://svgwg.org/specs/paths/)

[LegacyNoInterfaceObject, Exposed=Window]
interface SVGPathSegment {
attribute DOMString type;
attribute FrozenArray<float> values;
};

dictionary SVGPathDataSettings {
boolean normalize = false;
};

interface mixin SVGPathData {
sequence<SVGPathSegment> getPathData(optional SVGPathDataSettings settings = {});
undefined setPathData(sequence<SVGPathSegment> pathData);
};

[Exposed=Window]
interface SVGPathElement : SVGGeometryElement {

readonly attribute SVGAnimatedNumber pathLength;

float getTotalLength();
DOMPoint getPointAtLength(float distance);
SVGPathSegment? getPathSegmentAtLength(float distance);
};

SVGPathElement includes SVGPathData;
10 changes: 4 additions & 6 deletions test/fixtures/wpt/interfaces/turtledove.idl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dictionary AuctionAd {
sequence<USVString> selectableBuyerAndSellerReportingIds;
sequence<USVString> allowedReportingOrigins;
DOMString adRenderId;
USVString creativeScanningMetadata;
};

dictionary AuctionAdInterestGroupSize {
Expand Down Expand Up @@ -106,6 +107,7 @@ dictionary AuctionAdConfig {
USVString trustedScoringSignalsURL;
long maxTrustedScoringSignalsURLLength;
USVString trustedScoringSignalsCoordinator;
boolean sendCreativeScanningMetadata;
sequence<USVString> interestGroupBuyers;
Promise<any> auctionSignals;
Promise<any> sellerSignals;
Expand Down Expand Up @@ -218,12 +220,6 @@ dictionary PAExtendedHistogramContribution {
bigint filteringId = 0;
};

[Exposed=InterestGroupScriptRunnerGlobalScope]
partial interface PrivateAggregation {
undefined contributeToHistogramOnEvent(
DOMString event, PAExtendedHistogramContribution contribution);
};

[Exposed=InterestGroupBiddingAndScoringScriptRunnerGlobalScope]
interface ForDebuggingOnly {
undefined reportAdAuctionWin(USVString url);
Expand Down Expand Up @@ -351,6 +347,8 @@ dictionary ScoringBrowserSignals {
unsigned long crossOriginDataVersion;
sequence<USVString> adComponents;
boolean forDebuggingOnlyInCooldownOrLockout = false;
USVString creativeScanningMetadata;
sequence<USVString?> adComponentsCreativeScanningMetadata;
};

dictionary ReportingBrowserSignals {
Expand Down
28 changes: 0 additions & 28 deletions test/fixtures/wpt/interfaces/webaudio.idl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ interface AudioContext : BaseAudioContext {
readonly attribute double baseLatency;
readonly attribute double outputLatency;
[SecureContext] readonly attribute (DOMString or AudioSinkInfo) sinkId;
[SecureContext] readonly attribute AudioRenderCapacity renderCapacity;
attribute EventHandler onsinkchange;
attribute EventHandler onerror;
AudioTimestamp getOutputTimestamp ();
Expand Down Expand Up @@ -116,33 +115,6 @@ dictionary AudioTimestamp {
DOMHighResTimeStamp performanceTime;
};

[Exposed=Window]
interface AudioRenderCapacity : EventTarget {
undefined start(optional AudioRenderCapacityOptions options = {});
undefined stop();
attribute EventHandler onupdate;
};

dictionary AudioRenderCapacityOptions {
double updateInterval = 1;
};

[Exposed=Window]
interface AudioRenderCapacityEvent : Event {
constructor (DOMString type, optional AudioRenderCapacityEventInit eventInitDict = {});
readonly attribute double timestamp;
readonly attribute double averageLoad;
readonly attribute double peakLoad;
readonly attribute double underrunRatio;
};

dictionary AudioRenderCapacityEventInit : EventInit {
double timestamp = 0;
double averageLoad = 0;
double peakLoad = 0;
double underrunRatio = 0;
};

[Exposed=Window]
interface OfflineAudioContext : BaseAudioContext {
constructor(OfflineAudioContextOptions contextOptions);
Expand Down
Loading