Commit 89e2b85c 89e2b85c6b7f412bf03a55f390a1dbf448bc3d58 by Chris Bosco

Request: Fix userAgent tests

refs #401
1 parent 11a7feb8
......@@ -2175,7 +2175,7 @@ function createPage(casper) {
casper.handleReceivedResource(resource);
};
page.onResourceRequested = function onResourceRequested(requestData, request) {
casper.emit('resource.requested', request);
casper.emit('resource.requested', requestData, request);
if (request.url === casper.requestUrl) {
casper.emit('page.resource.requested', request);
}
......
......@@ -6,8 +6,8 @@ function testUA(ua, match) {
);
}
function fetchUA(request) {
var headers = request.headers.filter(function(header) {
function fetchUA(requestData, request) {
var headers = requestData.headers.filter(function(header) {
return header.name === "User-Agent";
});
casper.test.assert(headers.length > 0);
......