1 # Copyright (C) 2013 Apple Inc. All rights reserved.
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are
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
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.
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.
29 import unittest2 as unittest
31 from webkitpy.tool.commands.newcommitbot import NewCommitBot
34 class NewCommitBotTest(unittest.TestCase):
35 def test_summarize_commit_log_basic(self):
36 self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
37 r143106 | jochen@chromium.org | 2013-02-16 10:27:07 -0800 (Sat, 16 Feb 2013) | 10 lines
39 [chromium] initialize all variables of TestRunner classes
40 https://bugs.webkit.org/show_bug.cgi?id=110013
42 Reviewed by Adam Barth.
44 * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
45 (WebTestRunner::TestInterfaces::TestInterfaces):
46 * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
47 (WebTestRunner::TestRunner::TestRunner):
49 ------------------------------------------------------------------------"""),
50 "https://trac.webkit.org/r143106 by jochen__ [chromium] initialize all variables of TestRunner classes"
51 " https://webkit.org/b/110013 Reviewed by abarth.")
53 self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
54 r140066 | simon.fraser@apple.com | 2013-01-17 16:10:31 -0800 (Thu, 17 Jan 2013) | 10 lines
56 Allow PaintInfo to carry all PaintBehavior flags
57 https://bugs.webkit.org/show_bug.cgi?id=106980
59 Reviewed by Beth Dakin.
61 In r139908 I missed one instance of the PaintInfo constructor that should take PaintBehaviorNormal
64 * rendering/RenderScrollbarPart.cpp:
65 (WebCore::RenderScrollbarPart::paintIntoRect):
66 ------------------------------------------------------------------------"""),
67 "https://trac.webkit.org/r140066 by smfr"
68 " Allow PaintInfo to carry all PaintBehavior flags https://webkit.org/b/106980 Reviewed by dethbakin.")
70 def test_summarize_commit_log_rollout(self):
71 self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
72 r143104 | commit-queue@webkit.org | 2013-02-16 09:09:01 -0800 (Sat, 16 Feb 2013) | 27 lines
74 Unreviewed, rolling out r142734.
75 http://trac.webkit.org/changeset/142734
76 https://bugs.webkit.org/show_bug.cgi?id=110018
78 "Triggered crashes on lots of websites" (Requested by ggaren
81 Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-16
85 ------------------------------------------------------------------------"""),
86 "ggaren rolled out r142734 in https://trac.webkit.org/r143104: Triggered crashes on lots of websites")
88 self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
89 r139884 | kov@webkit.org | 2013-01-16 08:26:10 -0800 (Wed, 16 Jan 2013) | 23 lines
91 [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying
92 https://bugs.webkit.org/show_bug.cgi?id=105552
94 Reverting 139877. It made a couple of API tests fail.
96 * platform/graphics/gstreamer/GStreamerVersioning.cpp:
97 * platform/graphics/gstreamer/GStreamerVersioning.h:
98 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
100 (_WebKitWebSrcPrivate):
102 ------------------------------------------------------------------------"""),
103 "kov rolled out 139877 in https://trac.webkit.org/r139884"
104 " [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying"
105 " https://webkit.org/b/105552 It made a couple of API tests fail.")
107 self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
108 r135487 | commit-queue@webkit.org | 2012-11-22 00:09:25 -0800 (Thu, 22 Nov 2012) | 52 lines
110 Unreviewed, rolling out r134927 and r134944.
111 http://trac.webkit.org/changeset/134927
112 http://trac.webkit.org/changeset/134944
113 https://bugs.webkit.org/show_bug.cgi?id=103028
115 Reverting the reverts after merging. (Requested by vsevik on
118 Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-22
120 * English.lproj/localizedStrings.js:
122 * WebCore.vcproj/WebCore.vcproj:
123 * inspector/compile-front-end.py:
124 * inspector/front-end/AdvancedSearchController.js:
125 * inspector/front-end/CallStackSidebarPane.js:
127 ------------------------------------------------------------------------"""),
128 "vsevik rolled out r134927 and r134944 in https://trac.webkit.org/r135487: Reverting the reverts after merging.")