OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
4 <script src="../network-test.js"></script> | 4 <script src="../network-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function test() | 7 function test() |
8 { | 8 { |
9 function lastRequest() | 9 function lastRequest() |
10 { | 10 { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 var replayedRequest = lastRequest(); | 47 var replayedRequest = lastRequest(); |
48 assertRequestEqual(originalRequest, replayedRequest); | 48 assertRequestEqual(originalRequest, replayedRequest); |
49 callback(); | 49 callback(); |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 | 53 |
54 InspectorTest.runTestSuite([ | 54 InspectorTest.runTestSuite([ |
55 function testGetStaticAsync(next) | 55 function testGetStaticAsync(next) |
56 { | 56 { |
57 testXHRReplay("GET", "resources/empty.html", true, "user", "password
", [["headerName", "headerValueA"]], false, undefined, undefined, next); | 57 testXHRReplay("GET", "resources/empty.html", true, null, null, [["he
aderName", "headerValueA"]], false, undefined, undefined, next); |
58 }, | 58 }, |
59 | 59 |
60 function testGetStaticSync(next) | 60 function testGetStaticSync(next) |
61 { | 61 { |
62 testXHRReplay("GET", "resources/empty.html", false, "user", "passwor
d", [["headerName", "headerValueB"]], false, undefined, undefined, next); | 62 testXHRReplay("GET", "resources/empty.html", false, null, null, [["h
eaderName", "headerValueB"]], false, undefined, undefined, next); |
63 }, | 63 }, |
64 | 64 |
65 function testGetCachedAsync(next) | 65 function testGetCachedAsync(next) |
66 { | 66 { |
67 testXHRReplay("GET", "resources/random-cached.php", true, "user", "p
assword", [["headerName", "headerValueC"]], false, undefined, undefined, next); | 67 testXHRReplay("GET", "resources/random-cached.php", true, null, null
, [["headerName", "headerValueC"]], false, undefined, undefined, next); |
68 }, | 68 }, |
69 | 69 |
70 function testGetCachedSync(next) | 70 function testGetCachedSync(next) |
71 { | 71 { |
72 testXHRReplay("GET", "resources/random-cached.php", false, "user", "
password", [["headerName", "headerValueD"]], false, undefined, undefined, next); | 72 testXHRReplay("GET", "resources/random-cached.php", false, null, nul
l, [["headerName", "headerValueD"]], false, undefined, undefined, next); |
73 }, | 73 }, |
74 | 74 |
75 function testGetRandomAsync(next) | 75 function testGetRandomAsync(next) |
76 { | 76 { |
77 testXHRReplay("GET", "resources/random.php", true, "user", "password
", [["headerName", "headerValueE"]], false, undefined, undefined, next); | 77 testXHRReplay("GET", "resources/random.php", true, null, null, [["he
aderName", "headerValueE"]], false, undefined, undefined, next); |
78 }, | 78 }, |
79 | 79 |
80 function testGetRandomSync(next) | 80 function testGetRandomSync(next) |
81 { | 81 { |
82 testXHRReplay("GET", "resources/random.php", false, "user", "passwor
d", [["headerName", "headerValueF"]], false, undefined, undefined, next); | 82 testXHRReplay("GET", "resources/random.php", false, null, null, [["h
eaderName", "headerValueF"]], false, undefined, undefined, next); |
83 }, | 83 }, |
84 | 84 |
85 function testPostAsync(next) | 85 function testPostAsync(next) |
86 { | 86 { |
87 testXHRReplay("POST", "resources/random.php", true, "user", "passwor
d", [["headerName", "headerValueG"]], false, "payload", undefined, next); | 87 testXHRReplay("POST", "resources/random.php", true, null, null, [["h
eaderName", "headerValueG"]], false, "payload", undefined, next); |
88 }, | 88 }, |
89 | 89 |
90 function testPostSync(next) | 90 function testPostSync(next) |
91 { | 91 { |
92 testXHRReplay("POST", "resources/random.php", false, "user", "passwo
rd", [["headerName", "headerValueH"]], false, "payload", undefined, next); | 92 testXHRReplay("POST", "resources/random.php", false, null, null, [["
headerName", "headerValueH"]], false, "payload", undefined, next); |
93 } | 93 } |
94 ]); | 94 ]); |
95 } | 95 } |
96 </script> | 96 </script> |
97 </head> | 97 </head> |
98 <body onload="runTest()"> | 98 <body onload="runTest()"> |
99 Tests XHR replaying. | 99 Tests XHR replaying. |
100 <a href="https://bugs.webkit.org/show_bug.cgi?id=95187">Bug 95187</a> | 100 <a href="https://bugs.webkit.org/show_bug.cgi?id=95187">Bug 95187</a> |
101 </body> | 101 </body> |
102 </html> | 102 </html> |
OLD | NEW |