Bug 155863 - Migrate admin-regenerate-manifest.js to mocha.js and test v3 UI code
Summary: Migrate admin-regenerate-manifest.js to mocha.js and test v3 UI code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Perf Dashboard (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-24 19:19 PDT by Ryosuke Niwa
Modified: 2016-03-25 14:55 PDT (History)
5 users (show)

See Also:


Attachments
Migrates the test (38.88 KB, patch)
2016-03-24 19:36 PDT, Ryosuke Niwa
joepeck: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2016-03-24 19:19:28 PDT
Migrate legacy tests/admin-regenerate-manifest.js to mocha.js,
and test v3 UI code in addition to the server backend.
Comment 1 Ryosuke Niwa 2016-03-24 19:36:24 PDT
Created attachment 274874 [details]
Migrates the test
Comment 2 Joseph Pecoraro 2016-03-24 21:20:11 PDT
Comment on attachment 274874 [details]
Migrates the test

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

> Websites/perf.webkit.org/public/v3/models/manifest.js:58
> +        }

Nit: Semicolon.

> Websites/perf.webkit.org/public/v3/models/platform.js:20
> +                for (var currentTest = metric.test(); currentTest; currentTest = test.parentTest()) {

This seems super sketchy. The iteration portion of the for loop is always setting the same value... and we just break because we run the loop twice with the same value. Should the iteration portion be "currentTest = currentTest.parentTest()" or could this be written in a clearer way?
Comment 3 Ryosuke Niwa 2016-03-24 21:43:08 PDT
Comment on attachment 274874 [details]
Migrates the test

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

>> Websites/perf.webkit.org/public/v3/models/platform.js:20
>> +                for (var currentTest = metric.test(); currentTest; currentTest = test.parentTest()) {
> 
> This seems super sketchy. The iteration portion of the for loop is always setting the same value... and we just break because we run the loop twice with the same value. Should the iteration portion be "currentTest = currentTest.parentTest()" or could this be written in a clearer way?

Yup, it's supposed to be "currentTest = currentTest.parentTest()."
Will fix and a test case before landing it.
Comment 4 Ryosuke Niwa 2016-03-25 14:55:32 PDT
Committed r198691: <http://trac.webkit.org/changeset/198691>