Title: [126792] trunk/Tools
Revision
126792
Author
[email protected]
Date
2012-08-27 13:59:06 -0700 (Mon, 27 Aug 2012)

Log Message

[webkit-patch] Don't crash chrome-channels command when a previously unknown platform shows up.
https://bugs.webkit.org/show_bug.cgi?id=95104

Reviewed by Adam Barth.

Today I found out this command was broken by the new iOS platform showing up on omahaproxy. Now the webkit-patch chrome-channels command gracefully handles new, previously unknown platforms. Also, it prints iOS in the proper mixed case.

* Scripts/webkitpy/common/net/omahaproxy.py:
(OmahaProxy):
(OmahaProxy.get_revisions):
* Scripts/webkitpy/common/net/omahaproxy_unittest.py:
(OmahaProxyTest):
(OmahaProxyTest.test_get_revisions):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (126791 => 126792)


--- trunk/Tools/ChangeLog	2012-08-27 20:48:57 UTC (rev 126791)
+++ trunk/Tools/ChangeLog	2012-08-27 20:59:06 UTC (rev 126792)
@@ -1,3 +1,19 @@
+2012-08-27  Gavin Peters  <[email protected]>
+
+        [webkit-patch] Don't crash chrome-channels command when a previously unknown platform shows up.
+        https://bugs.webkit.org/show_bug.cgi?id=95104
+
+        Reviewed by Adam Barth.
+
+        Today I found out this command was broken by the new iOS platform showing up on omahaproxy. Now the webkit-patch chrome-channels command gracefully handles new, previously unknown platforms. Also, it prints iOS in the proper mixed case.
+
+        * Scripts/webkitpy/common/net/omahaproxy.py:
+        (OmahaProxy):
+        (OmahaProxy.get_revisions):
+        * Scripts/webkitpy/common/net/omahaproxy_unittest.py:
+        (OmahaProxyTest):
+        (OmahaProxyTest.test_get_revisions):
+
 2012-08-27  Sudarsana Nagineni  <[email protected]>
 
         [EFL][WK2] Free Url_Bar on program exit

Modified: trunk/Tools/Scripts/webkitpy/common/net/omahaproxy.py (126791 => 126792)


--- trunk/Tools/Scripts/webkitpy/common/net/omahaproxy.py	2012-08-27 20:48:57 UTC (rev 126791)
+++ trunk/Tools/Scripts/webkitpy/common/net/omahaproxy.py	2012-08-27 20:59:06 UTC (rev 126792)
@@ -43,7 +43,8 @@
                         "win": "Windows",
                         "mac": "Mac",
                         "cros": "Chrome OS",
-                        "cf": "Chrome Frame"}
+                        "cf": "Chrome Frame",
+                        "ios": "iOS"}
     chrome_channels = ["canary", "dev", "beta", "stable"]
 
     def __init__(self, url="" browser=None):
@@ -70,7 +71,7 @@
                     row = {
                         "commit": int(version["base_webkit_revision"]),
                         "channel": version["channel"],
-                        "platform": self.chrome_platforms[platform["os"]],
+                        "platform": self.chrome_platforms.get(platform["os"], platform["os"]),
                         "date": version["date"],
                     }
                     assert(version["channel"] in self._chrome_channels)

Modified: trunk/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py (126791 => 126792)


--- trunk/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py	2012-08-27 20:48:57 UTC (rev 126791)
+++ trunk/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py	2012-08-27 20:59:06 UTC (rev 126792)
@@ -100,19 +100,33 @@
                  "prev_date": "04\/25\/12",
                  "true_branch": "1084",
                  "channel": "release",
-                 "branch_revision": 134854}]}]"""
+                 "branch_revision": 134854}]},
+        {"os": "weird-platform",
+         "versions": [
+                {"base_webkit_revision": "115688",
+                 "v8_ver": "3.10.6.0",
+                 "wk_ver": "536.10",
+                 "base_trunk_revision": 134666,
+                 "prev_version": "20.0.1123.2",
+                 "version": "20.0.1123.4",
+                 "date": "05\/04\/12",
+                 "prev_date": "05\/02\/12",
+                 "true_branch": "1123",
+                 "channel": "dev",
+                 "branch_revision": 135092}]}]"""
 
     expected_revisions = [
         {"commit": 116185, "channel": "canary", "platform": "Windows", "date": "05/07/12"},
         {"commit": 115687, "channel": "dev", "platform": "Windows", "date": "05/04/12"},
         {"commit": 115688, "channel": "dev", "platform": "Linux", "date": "05/04/12"},
         {"commit": 112327, "channel": "beta", "platform": "Linux", "date": "05/03/12"},
+        {"commit": 115688, "channel": "dev", "platform": "weird-platform", "date": "05/04/12"},
     ]
 
     def test_get_revisions(self):
         omahaproxy = MockOmahaProxy(self.example_omahaproxy_json)
         revisions = omahaproxy.get_revisions()
-        self.assertEqual(len(revisions), 4)
+        self.assertEqual(len(revisions), 5)
         for revision in revisions:
             self.assertTrue("commit" in revision)
             self.assertTrue("channel" in revision)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to