-
Notifications
You must be signed in to change notification settings - Fork 0
/
testCustomBehaviourPage.html
70 lines (56 loc) · 3.76 KB
/
testCustomBehaviourPage.html
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<html>
<head>
<title>Test Specific Page Behaviour</title>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('testCustomBehaviourWorker.js')
.then(registration => {
//console.log('Service Worker registered successfully:', registration);
})
.catch(error => {
console.log('Service Worker registration failed:', error);
});
}
</script>
</head>
<body>
<h1>Test Specific Page Behaviour</h2>
<p>This landing page loads the service worker and provides access to configure the behaviour of subsequent pages with different scenarios</p>
<table border=0>
<tr><td colspan=3>
<p><u>Scenario 1 - delay loading resources</u></p>
</td></tr>
<tr>
<form action="testCustomBehaviourPage-Scenario-1.html" method="get">
<td> </td><td><label>Image TTFB (wait) delay (ms):</label></td><td><input type="text" id="imageTtfb" name="imageTtfb" value="8000"></td></tr>
<td> </td><td><label>Text content download time (ms):</label></td><td><input type="text" id="textContentDownload" name="textContentDownload" value="3000"></td></tr>
<td> </td><td><label>Number of additional image requests (blueBox.png):</label></td><td><input type="text" id="numAdditionalImageDownloads" name="numAdditionalImageDownloads" value="20"></td></tr>
<td> </td><td colspan=2><input type="submit" value="Run scenario 1"></td>
</form>
</tr>
<tr><td colspan=3> </td></tr>
</table>
<table border=0>
<tr><td colspan=5>
<p><u>Scenario 2 - defined HTTP response codes</u></p>
</td></tr>
<tr>
<form action="testCustomBehaviourPage-Scenario-2.html" method="get">
<td> </td><td><label>HTTP Response:</label></td><td><input type="text" id="httpResponse1Code" name="httpResponse1Code" value="400"></td>
<td>number of them: </td><td><input type="text" id="httpResponse1Number" name="httpResponse1Number" value="0"></td></tr>
<td> </td><td><label>HTTP Response:</label></td><td><input type="text" id="httpResponse2Code" name="httpResponse2Code" value="401"></td>
<td>number of them: </td><td><input type="text" id="httpResponse2Number" name="httpResponse2Number" value="0"></td></tr>
<td> </td><td><label>HTTP Response:</label></td><td><input type="text" id="httpResponse3Code" name="httpResponse3Code" value="404"></td>
<td>number of them: </td><td><input type="text" id="httpResponse3Number" name="httpResponse3Number" value="0"></td></tr>
<td> </td><td><label>HTTP Response:</label></td><td><input type="text" id="httpResponse4Code" name="httpResponse4Code" value="500"></td>
<td>number of them: </td><td><input type="text" id="httpResponse4Number" name="httpResponse4Number" value="0"></td></tr>
<td> </td><td><label>HTTP Response:</label></td><td><input type="text" id="httpResponse5Code" name="httpResponse5Code" value="503"></td>
<td>number of them: </td><td><input type="text" id="httpResponse5Number" name="httpResponse5Number" value="0"></td></tr>
<td> </td><td colspan=3><label>301 redirect requests - recursive depth (or zero for no 301s):</label></td><td><input type="text" id="redirect301Depth" name="redirect301Depth" value="0"></td></tr>
<td> </td><td colspan=3><label>302 redirect requests - recursive depth (or zero for no 302s):</label></td><td><input type="text" id="redirect302Depth" name="redirect302Depth" value="0"></td></tr>
<td> </td><td colspan=2><input type="submit" value="Run scenario 2"></td>
</form>
</tr>
</table>
</body>
</html>