-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests_json_string.php
51 lines (40 loc) · 1.14 KB
/
tests_json_string.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<title>Compressed String Comparison Tests</title>
</head>
<body style="font-family: monospace">
<h1>Compressed String Comparison Tests</h1>
<div id="logging-info">
</div>
<script type="application/javascript">
function getResponse(id, url, repeat) {
var helper = function (id, url, start, repeat) {
if (repeat > 0)
{
if (window.XMLHttpRequest)
{
var r = new XMLHttpRequest();
r.open("GET", url, true);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) return;
var elem = document.getElementById(id);
elem.innerHTML += "<h3>Test #" + start + " for " + url + "</h3>";
elem.innerHTML += r.responseText;
elem.innerHTML += "#####################";
helper(id, url, start + 1, repeat - 1);
};
r.send(null);
}
}
};
helper(id, url, 1, repeat);
}
var repetitions = 100;
getResponse("logging-info", "tests/json_string.php", repetitions);
</script>
</body>
</html>