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)
commitd5fc695ce210afdc8f6f5a39e108bcb0c1485b3d
tree3589b58f01e9146252ff039608311773f627a660
parent5039abb0782ae0d188fd7e89837125a1fdc6a479
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: https://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