newcommitbot_unittest.py 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. # Copyright (C) 2013 Apple Inc. All rights reserved.
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are
  5. # met:
  6. #
  7. # * Redistributions of source code must retain the above copyright
  8. # notice, this list of conditions and the following disclaimer.
  9. # * Redistributions in binary form must reproduce the above
  10. # copyright notice, this list of conditions and the following disclaimer
  11. # in the documentation and/or other materials provided with the
  12. # distribution.
  13. # * Neither the name of Google Inc. nor the names of its
  14. # contributors may be used to endorse or promote products derived from
  15. # this software without specific prior written permission.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  20. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  21. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  23. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. import unittest2 as unittest
  29. from webkitpy.tool.commands.newcommitbot import NewCommitBot
  30. class NewCommitBotTest(unittest.TestCase):
  31. def test_summarize_commit_log_basic(self):
  32. self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
  33. r143106 | jochen@chromium.org | 2013-02-16 10:27:07 -0800 (Sat, 16 Feb 2013) | 10 lines
  34. [chromium] initialize all variables of TestRunner classes
  35. https://bugs.webkit.org/show_bug.cgi?id=110013
  36. Reviewed by Adam Barth.
  37. * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
  38. (WebTestRunner::TestInterfaces::TestInterfaces):
  39. * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
  40. (WebTestRunner::TestRunner::TestRunner):
  41. ------------------------------------------------------------------------"""),
  42. "https://trac.webkit.org/r143106 by Jochen Eisinger (jochen__) [chromium] initialize all variables of TestRunner classes"
  43. " https://webkit.org/b/110013 Reviewed by Adam Barth (abarth).")
  44. self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
  45. r140066 | simon.fraser@apple.com | 2013-01-17 16:10:31 -0800 (Thu, 17 Jan 2013) | 10 lines
  46. Allow PaintInfo to carry all PaintBehavior flags
  47. https://bugs.webkit.org/show_bug.cgi?id=106980
  48. Reviewed by Beth Dakin.
  49. In r139908 I missed one instance of the PaintInfo constructor that should take PaintBehaviorNormal
  50. instead of "false".
  51. * rendering/RenderScrollbarPart.cpp:
  52. (WebCore::RenderScrollbarPart::paintIntoRect):
  53. ------------------------------------------------------------------------"""),
  54. "https://trac.webkit.org/r140066 by Simon Fraser (smfr)"
  55. " Allow PaintInfo to carry all PaintBehavior flags https://webkit.org/b/106980 Reviewed by Beth Dakin (dethbakin).")
  56. def test_summarize_commit_log_rollout(self):
  57. self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
  58. r143104 | commit-queue@webkit.org | 2013-02-16 09:09:01 -0800 (Sat, 16 Feb 2013) | 27 lines
  59. Unreviewed, rolling out r142734.
  60. http://trac.webkit.org/changeset/142734
  61. https://bugs.webkit.org/show_bug.cgi?id=110018
  62. "Triggered crashes on lots of websites" (Requested by ggaren
  63. on #webkit).
  64. Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-16
  65. Source/WebCore:
  66. ------------------------------------------------------------------------"""),
  67. "Geoffrey Garen (ggaren) rolled out r142734 in https://trac.webkit.org/r143104 : Triggered crashes on lots of websites")
  68. self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
  69. r139884 | kov@webkit.org | 2013-01-16 08:26:10 -0800 (Wed, 16 Jan 2013) | 23 lines
  70. [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying
  71. https://bugs.webkit.org/show_bug.cgi?id=105552
  72. Reverting 139877. It made a couple of API tests fail.
  73. * platform/graphics/gstreamer/GStreamerVersioning.cpp:
  74. * platform/graphics/gstreamer/GStreamerVersioning.h:
  75. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
  76. (StreamingClient):
  77. (_WebKitWebSrcPrivate):
  78. ------------------------------------------------------------------------"""),
  79. "Gustavo Noronha Silva (kov) rolled out 139877 in https://trac.webkit.org/r139884"
  80. " [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying"
  81. " https://webkit.org/b/105552 It made a couple of API tests fail.")
  82. self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
  83. r135487 | commit-queue@webkit.org | 2012-11-22 00:09:25 -0800 (Thu, 22 Nov 2012) | 52 lines
  84. Unreviewed, rolling out r134927 and r134944.
  85. http://trac.webkit.org/changeset/134927
  86. http://trac.webkit.org/changeset/134944
  87. https://bugs.webkit.org/show_bug.cgi?id=103028
  88. Reverting the reverts after merging. (Requested by vsevik on
  89. #webkit).
  90. Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-22
  91. * English.lproj/localizedStrings.js:
  92. * WebCore.gypi:
  93. * WebCore.vcproj/WebCore.vcproj:
  94. * inspector/compile-front-end.py:
  95. * inspector/front-end/AdvancedSearchController.js:
  96. * inspector/front-end/CallStackSidebarPane.js:
  97. ------------------------------------------------------------------------"""),
  98. "Vsevolod Vlasov (vsevik) rolled out r134927 and r134944 in https://trac.webkit.org/r135487 :"
  99. " Reverting the reverts after merging.")