Skip to content

Commit

Permalink
Bug 1526598 [wpt PR 15255] - [html] Restore utility method for query …
Browse files Browse the repository at this point in the history
…encoding, a=testonly

Automatic update from web-platform-tests
[html] Restore utility method for query encoding

The `poll_for_stash` function was relocated from `resolve-url.js` in
service of a test refactoring [1]. However, the following tests depend
on the presence of that function in that file:

- html/infrastructure/urls/resolving-urls/query-encoding/utf-8.html
- html/infrastructure/urls/resolving-urls/query-encoding/windows-1251.html
- html/infrastructure/urls/resolving-urls/query-encoding/windows-1252.html

Restore the function to its original location and persist the copy.

[1] web-platform-tests/wpt#11300

--

wpt-commits: 9830c5ab1191c788adf006023da46aea07da46f8
wpt-pr: 15255

UltraBlame original commit: 2384c1c7af5a385461ca25c280aadaed4e46d3ad
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent d8a47ce commit ad56b1b
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@ onload = function() {
return 'expected substring '+expected+' got '+got;
}

function poll_for_stash(test_obj, uuid, expected) {
var start = new Date();
var poll = test_obj.step_func(function () {
var xhr = new XMLHttpRequest();
xhr.open('GET', stash_take + uuid);
xhr.onload = test_obj.step_func(function(e) {
if (xhr.response == "") {
if (new Date() - start > 10000) {


test_obj.force_timeout();
}
test_obj.step_timeout(poll, 200);
} else {
assert_equals(xhr.response, expected);
test_obj.done();
}
});
xhr.send();
})
test_obj.step_timeout(poll, 200);
}


function test_load_nested_browsing_context(tag, attr, spec_url) {
async_test(function() {
Expand Down

0 comments on commit ad56b1b

Please sign in to comment.