Backed out 2 changesets (bug 1943998) for causing wd failures @ phases.py CLOSED...
[gecko.git] / devtools / client / netmonitor / test / html_api-calls-test-page.html
blob1385101a6431c8b35d27d35369d4a8bc8d17756c
1 <!-- Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ -->
3 <!doctype html>
5 <html>
6 <head>
7 <meta charset="utf-8"/>
8 <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
9 <meta http-equiv="Pragma" content="no-cache" />
10 <meta http-equiv="Expires" content="0" />
11 <title>Network Monitor test page</title>
12 </head>
14 <body>
15 <p>API calls request test</p>
17 <script type="text/javascript">
18 /* exported performRequests */
19 "use strict";
21 function get(address) {
22 return new Promise(resolve => {
23 const xhr = new XMLHttpRequest();
24 xhr.open("GET", address, true);
26 xhr.onreadystatechange = function() {
27 if (this.readyState == this.DONE) {
28 resolve();
31 xhr.send();
32 });
35 async function performRequests() {
36 await get("/api/fileName.xml");
37 await get("/api/file%E2%98%A2.xml");
38 await get("/api/ascii/get/");
39 await get("/api/unicode/%E2%98%A2/");
40 await get("/api/search/?q=search%E2%98%A2");
42 </script>
43 </body>
45 </html>