Bug 149907

Summary: Add a page that cycles through v2 dashboards
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: WebKit WebsiteAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dewei_zhu, jond, slewis, timothy
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Adds cycler.html cdumez: review+

Description Ryosuke Niwa 2015-10-07 17:24:37 PDT
Add a kioski friendly page that cycles through dashboards.
Comment 1 Ryosuke Niwa 2015-10-07 17:31:16 PDT
Created attachment 262661 [details]
Adds cycler.html
Comment 2 Chris Dumez 2015-10-07 18:47:20 PDT
Comment on attachment 262661 [details]
Adds cycler.html

View in context: https://bugs.webkit.org/attachment.cgi?id=262661&action=review

r=me with nits.

> Websites/perf.webkit.org/public/cycler.html:18
> +    if (request.readyState != 4)

I personally prefer to use the XMLHttpRequest constants instead of hard-coding values like this as I think it is more readable:
if (request.readyState != XMLHttpRequest.DONE)

> Websites/perf.webkit.org/public/cycler.html:38
> +function loadNextURL(i) {

I would have called it loadURLAt(i).

> Websites/perf.webkit.org/public/cycler.html:55
> +    setTimeout(loadNextURL.bind(window, i), 30 * 1000);

I think it would be nice to move this 30 to a global variable with a meaningful name so it can easily be tweaked later if needed.
Comment 3 Ryosuke Niwa 2015-10-07 19:07:09 PDT
Committed r190702: <http://trac.webkit.org/changeset/190702>