devtools/client/netmonitor/test/html_json-empty.html
author tanhengyeow <E0032242@u.nus.edu>
Tue, 09 Oct 2018 15:56:18 +0000
changeset 496157 c9d9dd203994cd2251869d7b470564281d5d995f
permissions -rw-r--r--
Bug 1437435 - Added isBase64, isEmpty method, cleaned up typos and format of comments. r=Honza Differential Revision: https://phabricator.services.mozilla.com/D6148

<!-- Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/ -->
<!doctype html>

<html>
  <head>
    <meta charset="utf-8"/>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>Network Monitor test page</title>
  </head>

  <body>
    <p>Empty JSON test page</p>

    <script type="text/javascript">
      /* exported performRequests */
      "use strict";

      function get(address, callback) {
        const xhr = new XMLHttpRequest();
        xhr.open("GET", address, true);

        xhr.onreadystatechange = function() {
          if (this.readyState == this.DONE) {
            callback();
          }
        };
        xhr.send(null);
      }

      function performRequests() {
        // Forward the query parameter for this page to sjs_json-test-server
        get("sjs_json-test-server.sjs" + window.location.search, function() {
          // Done.
        });
      }
    </script>
  </body>

</html>