Skip to content

Commit c3833c9

Browse files
evnchnCopilot
andauthored
Immediate eagerness for speculative loading tests (zauberzeug#5573)
### Motivation Speculative tests fail on several branches Chrome 143 changed how the eagerness works. https://developer.chrome.com/release-notes/143#speculation_rules_mobile_eager_eagerness_improvements This PR fixes it in the root cause. Supersedes zauberzeug#5572 Tests pass on my branches until. It should also pass here. ### Implementation This pull request makes a minor change to the test setup for speculative loading by adjusting the eagerness setting in the rules. - Changed the `eagerness` value from `'eager'` to `'immediate'` in the `add_speculation_rule` helper function in `tests/test_speculative_loading.py` to better reflect the intended loading behavior. ### Progress - [x] I chose a meaningful title that completes the sentence: "If applied, this PR will..." - [x] The implementation is complete. - [x] Pytests have been added (or are not necessary). - [x] Documentation has been added (or is not necessary). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 0ce8e75 commit c3833c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_speculative_loading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async def answer() -> None:
123123

124124

125125
def add_speculation_rule(url: str, *, kind: str = 'prerender') -> None:
126-
rules = {kind: [{'source': 'list', 'urls': [url], 'eagerness': 'eager'}]}
126+
rules = {kind: [{'source': 'list', 'urls': [url], 'eagerness': 'immediate'}]}
127127
script = '<script type="speculationrules">' + json.dumps(rules) + '</script>'
128128
ui.add_head_html(script)
129129

0 commit comments

Comments
 (0)