diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/location_reload-iframe.html b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/location_reload-iframe.html index 95b63d9f5d4..f08cf5de3e8 100644 --- a/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/location_reload-iframe.html +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/location_reload-iframe.html @@ -1,4 +1,4 @@ diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/location_reload.html b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/location_reload.html index 78b3cc35eb4..eb2c21b38a3 100644 --- a/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/location_reload.html +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/location_reload.html @@ -15,18 +15,17 @@ async_test(function(t) { var url = new URL("./location_reload-iframe.html", window.location).href; - var pingCount = 0; + window._pingCount = 0; window._ping = t.step_func(function(innerURL) { // Some browsers keep 'about:blank' in the session history - if (pingCount == 0) { + if (_pingCount == 0) { history_length = history.length; } - assert_equals(url, innerURL, "iframe url (" + pingCount + ")"); - assert_equals(history_length, history.length, "history length (" + pingCount + ")"); - pingCount++; - if (pingCount == 5) { - iframe.src = 'about:blank'; + assert_equals(url, innerURL, "iframe url (" + _pingCount + ")"); + assert_equals(history_length, history.length, "history length (" + _pingCount + ")"); + _pingCount++; + if (_pingCount == 5) { t.done(); } });