diff --git a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js index 000b9020df9d8..caf1deba510e6 100644 --- a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js +++ b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js @@ -274,6 +274,142 @@ 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