chromium/chrome/test/data/navigation_interception/navigation_from_xhr_callback_and_short_timeout.html

<!DOCTYPE html>
<html>
<!--

Copyright 2015 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.

-->
<head>
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
  <script>
    var xmlhttp = new XMLHttpRequest();

    function openHello() {
      window.location = 'hello.html';
    };

    function xhrOnReadyStateChange() {
      if (xmlhttp.readyState==4 && xmlhttp.status==200) {
        setTimeout(openHello, 100);
      }
    };

    function xhrAndOpenHello() {
      xmlhttp.onreadystatechange = xhrOnReadyStateChange;
      xmlhttp.open("GET", 'hello.html' , true);
      xmlhttp.send();
    };
  </script>
</head>
<body style='height:10000px;' onclick='xhrAndOpenHello();'>
  Click page.
</body>
</html>