| Index: LayoutTests/http/tests/navigation/resources/navigate-during-commit.start.html
|
| diff --git a/LayoutTests/http/tests/navigation/resources/navigate-during-commit.start.html b/LayoutTests/http/tests/navigation/resources/navigate-during-commit.start.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e8b70cf4101247905923e474c7dcc6dc9f2b2c08
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/navigation/resources/navigate-during-commit.start.html
|
| @@ -0,0 +1,32 @@
|
| +<html>
|
| +<head>
|
| +<script>
|
| +// Induces an attempt to hash navigate while the SUCCESS_URL is being committed to the frame.
|
| +// The tests succeeds if the SUCCESS_URL is loaded into the frame.
|
| +
|
| +function doIt() {
|
| + var SUCCESS_URL = "navigate-during-commit.success.html";
|
| + var VERY_SLOW_URL = "very-slow.php";
|
| + syncXhr(SUCCESS_URL); // Get it in the cache.
|
| + asyncXhr(VERY_SLOW_URL + "?" + window.randomNumber);
|
| + window.location = SUCCESS_URL;
|
| +}
|
| +
|
| +function asyncXhr(url) {
|
| + var xhr = new XMLHttpRequest();
|
| + xhr.open("GET", url, true);
|
| + xhr.onreadystatechange = function() { if (xhr.readyState == 4) { window.location.hash="hashnav"; } }
|
| + xhr.send();
|
| +}
|
| +
|
| +function syncXhr(url) {
|
| + var syncXhr = new XMLHttpRequest();
|
| + syncXhr.open("GET", url, false);
|
| + syncXhr.send();
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +<body onload="doIt()">
|
| +</body>
|
| +</html>
|
|
|