2 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE.
30 var kExampleCommitDataXML =
31 "<feed xmlns='http://www.w3.org/2005/Atom'>\n" +
32 "<title>blink, branch master</title>\n" +
33 "<subtitle>Mirror of the Chromium Blink repository.</subtitle>\n" +
34 "<link rel='alternate' type='text/html' href='http://blink.lc/blink/'/>\n" +
36 "<title>Throw SecurityError when setting 'Replaceable' properties cross-origin.</title>\n" +
37 "<updated>2013-09-30T20:22:01Z</updated>\n" +
39 "<name>mkwst@chromium.org</name>\n" +
41 "<published>2013-09-30T20:22:01Z</published>\n" +
42 "<link rel='alternate' type='text/html' href='http://blink.lc/blink/commit/?id=723e62a4a4e093435b4772b4839aa3fd7cf6b991'/>\n" +
43 "<id>723e62a4a4e093435b4772b4839aa3fd7cf6b991</id>\n" +
44 "<content type='text'>\n" +
45 "This matches Gecko's behavior for these types of properties.\n" +
48 "R=jochen@chromium.org\n" +
49 "CC=abarth@chromium.org\n" +
51 "Review URL: https://chromiumcodereview.appspot.com/25022002\n" +
53 "git-svn-id: svn://svn.chromium.org/blink/trunk@158545 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
55 "<content type='xhtml'>\n" +
56 "<div xmlns='http://www.w3.org/1999/xhtml'>\n" +
58 "This matches Gecko's behavior for these types of properties.\n" +
61 "R=jochen@chromium.org\n" +
62 "CC=abarth@chromium.org\n" +
64 "Review URL: https://chromiumcodereview.appspot.com/25022002\n" +
66 "git-svn-id: svn://svn.chromium.org/blink/trunk@158545 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
72 "<title>Fix one more layering violation caught by check-blink-deps</title>\n" +
73 "<updated>2013-09-30T19:36:21Z</updated>\n" +
75 "<name>eseidel@chromium.org</name>\n" +
77 "<published>2013-09-30T19:36:21Z</published>\n" +
78 "<link rel='alternate' type='text/html' href='http://blink.lc/blink/commit/?id=51e5c70050dcb0980eb31f112d0cd948f3ece820'/>\n" +
79 "<id>51e5c70050dcb0980eb31f112d0cd948f3ece820</id>\n" +
80 "<content type='text'>\n" +
81 "core/platform may not depend on core/ even for testing.\n" +
84 "TBR=abarth@chromium.org, abarth\n" +
86 "Review URL: https://codereview.chromium.org/25284004\n" +
88 "git-svn-id: svn://svn.chromium.org/blink/trunk@158544 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
90 "<content type='xhtml'>\n" +
91 "<div xmlns='http://www.w3.org/1999/xhtml'>\n" +
93 "core/platform may not depend on core/ even for testing.\n" +
96 "TBR=abarth@chromium.org, abarth\n" +
98 "Review URL: https://codereview.chromium.org/25284004\n" +
100 "git-svn-id: svn://svn.chromium.org/blink/trunk@158544 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
106 "<title>Update DEPS include_rules after addition of root-level platform directory</title>\n" +
107 "<updated>2013-09-30T19:28:49Z</updated>\n" +
109 "<name>eseidel@chromium.org</name>\n" +
111 "<published>2013-09-30T19:28:49Z</published>\n" +
112 "<link rel='alternate' type='text/html' href='http://blink.lc/blink/commit/?id=227add0156e8ab272abcd3368dfc0b5a91f35749'/>\n" +
113 "<id>227add0156e8ab272abcd3368dfc0b5a91f35749</id>\n" +
114 "<content type='text'>\n" +
115 "These were all failures noticed when running check-blink-deps\n" +
117 "R=abarth@chromium.org,abarth,abarth\n" +
120 "Review URL: https://codereview.chromium.org/25275005\n" +
122 "git-svn-id: svn://svn.chromium.org/blink/trunk@158543 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
124 "<content type='xhtml'>\n" +
125 "<div xmlns='http://www.w3.org/1999/xhtml'>\n" +
127 "These were all failures noticed when running check-blink-deps\n" +
129 "R=abarth@chromium.org,abarth,abarth\n" +
132 "Review URL: https://codereview.chromium.org/25275005\n" +
134 "git-svn-id: svn://svn.chromium.org/blink/trunk@158543 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
139 "<title>Mark Skia suppressions for rebasline.</title>\n" +
140 "<updated>2014-02-27T14:44:41Z</updated>\n" +
142 "<name>fmalita@chromium.org</name>\n" +
144 "<published>2014-02-27T14:44:41Z</published>\n" +
145 "<link rel='alternate' type='text/html' href='http://blink.lc/blink/commit/?id=35030357db3c0967974273faf5e65fe3d7cc041b'/>\n" +
146 "<id>35030357db3c0967974273faf5e65fe3d7cc041b</id>\n" +
147 "<content type='text'>\n" +
148 "Unreviewed gardening.\n" +
149 "Stray R=123 in the middle...\n" +
151 "BUG=/341448,344497\n" +
152 "TBR=robertphillips@google.com\n" +
154 "Review URL: https://codereview.chromium.org/183123002\n" +
156 "git-svn-id: svn://svn.chromium.org/blink/trunk@168027 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
158 "<content type='xhtml'>\n" +
159 "<div xmlns='http://www.w3.org/1999/xhtml'>\n" +
161 "Unreviewed gardening.\n" +
162 "Stray R=123 in the middle...\n" +
164 "BUG=/341448 , 344497/ \n" +
165 "TBR=robertphillips@google.com\n" +
167 "Review URL: https://codereview.chromium.org/183123002\n" +
169 "git-svn-id: svn://svn.chromium.org/blink/trunk@168027 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
176 "<title>Remove yurys and loislo from WTF watchlist</title>\n" +
177 "<updated>2014-03-03T07:23:31Z</updated>\n" +
179 "<name>yurys@chromium.org</name>\n" +
181 "<published>2014-03-03T07:23:31Z</published>\n" +
182 "<link rel='alternate' type='text/html' href='http://blink.lc/blink/commit/?id=43118424ccd1d65ea7ec9ba26c32195e5fdde6e4'/>\n" +
183 "<id>43118424ccd1d65ea7ec9ba26c32195e5fdde6e4</id>\n" +
184 "<content type='text'>\n" +
186 "R=loislo@chromium.org\n" +
188 "Review URL: https://codereview.chromium.org/176883013\n" +
190 "git-svn-id: svn://svn.chromium.org/blink/trunk@168268 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
192 "<content type='xhtml'>\n" +
193 "<div xmlns='http://www.w3.org/1999/xhtml'>\n" +
196 "R=loislo@chromium.org\n" +
198 "Review URL: https://codereview.chromium.org/176883013\n" +
200 "git-svn-id: svn://svn.chromium.org/blink/trunk@168268 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" +
207 var kExampleCommitDataList = [{
209 "title": "Throw SecurityError when setting 'Replaceable' properties cross-origin.",
210 "time": "2013-09-30T20:22:01Z",
211 "summary": "This matches Gecko's behavior for these types of properties.",
212 "author": "mkwst@chromium.org",
213 "reviewer": "jochen@chromium.org",
215 "revertedRevision": undefined
219 "title": "Fix one more layering violation caught by check-blink-deps",
220 "time": "2013-09-30T19:36:21Z",
221 "summary": "core/platform may not depend on core/ even for testing.",
222 "author": "eseidel@chromium.org",
223 "reviewer": "abarth@chromium.org, abarth",
225 "revertedRevision": undefined
229 "title": "Update DEPS include_rules after addition of root-level platform directory",
230 "time": "2013-09-30T19:28:49Z",
231 "summary": "These were all failures noticed when running check-blink-deps",
232 "author": "eseidel@chromium.org",
233 "reviewer": "abarth@chromium.org, abarth, abarth",
235 "revertedRevision": undefined
239 "title": "Mark Skia suppressions for rebasline.",
240 "time": "2014-02-27T14:44:41Z",
241 "summary": "Unreviewed gardening.",
242 "author": "fmalita@chromium.org",
243 "reviewer": "robertphillips@google.com",
244 "bugID": [341448, 344497],
245 "revertedRevision": undefined
249 "title": "Remove yurys and loislo from WTF watchlist",
250 "time": "2014-03-03T07:23:31Z",
251 "summary": "BUG=None",
252 "author": "yurys@chromium.org",
253 "reviewer": "loislo@chromium.org",
255 "revertedRevision": undefined
259 test("changesetURL", 1, function() {
260 equals(trac.changesetURL(1234), "http://src.chromium.org/viewvc/blink?view=rev&revision=1234");
263 asyncTest("recentCommitData", 3, function() {
264 var simulator = new NetworkSimulator();
265 simulator.xml = function(url)
267 equals(url, 'http://blink.lc/blink/atom');
268 var parser = new DOMParser();
269 var responseDOM = parser.parseFromString(kExampleCommitDataXML, "application/xml");
270 return Promise.resolve(responseDOM);
273 simulator.runTest(function() {
274 return trac.recentCommitData('trunk', 10).then(function(commitDataList) {
275 $.each(commitDataList, function(index, commitData) {
276 // Including the entire message makes the deepEqual below to unwieldy.
277 delete commitData.message;
279 deepEqual(commitDataList, kExampleCommitDataList);