Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: added capability to pass cookies as CLI parameter #9162

Closed
wants to merge 3,181 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3181 commits
Select commit Hold shift + click to select a range
a5a9e5a
renderer: fix PWA badge from disappearing on scroll (#7512)
connorjclark Mar 14, 2019
b4f89ff
clients(devtools): create standalone reportGenerator bundle (#7421)
connorjclark Mar 15, 2019
ff2f8e5
core(image-aspect-ratio): ignore css background images (#7516)
patrickhulce Mar 18, 2019
cbe59b3
fix(uses-http2): ignore requests from service-worker (#7197)
wardpeet Mar 18, 2019
6bbac89
core(logging): don't log when closing already closed page (#7576)
Janpot Mar 19, 2019
270489b
deps(snyk): update snyk snapshot (#7589)
snyk-bot Mar 20, 2019
9c36fcb
report: include utm params in links to docs (#7441)
mattzeunert Mar 20, 2019
2a3dc11
misc: fix typo in comment (#7492)
connorjclark Mar 20, 2019
8135419
core(tap-targets): exclude sticky elements from tap targets audit (#7…
mattzeunert Mar 20, 2019
30f3835
tests(smokehouse): set Content-Type for images served by static-serve…
connorjclark Mar 21, 2019
218b465
core: remove hreflang gatherer (#7477)
patrickhulce Mar 21, 2019
04f1c84
docs: add plugin recipe (#6965)
brendankenny Mar 21, 2019
a41aa5d
misc: fix unit-viewer command for windows (#7624)
patrickhulce Mar 21, 2019
80dd431
core(oopif): attach to all descendants (#7608)
patrickhulce Mar 22, 2019
320c83d
misc: remove obsolete Util.formatDisplayValue (#7628)
brendankenny Mar 22, 2019
77e2a0e
misc(chore): remove old dep postinstall-prepare (#7647)
brendankenny Mar 24, 2019
03bb0ae
core(font-display): ignore data URLs (#7684)
patrickhulce Mar 25, 2019
26b917d
docs(url-shim): add comment about public suffix lst (#7671)
paulirish Mar 25, 2019
b98b585
clients(devtools): add build script for report resources (#7567)
connorjclark Mar 25, 2019
0fa1e04
core(font-display): handle carriage returns (#7712)
patrickhulce Mar 26, 2019
ba1fb57
i18n: add new translations for SEO; updates for a11y and perf (#7720)
exterkamp Mar 27, 2019
34fc6c5
core(main-thread-tasks): use toplevel tasks in main thread audit (#7711)
patrickhulce Mar 27, 2019
eeeb5f4
core(main-thread-tasks): handle last task not finishing (#7728)
patrickhulce Mar 27, 2019
fa1e1c1
misc: drive-by code cleanup in BaseNode (#7723)
brendankenny Mar 28, 2019
8ef1168
misc(gather): update comment re: ClientRect copying (#7785)
paulirish Mar 28, 2019
3bf385d
tests(smoke): remove trivial uses of rawValue from expectations (#7780)
connorjclark Mar 29, 2019
496d5ca
i18n: Hindi for seo and a11y (#7786)
exterkamp Mar 29, 2019
4a0bcf7
core(lhr): truncate measure timings to hundredths (#7748)
connorjclark Mar 29, 2019
7de08fd
core(oopifs): skip OOPIF network records in some gatherers (#7640)
patrickhulce Mar 29, 2019
6dee465
core(main-thread-tasks): improve event-order error messages (#7745)
connorjclark Apr 1, 2019
be78092
misc: simplifications in simulator/connection-pool (#7894)
brendankenny Apr 2, 2019
c7b097e
tests: better fatal trace logic error coverage (#7959)
patrickhulce Apr 4, 2019
6fe0acd
deps(snyk): update snyk snapshot (#7943)
snyk-bot Apr 4, 2019
21f10c6
clients(lr): add custom config support (#7613)
connorjclark Apr 4, 2019
9807f7a
core(artifacts): rename Scripts to ScriptElements artifact (#7920)
patrickhulce Apr 4, 2019
3a814ce
misc: specify types for some dependency-graph options objects (#7962)
brendankenny Apr 5, 2019
22230cc
misc: remove lhr-lite.d.ts (#7991)
brendankenny Apr 5, 2019
ab33b36
i18n: import Hindi corrections (#8070)
exterkamp Apr 8, 2019
2e84237
docs(readme): Foo integration (#8035)
adamhenson Apr 8, 2019
95c3450
tests(smokehouse): set Content-Type for webp images served by static-…
connorjclark Apr 8, 2019
22a213d
core(jsonld): add structured data validation (#6750)
patrickhulce Apr 8, 2019
4e89752
misc: remove unused typedef (#8075)
brendankenny Apr 8, 2019
4fd75d5
clients(lr): gather network timing numbers from headers (#7888)
exterkamp Apr 8, 2019
3749c46
tests(smokehouse): set Content-Type for json served by static-server.…
connorjclark Apr 8, 2019
26d11c7
4.3.0 (#8080)
connorjclark Apr 9, 2019
b93d8f9
core(lantern): improve FCP accuracy by better categorizing cpu tasks …
patrickhulce Apr 9, 2019
53ef8ec
clients(lr): apply Lightrider timings to NetworkRequests (#8109)
exterkamp Apr 10, 2019
d0adbfc
misc: drop support for Node before 10.13 (LTS) (#8117)
brendankenny Apr 10, 2019
ee2f631
docs(readme): remove link to archived lighthouse-security project (#8…
arnabsen Apr 10, 2019
ede6f83
core(dom-size): limit scoring to only DOM nodes in the body (#7241)
midzer Apr 10, 2019
081811c
misc: update collected i18n string (#8158)
brendankenny Apr 10, 2019
638b84e
report: add Stack Packs and first pack for wordpress (#7243)
wardpeet Apr 11, 2019
11d5e74
docs(readme): add mention of free tier of Foo integration (#8160)
adamhenson Apr 11, 2019
65fdf15
tests(smokehouse): support artifacts assertions in smoke tests (#8044)
mattzeunert Apr 11, 2019
59ab4b2
misc: fix bad auto-merge (#8201)
brendankenny Apr 11, 2019
089620d
core(stack-packs): adjustments to comments and types (#8169)
brendankenny Apr 12, 2019
8a83100
misc(ci): build report and deploy to now.sh on every commit (#8194)
paulirish Apr 12, 2019
88036b1
report: extract init() function from report-template (#8228)
paulirish Apr 12, 2019
47cb53a
core: always run axe gatherer last (#8216)
patrickhulce Apr 12, 2019
eb14535
core: add devtoolsNodePath property to ScriptElements artifact (#8133)
mattzeunert Apr 13, 2019
37c7156
report(redesign): new gauges, score scale, category headers, variable…
connorjclark Apr 13, 2019
1c87414
report: add missing </div> (#8240)
muuvmuuv Apr 14, 2019
9f02f99
cli(help): remove screenshots mention from --save-assets (#8263)
csabapalfi Apr 14, 2019
4650e8f
misc: update sample_v2 artifacts (#8243)
brendankenny Apr 14, 2019
aeb8de6
core(jsonld): Structured data validation updates (#8137)
mattzeunert Apr 16, 2019
c83c148
core(seo): support spanish in link-text audit (#7547)
Markel Apr 16, 2019
9459f3e
i18n: extract stack pack strings for translation (#8154)
exterkamp Apr 16, 2019
46cb399
client(lr): build report-generator-bundle (#8197)
exterkamp Apr 16, 2019
435229f
core: rename audit-details diagnostics to debugData (#8298)
patrickhulce Apr 17, 2019
1e7061a
core: require score in audit product; make rawValue numeric only (#8343)
brendankenny Apr 17, 2019
9fd06e3
report(redesign): runtime settings footer (#8229)
connorjclark Apr 17, 2019
812ea38
core(crc): redirects leading to iframe shouldn't be marked as critica…
wardpeet Apr 17, 2019
9eacd78
core(driver): only fail security state if scheme is not cryptographic…
patrickhulce Apr 17, 2019
545ae6f
core: match output of final-screenshot and screenshot-thumbnails (#8299)
patrickhulce Apr 17, 2019
0d73f00
core(a11y): disable unused axe rules (#8373)
paulirish Apr 17, 2019
2eec62c
deps: [email protected] (#8370)
paulirish Apr 17, 2019
a0ee2e5
deps(snyk): update snyk snapshot (#8354)
snyk-bot Apr 17, 2019
38bfb48
report(redesign): fixed mini-topbar, remove scroll animation (#8300)
connorjclark Apr 17, 2019
d8509e0
i18n: update seo group titles and descriptions (#8378)
exterkamp Apr 17, 2019
a35df4e
report(redesign): remove icons in non-pwa group headings (#8329)
connorjclark Apr 17, 2019
1db55f8
core: remove deprecated disableDeviceEmulation flag (#8289)
wardpeet Apr 17, 2019
d10cd91
core(seo): add image-alt to SEO category (#8407)
patrickhulce Apr 18, 2019
14cf295
core(artifacts): create a PublicGathererArtifacts type (#8382)
patrickhulce Apr 18, 2019
930cada
core(driver): enable async stacks (#5504)
patrickhulce Apr 18, 2019
69afce2
clients(lr): increase Page.getAppManifest timeout to 10s (#8350)
connorjclark Apr 18, 2019
5aaa5dc
core: replace rawValue with numericValue in audit result (#8385)
brendankenny Apr 19, 2019
f60b05b
report: add badge to plugin score gauges (#8307)
connorjclark Apr 19, 2019
9ef7a5e
report: refresh of score icons, group headers, colors (#8222)
connorjclark Apr 19, 2019
221761a
cli: document that CSV is output to file (#8520)
brendankenny Apr 22, 2019
220982d
i18n: import stack pack translations (#8415)
exterkamp Apr 22, 2019
90f39a6
report: use border-box for psuedoelements (#8528)
patrickhulce Apr 23, 2019
b4356dc
core: add deprecation message for disable-device-emulation flag (#8334)
wardpeet Apr 23, 2019
82e2957
report(redesign): put gauges in default, pwa, plugins order (#8529)
connorjclark Apr 23, 2019
a56f2f1
report(redesign): changes to whitespace and colors (#8531)
connorjclark Apr 23, 2019
5469e3b
report(redesign): change passing pwa badges to green (#8532)
connorjclark Apr 23, 2019
009a483
misc: add correct listitem.js @fileoverview (#8586)
Meggin Apr 24, 2019
99276f9
cli: always handle chrome connection errors (#8583)
patrickhulce Apr 24, 2019
4beef24
report(redesign): add sticky scores header (#8524)
connorjclark Apr 25, 2019
c559f91
core: reword insecure error message (#8530)
patrickhulce Apr 25, 2019
a17c8e2
report(redesign): score scale tweaks (#8590)
connorjclark Apr 25, 2019
46908ba
misc: add releasing scripts (#8387)
patrickhulce Apr 25, 2019
d66b624
core: replace remaining rawValues with numericValue (#8421)
brendankenny Apr 25, 2019
3038829
clients(devtools): escape assets based on filetype (#8456)
connorjclark Apr 25, 2019
506656d
extension: remove github link in favor of copy to clipboard (#8294)
wardpeet Apr 25, 2019
2a989a7
core(lightwallet): add --budget-path and budget.json parser (#8427)
khempenius Apr 26, 2019
9e81f08
core: fix sample_v2 generation, proto errors (#8605)
brendankenny Apr 26, 2019
1653ebf
misc: simplify LH.Config settings types (#8630)
brendankenny Apr 26, 2019
7e349e8
report(redesign): fix cross-browser positioning of gauges (#8653)
connorjclark Apr 26, 2019
a543a13
core(font-display): do not use invalid sourceURLs (#8535)
patrickhulce Apr 26, 2019
537a1cb
report(redesign): various whitespace adjustments (#8591)
connorjclark Apr 26, 2019
e58c23c
report: augment auditRef, not result, with stackPack ref (#8633)
brendankenny Apr 26, 2019
3c8a910
clients(devtools): remove ascii-encoded asset requirement (#8637)
connorjclark Apr 29, 2019
aaed09d
report(redesign): add dark theme (#8425)
connorjclark Apr 29, 2019
69130e1
core(stackpacks): use icon_data_URL in proto; add to dbw smoke test (…
exterkamp Apr 29, 2019
78452eb
core: support traces missing TracingStartedInBrowser (#7122)
patrickhulce Apr 29, 2019
e24607e
report(redesign): smooth scroll on category gauge click (#8720)
connorjclark Apr 29, 2019
db490bb
i18n: SEO group titles and descriptions (#8719)
exterkamp Apr 29, 2019
b19f568
report(redesign): hide sparkline in mobile (#8562)
connorjclark Apr 29, 2019
a7c03d9
report(redesign): tweak plugin badge placement (#8722)
connorjclark Apr 29, 2019
d262879
report(redesign): remove units from table column headings (#8658)
connorjclark Apr 29, 2019
66c9ba6
report: add table filter for third-party urls (#6351)
wardpeet Apr 30, 2019
6d5e748
report(misc): fix common typos (#8726)
exterkamp Apr 30, 2019
7672626
core(lightwallet): add resource-summary computed artifact (#8709)
khempenius Apr 30, 2019
cc050a0
core: filter blob urls from more audits (#8724)
paulirish Apr 30, 2019
950b34f
tests: add smoketest to capture microtask regression (#8379)
patrickhulce Apr 30, 2019
58cd872
core(lightwallet): stricter verification of budget types (#8727)
brendankenny Apr 30, 2019
d4a2fec
misc: rename release scripts properly (#8751)
patrickhulce Apr 30, 2019
07de3ca
clients(lr): revert Lightrider timings applied to NetworkRequests (#8…
exterkamp Apr 30, 2019
16c3579
report(redesign): add toggle control to show metric descriptions (#8661)
connorjclark May 1, 2019
210b2fa
report(metrics): replace EIL with MP-FID (#8729)
patrickhulce May 1, 2019
16816cc
core(lightwallet): add resource-summary audit (#8522)
khempenius May 1, 2019
061a2da
report: use gray circle icons for informative audits (#8763)
khempenius May 1, 2019
6ffd7ca
core(stack-packs): update fill color of wordpress icon (#8778)
housseindjirdeh May 1, 2019
443b7ac
misc(lightwallet): add budget to sample artifacts config (#8783)
brendankenny May 2, 2019
6eab87b
core(runner): only pass requiredArtifacts to audits (#8760)
patrickhulce May 2, 2019
4a51e38
core(rect-helpers): make getBoundingRect take an array of rects (#8789)
mattzeunert May 2, 2019
5ced3d1
deps: update to [email protected] (#8781)
paulirish May 2, 2019
c197efc
misc: fix roundtrip sample_v2.json (#8815)
paulirish May 2, 2019
8435101
report(redesign): inline display text. bold audit header text (#8592)
connorjclark May 3, 2019
81b0d7c
misc(proto): remove trailing whitespace; add contributing help (#8818)
brendankenny May 3, 2019
a3867cc
misc: expand FID -> First Input Delay (#8817)
paulirish May 3, 2019
b39940b
report(redesign): fireworks (#8660)
connorjclark May 3, 2019
4700011
clients(psi): pass score scale element to psi (#8827)
exterkamp May 3, 2019
6aa7e91
core(a11y): update scoring weights based on severity (#8823)
robdodson May 3, 2019
2225c7e
report: improve text wrapping (#8820)
paulirish May 3, 2019
3c7788c
report: make v5 renderer compatible with v3 and v4 LHRs (#8822)
brendankenny May 3, 2019
44465ff
docs: add plugin guide (#8728)
patrickhulce May 3, 2019
f7fef7b
tests: make update:sample-artifacts work for a single artifact type (…
mattzeunert May 3, 2019
237589f
core(lightwallet): add performance-budget audit (#8539)
khempenius May 4, 2019
23a31df
tests(smokehouse): change metric assertions from score to numericVal…
patrickhulce May 4, 2019
baccf98
misc(proto): assert libprotoc version (#8863)
connorjclark May 5, 2019
ce1e89c
docs: update throttling (#8854)
paulirish May 5, 2019
bd21068
report(redesign): make dark mode details less intense (#8845)
exterkamp May 5, 2019
76576be
misc(proto): require protobuf 3.7.1, add stricter audit details test …
brendankenny May 5, 2019
8ddae9e
tests: add tap targets to dobetterweb sample page (#8803)
mattzeunert May 6, 2019
541e88e
report: metric toggle without JS (#8844)
paulirish May 6, 2019
fd9cc91
tests(lightwallet): add perf-budget smoke test (#8853)
brendankenny May 6, 2019
b5f1fdd
tests(lightwallet): add budget to golden LHR (#8870)
brendankenny May 6, 2019
f3e939e
report(pwa): properly hide n/a gauge when it's n/a (#8872)
exterkamp May 6, 2019
aa044de
report(redesign): toggle dark theme in menu (#8843)
connorjclark May 6, 2019
c469365
report(redesign): design review feedback (#8785)
connorjclark May 6, 2019
014ab71
docs: update budget link (#8871)
paulirish May 6, 2019
43b041b
report(redesign): don't init sticky header features for single catego…
connorjclark May 6, 2019
573f3c0
i18n: import tamil translated strings (#8886)
exterkamp May 6, 2019
66bcff7
new_audit: add apple-touch-icon PWA audit (#8857)
exterkamp May 7, 2019
43de4d1
report(lightwallet): render the performance-budget audit (#8708)
khempenius May 7, 2019
818be74
report(redesign): metrics padding, font weights (#8891)
exterkamp May 7, 2019
7da6964
report(redesign): respect prefers-color-scheme (#8842)
connorjclark May 7, 2019
6ebf28e
report(redesign): three dots for export button (#8629)
connorjclark May 7, 2019
2b845fc
tests: fix smoke tests from sharing artifacts (#8897)
paulirish May 7, 2019
0d21378
5.0.0 (#8898)
brendankenny May 7, 2019
784220e
docs(plugins): rename Google AdSpeed Insights to Publisher Ads Audit …
thebengeu May 9, 2019
86c396d
core(performance-budget): add MP-FID as budget metric (#8905)
brendankenny May 16, 2019
9b32d9a
core(budget): throw error on duplicate budget types (#8915)
brendankenny May 16, 2019
a250358
report(redesign): move gauge styles to main stylesheet (#8893)
connorjclark May 17, 2019
1a1f386
report: hide 3rd party filter checkbox if all rows are 3rd party (#8966)
jburger424 May 17, 2019
fe4cca1
docs(readme): add performance-budgets to related projects (#8971)
May 18, 2019
adb62ef
tests: remove compile-devtools on travis (#8988)
brendankenny May 18, 2019
7832c79
clients(devtools): update version in tests on lh roll (#8819)
connorjclark May 20, 2019
a3c90b8
misc: update minify-trace scripts; extract to lib/ (#8968)
patrickhulce May 20, 2019
d441e99
core(report): show nodeLabel for DOM nodes in addition to snippet (#8…
mattzeunert May 20, 2019
1a95eaf
misc: remove unneeded reportCategories from LH.ReportResult (#9001)
brendankenny May 20, 2019
a5c40da
core: refactor gather-runner control flow (#8964)
brendankenny May 21, 2019
f4b005a
i18n: minor fr and ta translation updates (#8999)
exterkamp May 21, 2019
34dabc0
misc(assets): remove outdated extension screenshots (#9015)
brendankenny May 21, 2019
50ac601
misc: dot-js require() everywhere (#9006)
patrickhulce May 22, 2019
3f5e854
clients(lr): insert assets in lhr for logging purposes (#9002)
connorjclark May 22, 2019
66b0df5
cli(flags): accept comma-separated array values (#8933)
connorjclark May 22, 2019
738cb45
core(logging): change log messages for gathering and trace retrieval …
connorjclark May 23, 2019
4740c22
core(image-elements): drop spritesheet logic (#8940)
patrickhulce May 23, 2019
e7af532
renderer: fix word breaking of display text, move metric disclaimer (…
connorjclark May 23, 2019
ebdec26
report(redesign): two rows for filmstrip on mobile (#8563)
connorjclark May 23, 2019
058188f
tests(lint): require file extension in require() (#9017)
brendankenny May 23, 2019
ffff471
docs(readme): add lighthouse-plugin-field-performance to plugins (#9049)
alekseykulikov May 24, 2019
b655d97
tests: update a11y sample artifacts (#9010)
mattzeunert May 24, 2019
95d54c8
docs(plugins): add link to field-performance plugin (#9051)
paulirish May 24, 2019
f3f1bad
core(tap-targets): don't exclude visible position absolute elements f…
mattzeunert May 25, 2019
84044bc
core(config): split out config helpers (#9003)
patrickhulce May 25, 2019
b3b17e1
core(gather-runner): always reset scroll position (#8625)
patrickhulce May 25, 2019
12681cb
misc(fix master): tmp revert of scroll change in #8625 (#9059)
brendankenny May 25, 2019
2c55442
report: make gauge font size and positioning dynamic (#9057)
paulirish May 28, 2019
b09f17a
tests(smoke): re-enable dialog prompt (#8894)
connorjclark May 28, 2019
772a87d
core(perf): speed up getNodePath (#9055)
paulirish May 28, 2019
f89b8f1
core(runner): fix missing timing properties in the browser (#9072)
exterkamp May 28, 2019
082330c
core(gather-runner): treat NO_FCP as a pageLoadError (#8340)
patrickhulce May 28, 2019
90124f1
report: show fireworks only if all core categories score 100 (#9073)
connorjclark May 30, 2019
8a65cf7
report: show metric descriptions by default when errors exist (#9054)
connorjclark May 30, 2019
d6d6055
devtools: enable sticky header, top bar, and report ui features (#9023)
connorjclark May 30, 2019
38e95f0
clients(devtools): ignore dark mode media query (#9082)
connorjclark May 30, 2019
f76b4ba
devtools: move topbar out of scrollable container (#9077)
connorjclark May 30, 2019
06b84d2
5.1.0 (#9086)
connorjclark May 31, 2019
dcef53b
misc: release script should commit with format vX.Y.Z (#9090)
connorjclark May 31, 2019
038f028
deps: update bundlesize, add more budgets (#9089)
brendankenny May 31, 2019
46a2b21
core(manifest-parser): handle blob manifests (#9088)
patrickhulce Jun 1, 2019
2646ac2
devtools: rename audits2 to audits (#8985)
connorjclark Jun 3, 2019
df390d3
docs(readme): Add gimbal integration (#9083)
mitchellsimoens Jun 3, 2019
bfc7dab
core(driver): security errors are no longer a fatal or pageload error…
paulirish Jun 3, 2019
9b8a5db
docs(readme): alphabetize related projects (#9110)
patrickhulce Jun 4, 2019
dbd7841
docs: add instructions for testing with self-signed certificate (#9112)
brendankenny Jun 4, 2019
de10fe7
core(cli): accept flags from path (#9109)
patrickhulce Jun 4, 2019
0c70c4e
misc: address release script feedback (#9111)
patrickhulce Jun 4, 2019
69b9788
new_audit: add cumulative-long-queuing-delay to JSON (#8975)
deepanjanroy Jun 5, 2019
ff14582
core(perf): speed up tap-target's isVisible() (#9056)
paulirish Jun 5, 2019
292172c
core(tracehouse): move files to lib/tracehouse/
patrickhulce May 14, 2019
a937f33
core(tracehouse): modify files for move to tracehouse
patrickhulce May 31, 2019
02d614a
misc: update broken tracing-processor require (#9123)
patrickhulce Jun 5, 2019
61ccfda
core(gather-runner): convert PAGE_HUNG to non-fatal runtimeError (#9121)
patrickhulce Jun 5, 2019
cfd03c8
deps: bump transitive dep js-yaml (#9131)
brendankenny Jun 6, 2019
27d28bf
tests(smokehouse): always assert lhr.runtimeError (#9130)
brendankenny Jun 6, 2019
7d1191e
core(tracehouse): rename trace-of-tab
patrickhulce Jun 5, 2019
8d30f61
core(tracehouse): merge tracing-processor with trace-of-tab
patrickhulce Jun 6, 2019
904c960
core(gather-runner): always reset scroll position (#9060)
patrickhulce Jun 7, 2019
25de859
core(page-functions): don't try to clone a ShadowRoot (#9079)
NickolasBenakis Jun 7, 2019
841f9c9
report: remove unused css vars (#9144)
connorjclark Jun 7, 2019
bc56a33
i18n: localize column headers of budget audits (#9127)
exterkamp Jun 7, 2019
5c1ada6
report: rename exports to tools (#9135)
connorjclark Jun 8, 2019
0480a6f
Initial implementation
RynatSibahatau Jun 9, 2019
5a8b8ce
Initial implementation
Jun 9, 2019
cb99992
Fix issues and improve tests coverage
RynatSibahatau Jun 10, 2019
b712566
Fix issues and improve tests coverage
Jun 10, 2019
42b8f76
Fix build issues
RynatSibahatau Jun 10, 2019
2e299db
Fix build issues
Jun 10, 2019
4af94d5
Fix build issues
RynatSibahatau Jun 10, 2019
8e80140
Fix build issues
Jun 10, 2019
8220c9e
Fix build issues
RynatSibahatau Jun 10, 2019
14b70fc
Fix build issues
Jun 10, 2019
affd634
Fix build issues
RynatSibahatau Jun 10, 2019
6a9a75a
Fix build issues
Jun 10, 2019
6ffd605
Fix build issues
RynatSibahatau Jun 10, 2019
87feaaa
Fix build issues
RynatSibahatau Jun 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lighthouse-cli/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@ async function begin() {
cliFlags.extraHeaders = JSON.parse(extraHeadersStr);
}

if (cliFlags.extraCookies) {
// TODO: LH.Flags.extraCookies is actually a string at this point, but needs to be
// copied over to LH.Settings.extraCookies, which is LH.Crdp.Network.Cookies. Force
// the conversion here, but long term either the CLI flag or the setting should have
// a different name.
// @ts-ignore
let extraCookiesStr = /** @type {string} */ (cliFlags.extraCookies);
// If not a JSON array, assume it's a path to a JSON file.
if (extraCookiesStr.substr(0, 1) !== '[') {
extraCookiesStr = fs.readFileSync(extraCookiesStr, 'utf-8');
}

cliFlags.extraCookies = JSON.parse(extraCookiesStr);
}

if (cliFlags.precomputedLanternDataPath) {
const lanternDataStr = fs.readFileSync(cliFlags.precomputedLanternDataPath, 'utf8');
/** @type {LH.PrecomputedLanternData} */
Expand Down
10 changes: 9 additions & 1 deletion lighthouse-cli/cli-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ function getFlags(manualArgv) {
'lighthouse <url> --quiet --chrome-flags="--headless"',
'Launch Headless Chrome, turn off logging')
.example(
'lighthouse <url> --extra-headers "{\\"Cookie\\":\\"monster=blue\\", \\"x-men\\":\\"wolverine\\"}"',
'lighthouse <url> --extra-headers "{\\"x-men\\":\\"wolverine\\"}"',
'Stringify\'d JSON HTTP Header key/value pairs to send in requests')
.example(
'lighthouse <url> --extra-headers=./path/to/file.json',
'Path to JSON file of HTTP Header key/value pairs to send in requests')
.example(
'lighthouse <url> --extra-cookies "[{\\"name\\":\\"session_id\\",\\"value\\":\\"x-men\\" }]"',
'Stringify\'d JSON array of HTTP Cookies to send in requests')
.example(
'lighthouse <url> --extra-cookies=./path/to/file.json',
'Path to JSON file of HTTP Cookies to send in requests')
.example(
'lighthouse <url> --only-categories=performance,pwa',
'Only run specific categories.')
Expand Down Expand Up @@ -126,6 +132,7 @@ function getFlags(manualArgv) {
'max-wait-for-load':
'The timeout (in milliseconds) to wait before the page is considered done loading and the run should continue. WARNING: Very high values can lead to large traces and instability',
'extra-headers': 'Set extra HTTP Headers to pass with request',
'extra-cookies': 'Set extra HTTP Cookies to pass with request',
'precomputed-lantern-data-path': 'Path to the file where lantern simulation data should be read from, overwriting the lantern observed estimates for RTT and server latency.',
'lantern-data-output-path': 'Path to the file where lantern simulation data should be written to, can be used in a future run with the `precomputed-lantern-data-path` flag.',
'only-audits': 'Only run the specified audits',
Expand Down Expand Up @@ -166,6 +173,7 @@ function getFlags(manualArgv) {
.array('output')
.array('plugins')
.string('extraHeaders')
.string('extraCookies')
.string('channel')
.string('precomputedLanternDataPath')
.string('lanternDataOutputPath')
Expand Down
1 change: 1 addition & 0 deletions lighthouse-cli/test/cli/__snapshots__/index-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,7 @@ Object {
"channel": "cli",
"disableStorageReset": false,
"emulatedFormFactor": "mobile",
"extraCookies": null,
"extraHeaders": null,
"gatherMode": false,
"locale": "en-US",
Expand Down
20 changes: 20 additions & 0 deletions lighthouse-cli/test/cli/bin-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,26 @@ describe('CLI bin', function() {
});
});

describe('extraCookies', () => {
it('should convert extra cookies to object', async () => {
// @ts-ignore - see TODO: in bin.js
cliFlags = {...cliFlags, extraCookies: '[{"name":"foo", "value": "bar", "url": "http://localhost"}]'};
await bin.begin();

expect(getRunLighthouseArgs()[1]).toHaveProperty('extraCookies', [{'name': 'foo', 'value': 'bar', 'url': 'http://localhost'}]);
});

it('should read extra cookies from file', async () => {
const headersFile = require.resolve('../fixtures/extra-headers/valid.json');
// @ts-ignore - see TODO: in bin.js
cliFlags = {...cliFlags, extraCookies: headersFile};
await bin.begin();

expect(getRunLighthouseArgs()[1]).toHaveProperty('extraCookies', require(headersFile));
});
});


describe('precomputedLanternData', () => {
it('should read lantern data from file', async () => {
const lanternDataFile = require.resolve('../fixtures/lantern-data.json');
Expand Down
9 changes: 9 additions & 0 deletions lighthouse-cli/test/cli/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ describe('CLI Tests', function() {
assert.equal(ret.status, 1);
});

it('should exit with a error if the file does not contain valid JSON', () => {
const ret = spawnSync('node', [indexPath, 'https://www.google.com',
'--extra-cookies',
path.resolve(__dirname, '../fixtures/extra-cookies/invalid.txt')], {encoding: 'utf8'});

assert.ok(ret.stderr.includes('Unexpected token'));
assert.equal(ret.status, 1);
});

it('should exit with a error if the passsed in string is not valid JSON', () => {
const ret = spawnSync('node', [indexPath, 'https://www.google.com',
'--extra-headers', '{notjson}'], {encoding: 'utf8'});
Expand Down
1 change: 1 addition & 0 deletions lighthouse-cli/test/fixtures/extra-cookies/invalid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NotJSON
7 changes: 7 additions & 0 deletions lighthouse-cli/test/fixtures/extra-cookies/valid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"name":"test",
"value":"true",
"url":"http://localhost"
}
]
14 changes: 14 additions & 0 deletions lighthouse-cli/test/fixtures/static-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ function requestHandler(request, response) {
}
}

if (params.has('extra_cookie')) {
const extraCookies = new URLSearchParams(params.get('extra_cookie'));
let cookeString = '';
for (const [cookieName, cookieValue] of extraCookies) {
cookeString += cookieName + '=' + cookieValue + ';';
}

// Extra cookie we allways override possible 'Set-Cookie' header
// which may be already present in request by extra_header
headers['Set-Cookie'] = [];
headers['Set-Cookie'].push(cookeString);
}


if (params.has('gzip')) {
useGzip = Boolean(params.get('gzip'));
}
Expand Down
1 change: 1 addition & 0 deletions lighthouse-core/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const defaultSettings = {
locale: 'en-US', // actual default determined by Config using lib/i18n
blockedUrlPatterns: null,
additionalTraceCategories: null,
extraCookies: null,
extraHeaders: null,
precomputedLanternData: null,
onlyAudits: null,
Expand Down
13 changes: 13 additions & 0 deletions lighthouse-core/gather/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,19 @@ class Driver {
return this.sendCommand('Network.setExtraHTTPHeaders', {headers});
}

/**
* @param {LH.Crdp.Network.Cookies|null} cookies key/value pairs of HTTP Cookies.
* @return {Promise<void>}
*/
async setCookies(cookies) {
if (!cookies) {
return;
}

return this.sendCommand('Network.setCookies', {cookies});
}


/**
* @param {string} url
* @return {Promise<void>}
Expand Down
1 change: 1 addition & 0 deletions lighthouse-core/gather/gather-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class GatherRunner {
// neccessary at the beginning of the next pass.
await passContext.driver.blockUrlPatterns(blockedUrls);
await passContext.driver.setExtraHTTPHeaders(passContext.settings.extraHeaders);
await passContext.driver.setCookies(passContext.settings.extraCookies);

log.timeEnd(status);
}
Expand Down
29 changes: 28 additions & 1 deletion lighthouse-core/test/gather/driver-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,41 @@ describe('.setExtraHTTPHeaders', () => {
);
});

it('should Network.setExtraHTTPHeaders when there are extra-headers', async () => {
it('should not Network.setExtraHTTPHeaders when there are extra-headers', async () => {
connectionStub.sendCommand = createMockSendCommandFn();
await driver.setExtraHTTPHeaders();

expect(connectionStub.sendCommand).not.toHaveBeenCalled();
});
});

describe('.setCookies', () => {
it('should call Network.setCookies when there are extra-cookies', async () => {
connectionStub.sendCommand = createMockSendCommandFn().mockResponse(
'Network.setCookies',
{}
);

await driver.setCookies([{
'name': 'cookie1',
'value': 'monster',
}]);

expect(connectionStub.sendCommand).toHaveBeenCalledWith(
'Network.setCookies',
expect.anything()
);
});

it('should not call Network.setCookies when there are extra-headers', async () => {
connectionStub.sendCommand = createMockSendCommandFn();
await driver.setCookies();

expect(connectionStub.sendCommand).not.toHaveBeenCalled();
});
});


describe('.getAppManifest', () => {
it('should return null when no manifest', async () => {
connectionStub.sendCommand = createMockSendCommandFn().mockResponse(
Expand Down
3 changes: 3 additions & 0 deletions lighthouse-core/test/gather/fake-driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ function makeFakeDriver({protocolGetVersionResponse}) {
setExtraHTTPHeaders() {
return Promise.resolve();
},
setCookies() {
return Promise.resolve();
},
};
}

Expand Down
28 changes: 27 additions & 1 deletion lighthouse-core/test/gather/gather-runner-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const fakeDriver = require('./fake-driver.js');
const fakeDriverUsingRealMobileDevice = fakeDriver.fakeDriverUsingRealMobileDevice;

function getMockedEmulationDriver(emulationFn, netThrottleFn, cpuThrottleFn,
blockUrlFn, extraHeadersFn) {
blockUrlFn, extraHeadersFn, extraCookiesFn) {
const Driver = require('../../gather/driver.js');
const Connection = require('../../gather/connections/connection.js');
const EmulationDriver = class extends Driver {
Expand Down Expand Up @@ -81,6 +81,9 @@ function getMockedEmulationDriver(emulationFn, netThrottleFn, cpuThrottleFn,
case 'Network.setExtraHTTPHeaders':
fn = extraHeadersFn;
break;
case 'Network.setCookies':
fn = extraCookiesFn;
break;
default:
fn = null;
break;
Expand Down Expand Up @@ -393,6 +396,7 @@ describe('GatherRunner', function() {
setThrottling: asyncFunc,
blockUrlPatterns: asyncFunc,
setExtraHTTPHeaders: asyncFunc,
setCookies: asyncFunc,
endTrace: asyncFunc,
endDevtoolsLog: () => [],
getBrowserVersion: async () => ({userAgent: ''}),
Expand Down Expand Up @@ -578,6 +582,28 @@ describe('GatherRunner', function() {
));
});

it('tells the driver to set additional cookies when extraCookies flag is given', () => {
let receivedCookies = null;
const driver = getMockedEmulationDriver(null, null, null, null, null, params => {
receivedCookies = params.cookies;
});
const cookies = [{
'name': 'cookie1',
'value': 'monster',
}];

return GatherRunner.setupPassNetwork({
driver,
settings: {
extraCookies: cookies,
},
passConfig: {gatherers: []},
}).then(() => assert.deepStrictEqual(
receivedCookies,
cookies
));
});

it('tells the driver to begin tracing', async () => {
let calledTrace = false;
const driver = {
Expand Down
1 change: 1 addition & 0 deletions lighthouse-core/test/results/artifacts/artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"blockedUrlPatterns": null,
"additionalTraceCategories": null,
"extraHeaders": null,
"extraCookies": null,
"precomputedLanternData": null,
"onlyAudits": null,
"onlyCategories": null,
Expand Down
1 change: 1 addition & 0 deletions lighthouse-core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3327,6 +3327,7 @@
"blockedUrlPatterns": null,
"additionalTraceCategories": null,
"extraHeaders": null,
"extraCookies": null,
"precomputedLanternData": null,
"onlyAudits": null,
"onlyCategories": null,
Expand Down
22 changes: 12 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,20 @@ Options:
--throttling.uploadThroughputKbps Controls emulated network upload throughput
--throttling.cpuSlowdownMultiplier Controls simulated + emulated CPU throttling
--extra-headers Set extra HTTP Headers to pass with request [string]
--extra-cookies Set extra HTTP Cookies to pass with request [string]

Examples:
lighthouse <url> --view Opens the HTML report in a browser after the run completes
lighthouse <url> --config-path=./myconfig.js Runs Lighthouse with your own configuration: custom audits, report
generation, etc.
lighthouse <url> --output=json --output-path=./report.json --save-assets Save trace, devtoolslog, and named JSON report.
lighthouse <url> --emulated-form-factor=none Disable device emulation and all throttling.
--throttling-method=provided
lighthouse <url> --chrome-flags="--window-size=412,660" Launch Chrome with a specific window size
lighthouse <url> --quiet --chrome-flags="--headless" Launch Headless Chrome, turn off logging
lighthouse <url> --extra-headers "{\"Cookie\":\"monster=blue\"}" Stringify\'d JSON HTTP Header key/value pairs to send in requests
lighthouse <url> --extra-headers=./path/to/file.json Path to JSON file of HTTP Header key/value pairs to send in requests
lighthouse <url> --view Opens the HTML report in a browser after the run completes
lighthouse <url> --config-path=./myconfig.js Runs Lighthouse with your own configuration: custom audits, report generation, etc.
lighthouse <url> --output=json --output-path=./report.json --save-assets Save trace, screenshots, and named JSON report.
lighthouse <url> --emulated-form-factor=none --throttling-method=provided Disable device emulation and all throttling
lighthouse <url> --chrome-flags="--window-size=412,660" Launch Chrome with a specific window size
lighthouse <url> --quiet --chrome-flags="--headless" Launch Headless Chrome, turn off logging
lighthouse <url> --extra-headers "{\"x-men\":\"wolverine\"}" Stringify'd JSON HTTP Header key/value pairs to send in requests
lighthouse <url> --extra-headers=./path/to/file.json Path to JSON file of HTTP Header key/value pairs to send in requests
lighthouse <url> --extra-cookies "[{\"name\":\"session_id\",\"value\":\"x-men\" }]" Stringify'd JSON array of HTTP Cookies to send in requests
lighthouse <url> --extra-cookies=./path/to/file.json Path to JSON file of HTTP Cookies to send in requests
lighthouse <url> --only-categories=performance,pwa Only run specific categories.

For more information on Lighthouse, see https://developers.google.com/web/tools/lighthouse/.
```
Expand Down