"{\"type\":2147483645,\"data\":{\"url\":\"http://www.reddit.com/\",\"documentURL\":\"http://www.reddit.com/\",\"host\":\"www.reddit.com\",\"path\":\"/\",\"lastPathComponent\":\"\",\"requestHeaders\":{\"User-Agent\":\"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.3 (KHTML, like Gecko) Chrome/5.0.356.2 Safari/533.3\"},\"mainResource\":true,\"requestMethod\":\"GET\",\"requestFormData\":\"\",\"didRequestChange\":true,\"cached\":false,\"mimeType\":\"text/html\",\"suggestedFilename\":\"\",\"expectedContentLength\":-1,\"statusCode\":200,\"responseHeaders\":{\"Date\":\"Mon, 22 Mar 2010 20:56:51 GMT\",\"Content-Encoding\":\"gzip\",\"Connection\":\"keep-alive\",\"Content-Length\":\"15021\",\"Server\":\"FriendFeedServer/0.1\",\"Vary\":\"Accept-Encoding\",\"Content-Type\":\"text/html; charset=UTF-8\"},\"didResponseChange\":true,\"type\":0,\"didTypeChange\":true,\"startTime\":6469,\"responseReceivedTime\":7822,\"didTimingChange\":true,\"identifier\":1},\"time\":7822,\"sequence\":2}",
"{\"data\":{\"identifier\":1,\"didFail\":false},\"type\":14,\"time\":262,\"sequence\":3}",
"{\"type\":2147483645,\"data\":{\"resourceSize\":99038,\"didLengthChange\":true,\"failed\":false,\"finished\":true,\"didCompletionChange\":true,\"startTime\":6469,\"responseReceivedTime\":7822,\"endTime\":8224,\"didTimingChange\":true,\"identifier\":1},\"time\":8224,\"sequence\":4}"};
for (int i = 0, n = networkRecords.length; i < n; i++) {
ResourceRecord networkRecord = JSON.parse(networkRecords[i]).cast();
mockDispatcher.onEventRecord(networkRecord);
if (networkRecord.getType() == ResourceResponseEvent.TYPE) {
// We tack a hint on a response event. Note the response event happens
// way in the future.
mockDispatcher.onHint(HintRecord.create("testRuleName",
networkRecord.getTime(), HintRecord.SEVERITY_INFO,
"testDescription3", networkRecord.getSequence()));
}
}
}