Changeset 90416 in webkit
- Timestamp:
- Jul 5, 2011 4:56:41 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90413 r90416 1 2011-07-05 Adam Barth <abarth@webkit.org> 2 3 TestResultServer should support callback parameter for JSON 4 https://bugs.webkit.org/show_bug.cgi?id=63961 5 6 Reviewed by Ojan Vafai. 7 8 This makes using jQuery.ajax so much more pleasant. 9 10 * TestResultServer/handlers/testfilehandler.py: 11 1 12 2011-07-05 Eric Seidel <eric@webkit.org> 2 13 -
trunk/Tools/TestResultServer/handlers/testfilehandler.py
r73409 r90416 28 28 29 29 import logging 30 import re 30 31 import urllib 31 32 … … 46 47 PARAM_INCREMENTAL = "incremental" 47 48 PARAM_TEST_LIST_JSON = "testlistjson" 49 PARAM_CALLBACK = "callback" 48 50 49 51 … … 140 142 dir = self.request.get(PARAM_DIR) 141 143 test_list_json = self.request.get(PARAM_TEST_LIST_JSON) 144 callback_name = self.request.get(PARAM_CALLBACK) 142 145 143 146 logging.debug( … … 156 159 json = self._get_file_content(master, builder, test_type, name) 157 160 161 if callback_name and re.search(r"^[A-Za-z_]+$", callback_name): 162 json = re.sub(r"^[A-Za-z_]+[(]", callback_name + "(", json) 163 158 164 if json: 159 self.response.headers["Content-Type"] = " text/plain; charset=utf-8"165 self.response.headers["Content-Type"] = "application/json" 160 166 self.response.out.write(json) 161 167 else:
Note: See TracChangeset
for help on using the changeset viewer.