mirror of https://github.com/vitalif/phantomjs
Add missing pageref attribute to HAR and end-time.
http://code.google.com/p/phantomjs/issues/detail?id=733 Squashed commit of the following: commit c6b984442c8631ac13308f5d72fd35973bd964d1 Author: Ilya Grigorik <ilya@igvita.com> Date: Sun Aug 26 12:23:03 2012 -0700 add onLoad to pageTimings commit d2bb53cd7340e920c62bed557bef4e3a1cdc62b2 Author: Ilya Grigorik <ilya@igvita.com> Date: Sun Aug 26 12:01:57 2012 -0700 add mising pageref attr to each entry1.7
parent
11e8bb1fcd
commit
fafa01d6ba
|
@ -58,6 +58,7 @@ createHAR = (address, title, startTime, resources) ->
|
|||
wait: startReply.time - request.time
|
||||
receive: endReply.time - startReply.time
|
||||
ssl: -1
|
||||
pageref: address
|
||||
|
||||
log:
|
||||
version: '1.2'
|
||||
|
@ -69,7 +70,8 @@ createHAR = (address, title, startTime, resources) ->
|
|||
startedDateTime: startTime.toISOString()
|
||||
id: address
|
||||
title: title
|
||||
pageTimings: {}
|
||||
pageTimings:
|
||||
onLoad: page.endTime - page.startTime
|
||||
]
|
||||
entries: entries
|
||||
|
||||
|
@ -102,6 +104,7 @@ else
|
|||
if status isnt 'success'
|
||||
console.log 'FAIL to load the address'
|
||||
else
|
||||
page.endTime = new Date()
|
||||
page.title = page.evaluate ->
|
||||
document.title
|
||||
|
||||
|
|
|
@ -61,7 +61,8 @@ function createHAR(address, title, startTime, resources)
|
|||
wait: startReply.time - request.time,
|
||||
receive: endReply.time - startReply.time,
|
||||
ssl: -1
|
||||
}
|
||||
},
|
||||
pageref: address
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -77,7 +78,9 @@ function createHAR(address, title, startTime, resources)
|
|||
startedDateTime: startTime.toISOString(),
|
||||
id: address,
|
||||
title: title,
|
||||
pageTimings: {}
|
||||
pageTimings: {
|
||||
onLoad: page.endTime - page.startTime
|
||||
}
|
||||
}],
|
||||
entries: entries
|
||||
}
|
||||
|
@ -121,6 +124,7 @@ if (system.args.length === 1) {
|
|||
if (status !== 'success') {
|
||||
console.log('FAIL to load the address');
|
||||
} else {
|
||||
page.endTime = new Date();
|
||||
page.title = page.evaluate(function () {
|
||||
return document.title;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue