Simplify API of Test model by removing Test.setParentTest
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Mar 2016 22:42:15 +0000 (22:42 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Mar 2016 22:42:15 +0000 (22:42 +0000)
commitb05f5ba665cf4852348913a9cf0cbc72a9c36192
tree3589b58f01e9146252ff039608311773f627a660
parent5cc93e39fa654a7501520409582ed3c7305f1763
Simplify API of Test model by removing Test.setParentTest
https://bugs.webkit.org/show_bug.cgi?id=156055

Reviewed by Joseph Pecoraro.

Removed Test.setParentTest. Keep track of the child-parent relationship using the static map instead.

Now each test only stores parent's id and uses the ID static map in Test.parentTest().

* public/v3/models/manifest.js:
(Manifest._didFetchManifest.buildObjectsFromIdMap): Removed the code to create the map of child-parent
relationship and call setParentTest.
* public/v3/models/test.js:
(Test): Updated a static map by the name of "childTestMap" to store itself. We should probably sort
child tests using some fixed criteria in the future instead of relying on the creation order but
preserve the old code's ordering for now.
(Test.prototype.parentTest): Look up the static map by the parent test's id.
(Test.prototype.onlyContainsSingleMetric):
(Test.prototype.setParentTest): Deleted.
(Test.prototype.childTests): Look up the child test map.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@198923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v3/models/manifest.js
Websites/perf.webkit.org/public/v3/models/test.js