Add network throttling and device user agent configs
Fix #5
EDIT:
- :shell: add CLI option
-A(user agent) with argument validation - :shell: add CLI option
-Y(network throttling) with argument validation - fix
user-agentstring override when using-A - :shell: add CLI option
--landscapewhich forces device orientation to landscape - configure
src/profiles/devices.jsbased on Chromium device profile definitions:- https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/devtools/front_end/emulated_devices/module.json
- configured
src/profiles/networks.jsbased on Chromium network speed definitions:- https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js&q=%22Good%203G%22&sq=package:chromium&dr=C&l=50
- :art: general formatting of scripts
- :clipboard: add commentary to script components
Good work! Would you mind removing console.log calls and rebase the branch (right now I can't merge it in due to "This branch has conflicts that must be resolved")?
Also, where does src/profiles/devices.js & src/profiles/networks.js data come from? Thank you.
Alright, finally got the rebase worked out.
Also, the src/profiles data was extrapolated from the latest Chrome throttling and UA device configs in dev tools.
I propose we take list of devices from here. What do you think?
Also, download/upload throttling is calculated differently. See here.
I like that idea. Just added those defs verbatim to src/profiles/devices.js.
I also went ahead and fixed up a few other things and updated the PR description. I think this feature is ready to close now.
Hey man. Unfortunately it looks like this PR will have to wait. My laptop won't turn on :) Will get back to it as soon as I have it fixed.
Hey @shyiko any update on your laptop situation?
@bmcminn I'm getting it back tomorrow morning.