Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage of onload = t.step_timeout in WPT tests #33034

Merged
merged 1 commit into from Mar 3, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -5,7 +5,7 @@
promise_test(async t => {
// Wait for after the load event so that the navigation doesn't get converted
// into a replace navigation.
await new Promise(resolve => window.onload = t.step_timeout(resolve, 0));
await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0));
await appHistory.navigate("#foo").committed;
assert_equals(appHistory.entries().length, 2);

Expand Down
Expand Up @@ -5,7 +5,7 @@
promise_test(async t => {
// Wait for after the load event so that the navigation doesn't get converted
// into a replace navigation.
await new Promise(resolve => window.onload = t.step_timeout(resolve, 0));
await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0));

let oncurrentchange_called = false;
let original_entry = appHistory.current;
Expand Down
Expand Up @@ -5,7 +5,7 @@
promise_test(async t => {
// Wait for after the load event so that the navigation doesn't get converted
// into a replace navigation.
await new Promise(resolve => window.onload = t.step_timeout(resolve, 0));
await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0));

let oncurrentchange_called = false;
appHistory.oncurrentchange = t.step_func(e => {
Expand Down
Expand Up @@ -5,7 +5,7 @@
promise_test(async t => {
// Wait for after the load event so that the navigation doesn't get converted
// into a replace navigation.
await new Promise(resolve => window.onload = t.step_timeout(resolve, 0));
await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0));
await appHistory.navigate("#foo");
assert_equals(appHistory.entries().length, 2);

Expand Down
Expand Up @@ -3,7 +3,7 @@
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(t => {
window.onload = t.step_timeout(() => {
window.onload = () => t.step_timeout(() => {
let start_length = history.length;
let target_key = appHistory.current.key;
let target_id = appHistory.current.id;
Expand Down
Expand Up @@ -3,7 +3,7 @@
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(t => {
window.onload = t.step_timeout(() => {
window.onload = () => t.step_timeout(() => {
let start_length = history.length;
let target_key = appHistory.current.key;
let target_id = appHistory.current.id;
Expand Down
Expand Up @@ -16,7 +16,7 @@

<script>
async_test(t => {
window.onload = t.step_timeout(() => {
window.onload = () => t.step_timeout(() => {
let state = document.getElementById('emptyOnFirstVisit');
let selectMenu = document.getElementById("selectmenu0");

Expand Down