Skip to content

Commit 6cefd78

Browse files
Uzlopakgithub-actions[bot]
authored andcommitted
chore: update WPT
1 parent c0e634d commit 6cefd78

4 files changed

Lines changed: 118 additions & 54 deletions

File tree

test/fixtures/wpt/fetch/http-cache/no-vary-search.tentative.any.js

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
// META: script=http-cache.js
77
/*
88
NOTE for testing No-Vary-Search-Header:
9-
If `params` is set to true, `expect=("dispatch" "uuid")` must be specified.
10-
Otherwise:
11-
- The same HTTP Cache will be used by other tests, which are supposed
12-
to be distinguished by uuid.
13-
- The test utility cannot get the server's states because UA will use the HTTP
14-
Cache instead of sending a new request to server to ask for the latest state.
9+
- If `params` is set to true, `expect=("dispatch" "uuid")` must be specified.
10+
Otherwise:
11+
- The same HTTP Cache will be used by other tests, which are supposed
12+
to be distinguished by uuid.
13+
- The test utility cannot get the server's states because UA will use the HTTP
14+
Cache instead of sending a new request to server to ask for the latest state.
15+
- Do not test not_cached cases and cached cases within one test. Test infra
16+
checks the number of requests and responses without considering if the
17+
previous responses should be served from cache or not.
1518
*/
1619
var tests = [
1720
{
@@ -28,6 +31,61 @@ var tests = [
2831
expected_type: "cached"
2932
}
3033
]
34+
},
35+
{
36+
name: "Ground truth: When key-order is not set, URLs should be compared in an order-sensitive way.",
37+
requests: [
38+
{
39+
url_params: "a=1&b=2",
40+
response_headers: [
41+
["Cache-Control", "max-age=10000"],
42+
],
43+
},
44+
{
45+
url_params: "b=2&a=1",
46+
expected_type: "not_cached"
47+
}
48+
]
49+
},
50+
{
51+
name: "When key-order is set , URLs should be compared in an order-insensitive way. Matched cases:",
52+
requests: [
53+
{
54+
url_params: "a=1&b=2",
55+
response_headers: [
56+
["Cache-Control", "max-age=10000"],
57+
["No-Vary-Search", "key-order"],
58+
],
59+
},
60+
{
61+
url_params: "b=2&a=1",
62+
expected_type: "cached"
63+
}
64+
]
65+
},
66+
{
67+
name: "When key-order is set , URLs should be compared in an order-insensitive way. Not matched cases",
68+
requests: [
69+
{
70+
url_params: "a=1&b=2",
71+
response_headers: [
72+
["Cache-Control", "max-age=10000"],
73+
["No-Vary-Search", "key-order"],
74+
],
75+
},
76+
{
77+
url_params: "b=2",
78+
expected_type: "not_cached"
79+
},
80+
{
81+
url_params: "a=2&b=2",
82+
expected_type: "not_cached"
83+
},
84+
{
85+
url_params: "a=1&b=2&c=3",
86+
expected_type: "not_cached"
87+
}
88+
]
3189
}
3290
];
3391
run_tests(tests);

test/fixtures/wpt/resources/chromium/webxr-test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,9 @@ class MockRuntime {
956956

957957
this._calculateAnchorInformation(frameData);
958958

959-
this._calculateDepthInformation(frameData);
959+
if (options.depthActive) {
960+
this._calculateDepthInformation(frameData);
961+
}
960962

961963
this._injectAdditionalFrameData(options, frameData);
962964

test/fixtures/wpt/resources/test/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,4 @@ def _run_functional_test(self):
263263
@staticmethod
264264
def _assert_sequence(nums):
265265
if nums and len(nums) > 0:
266-
assert nums == list(range(1, nums[-1] + 1))
266+
assert nums == list(range(nums[-1] + 1))

0 commit comments

Comments
 (0)