include first party info in the HAR

This commit is contained in:
soulgalore 2017-08-04 09:42:17 +02:00
parent 6c88ac8365
commit 286faebd5e
2 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,9 @@
### Fixed
* Show in the CLI that requestheaders, blocking domains and basic auth work in Firefox.
### Added
* Include firstParty info in the HAR
## 5.4.5 2017-08-03
### Fixed
* Upgrading the Docker container to use Chrome stable 60 (instead of beta 60)

View File

@ -84,6 +84,7 @@ module.exports = {
concurrency: 1,
open(context, options) {
this.options = merge({}, defaultConfig, options.browsertime);
this.firstParty = options.firstParty;
this.options.mobile = options.mobile;
this.storageManager = context.storageManager;
this.resultUrls = context.resultUrls;
@ -195,6 +196,11 @@ module.exports = {
const _meta = results.har.log.pages[runIndex]._meta;
_meta.connectivity = this.options.connectivity.profile;
// add the defintion for first party/third party
if (this.firstParty) {
_meta.firstParty = this.firstParty;
}
if (this.resultUrls.hasBaseUrl()) {
const base = this.resultUrls.absoluteSummaryPageUrl(url);
_meta.screenshot = `${base}data/screenshots/${runIndex}.png`;