Bug 79018 - perf-o-matic: Extract logic to generate JSON responses as classes to unit test
Summary: perf-o-matic: Extract logic to generate JSON responses as classes to unit test
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on: 78989
Blocks: 77037
  Show dependency treegraph
 
Reported: 2012-02-20 01:21 PST by Ryosuke Niwa
Modified: 2012-02-21 14:26 PST (History)
2 users (show)

See Also:


Attachments
refactoring (47.00 KB, patch)
2012-02-20 22:54 PST, Ryosuke Niwa
abarth: 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 2012-02-20 01:21:25 PST
JSON responses for dashboard, manifest, and runs are generated by handler classes at the moment. This prevents us from unit-testing the code to generate JSON responses since handlers can't be unit-tested. We should extract classes out of these handlers in order to unit-test them.
Comment 1 Ryosuke Niwa 2012-02-20 22:54:35 PST
Created attachment 127923 [details]
refactoring
Comment 2 Ryosuke Niwa 2012-02-21 11:47:36 PST
Comment on attachment 127923 [details]
refactoring

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

> Websites/webkit-perf.appspot.com/controller.py:52
> +        cache_dashboard(ManifestJSONGenerator().to_json())

Oh oops, this needs to be manifest :(
Comment 3 Adam Barth 2012-02-21 12:32:33 PST
Comment on attachment 127923 [details]
refactoring

rs=me
Comment 4 Ryosuke Niwa 2012-02-21 14:26:51 PST
Committed in r108399.