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

Enable device emulation, network throttling, and disable disk cache. #90

Merged
merged 3 commits into from
Mar 29, 2016

Conversation

paulirish
Copy link
Member

This follows the specs from #33.

Device

  • Nexus 5X screensize, DPR, etc.
  • Nexus 5X UA spoofing
  • Touch events
  • Overlay scrollbars, viewport emulation, etc, etc

Network

  • 150ms latency, 1.6Mbps throughput down, 768Kbps up
  • Cache disabled.

This PR depends on #88, so here's a cleaner diff between the two:
paulirish/lighthouse@paulirish:cri-encapsulate...emulation

Also now that all this works, we can load m.flipkart successfully, so I've switched the default to that. Results are already interesting. :)

}
};

const DEVICE_EMULATION_USERAGENT = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there going to be a good way to keep this in sync with shipping Chrome?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope so, though devtools project hasnt found a good way, yet. :)

For us, we could do something along the lines of pinging the omahaproxy API every week

@paulirish
Copy link
Member Author

review?

@brendankenny
Copy link
Member

you'll have to fix your merge conflicts

@paulirish
Copy link
Member Author

paulirish commented Mar 29, 2016

fixed

emulation.enableNexus5X(this);
emulation.enableNetworkThrottling(this);
emulation.disableCache(this);
this.pendingCommandsComplete().then(_ => resolve());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@paulirish paulirish merged commit d0ed321 into GoogleChrome:master Mar 29, 2016
@paulirish paulirish deleted the emulation branch April 24, 2016 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants