(method, path, data, headers)
| 65 | } |
| 66 | |
| 67 | function expectRequest(method, path, data, headers) { |
| 68 | var description = method + ' ' + path + '\n' + headersToString(headers) + |
| 69 | '\n' + JSON.stringify(data); |
| 70 | |
| 71 | return mockClient.send(new goog.testing.mockmatchers.ArgumentMatcher( |
| 72 | function(request) { |
| 73 | assertEquals('wrong method', method, request.method); |
| 74 | assertEquals('wrong path', path + '', request.path); |
| 75 | webdriver.test.testutil.assertObjectEquals(data, request.data); |
| 76 | assertNull( |
| 77 | 'Wrong headers for request:\n' + description + |
| 78 | '\n Actual headers were:\n' + headersToString(request.headers), |
| 79 | goog.testing.asserts.findDifferences(headers, request.headers)); |
| 80 | return true; |
| 81 | }, description)); |
| 82 | } |
| 83 | |
| 84 | function response(status, headers, body) { |
| 85 | return new webdriver.http.Response(status, headers, body); |
no test coverage detected