Title: [100861] trunk/Tools
- Revision
- 100861
- Author
- [email protected]
- Date
- 2011-11-19 16:04:53 -0800 (Sat, 19 Nov 2011)
Log Message
Allow json NRWT downloads to be pure json and not jsonp
https://bugs.webkit.org/show_bug.cgi?id=72809
Reviewed by Adam Barth.
I'm moving the server to storing and serving up raw json instead of jsonp.
You can still get the jsonp by passing a "callback" parameter, but there's no
need for run-webkit-tests to get jsonp when all it wants is the raw json.
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
Make the wrapper stripping only happen if the json is actually wrapped.
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (100860 => 100861)
--- trunk/Tools/ChangeLog 2011-11-19 20:51:42 UTC (rev 100860)
+++ trunk/Tools/ChangeLog 2011-11-20 00:04:53 UTC (rev 100861)
@@ -1,3 +1,18 @@
+2011-11-19 Ojan Vafai <[email protected]>
+
+ Allow json NRWT downloads to be pure json and not jsonp
+ https://bugs.webkit.org/show_bug.cgi?id=72809
+
+ Reviewed by Adam Barth.
+
+ I'm moving the server to storing and serving up raw json instead of jsonp.
+ You can still get the jsonp by passing a "callback" parameter, but there's no
+ need for run-webkit-tests to get jsonp when all it wants is the raw json.
+
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+ Make the wrapper stripping only happen if the json is actually wrapped.
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
+
2011-11-18 Daniel Bates <[email protected]>
Add CMake build infrastructure for the BlackBerry port
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py (100860 => 100861)
--- trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py 2011-11-19 20:51:42 UTC (rev 100860)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py 2011-11-20 00:04:53 UTC (rev 100861)
@@ -56,7 +56,9 @@
def strip_json_wrapper(json_content):
- return json_content[len(_JSON_PREFIX):len(json_content) - len(_JSON_SUFFIX)]
+ if has_json_wrapper(json_content):
+ return json_content[len(_JSON_PREFIX):len(json_content) - len(_JSON_SUFFIX)]
+ return json_content
def load_json(filesystem, file_path):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py (100860 => 100861)
--- trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py 2011-11-19 20:51:42 UTC (rev 100860)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py 2011-11-20 00:04:53 UTC (rev 100861)
@@ -58,6 +58,11 @@
self._FAILS_count = 0
self._fixable_count = 0
+ def test_strip_json_wrapper(self):
+ json = "['contents']"
+ self.assertEqual(json_results_generator.strip_json_wrapper(json_results_generator._JSON_PREFIX + json + json_results_generator._JSON_SUFFIX), json)
+ self.assertEqual(json_results_generator.strip_json_wrapper(json), json)
+
def _test_json_generation(self, passed_tests_list, failed_tests_list):
tests_set = set(passed_tests_list) | set(failed_tests_list)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes