I stumbled upon a Chrome OS test case that includes a chromium-browser extension that simulates user browsing. The extension does a 1 hour test split by:
- [First 60% of the test] Browsing: a new website is loaded every minute. The web page loaded is scrolled down one page every second, then scrolled back up one page every second.
- [Next 20%] Email: Gmail is loaded in the foreground tab and audio is streamed from a background tab.
- [Next 10%] Documents: Various Google Docs are loaded.
- [Final 10%] Video: A full screen 480p YouTube Video is played.
Besides the fact that the audio requires flash, everything else worked in the Nexus 7. After a few tweaks to the extension, I had it running on a loop for 24 hours. Also, I changed it so the auto-browsing would start as soon as you launch chromium.
The next thing to do was to write a simple bash script that would launch the browser and log battery life and screen brightness to a file every 15 min. The assumption was that as the system run out of battery it would shutdown, and that last entry in the file would give me the battery life whilst browsing.
- Battery levels can be read from here (thanks ogra!): /sys/class/power_supply/battery/capacity
- Brightness levels can be read from here: /sys/class/backlight/pwm-backlight/brightness
I set it to run overnight at a screen brightness of 99. The good news is that the system suspended rather than just run out of juice at about 4:51 AM (according to the browser history). 3 hours later, I resumed it to find it in a good state.
All and all – the Nexus 7 with Ubuntu was browsing for just over 7 hours (7 hours and 12 minutes), so I am pretty happy with that. Although, for any reliable benchmarking, I would need at least 10 samples of the test run. If you want to check out the test, you can find all the code here: http://bazaar.launchpad.net/~vtuson/+junk/load_test_nexus7/
Here is a graphical representation of the results:
The brightness “auto-dim” was a bit disappointing, not to say erratic, and I have filed a couple of bugs against it.