1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/netmonitor/test/html_sorting-test-page.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +<!-- Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ --> 1.6 +<!doctype html> 1.7 + 1.8 +<html> 1.9 + <head> 1.10 + <meta charset="utf-8"/> 1.11 + <title>Network Monitor test page</title> 1.12 + </head> 1.13 + 1.14 + <body> 1.15 + <p>Sorting test</p> 1.16 + 1.17 + <script type="text/javascript"> 1.18 + function get(aAddress, aIndex, aCallback) { 1.19 + var xhr = new XMLHttpRequest(); 1.20 + // Use a random parameter to defeat caching. 1.21 + xhr.open("GET" + aIndex, aAddress + "?index=" + aIndex + "&" + Math.random(), true); 1.22 + 1.23 + xhr.onreadystatechange = function() { 1.24 + if (this.readyState == this.DONE) { 1.25 + aCallback(); 1.26 + } 1.27 + }; 1.28 + xhr.send(null); 1.29 + } 1.30 + 1.31 + function performRequests() { 1.32 + get("sjs_sorting-test-server.sjs", 1, function() { 1.33 + get("sjs_sorting-test-server.sjs", 5, function() { 1.34 + get("sjs_sorting-test-server.sjs", 2, function() { 1.35 + get("sjs_sorting-test-server.sjs", 4, function() { 1.36 + get("sjs_sorting-test-server.sjs", 3, function() { 1.37 + // Done. 1.38 + }); 1.39 + }); 1.40 + }); 1.41 + }); 1.42 + }); 1.43 + } 1.44 + </script> 1.45 + </body> 1.46 + 1.47 +</html>