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
'<?xml version="1.0"?>\n\n' +
32
'<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">\n\n' +
36
' <title>Revisions of /trunk</title>\n\n' +
37
' <link>http://trac.webkit.org/log/trunk?rev=92362</link>\n\n' +
38
' <description>Trac Log - Revisions of /trunk</description>\n\n' +
39
' <language>en-US</language>\n\n' +
40
' <generator>Trac 0.11.7</generator>\n\n' +
42
' <title>WebKit</title>\n\n' +
43
' <url>http://trac.webkit.org/chrome/site/icon.png</url>\n\n' +
44
' <link>http://trac.webkit.org/log/trunk?rev=92362</link>\n\n' +
47
' <author>macpherson@chromium.org</author>\n\n' +
48
' <pubDate>Thu, 04 Aug 2011 02:09:19 GMT</pubDate>\n\n' +
49
' <title>Revision 92342: Support cast between CSSPrimitiveValue and EBoxSizing, use in ...</title>\n\n' +
50
' <link>http://trac.webkit.org/changeset/92342/trunk</link>\n\n' +
51
' <guid isPermaLink="false">http://trac.webkit.org/changeset/92342/trunk</guid>\n\n' +
52
' <description><p>\n\n' +
53
'Support cast between CSSPrimitiveValue and EBoxSizing, use in CSSStyleSelector.\n\n' +
54
'<a class="ext-link" href="https://bugs.webkit.org/show_bug.cgi?id=65657"><span class="icon"> </span>https://bugs.webkit.org/show_bug.cgi?id=65657</a>\n\n' +
57
'Reviewed by Simon Fraser.\n\n' +
60
'No new tests / refactoring only.\n\n' +
63
'* css/CSSPrimitiveValueMappings.h:\n\n' +
64
'(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):\n\n' +
65
'Implement cast from EBoxSizing.\n' +
66
'(WebCore::CSSPrimitiveValue::operator EBoxSizing):\n' +
67
'Implement cast to EBoxSizing.\n' +
68
'* css/CSSStyleSelector.cpp:\n' +
69
'(WebCore::CSSStyleSelector::applyProperty):\n' +
70
'Use appropriate macro to simplify code using cast.\n' +
73
' <category>Log</category>\n' +
75
' <author>commit-queue@webkit.org</author>\n' +
76
' <pubDate>Thu, 04 Aug 2011 02:01:31 GMT</pubDate>\n' +
77
' <title>Revision 92341: Implement EventSender.scalePageBy() ...</title>\n' +
78
' <link>http://trac.webkit.org/changeset/92341/trunk</link>\n' +
79
' <guid isPermaLink="false">http://trac.webkit.org/changeset/92341/trunk</guid>\n' +
80
' <description><p>\n' +
81
'Implement EventSender.scalePageBy()\n' +
82
'<a class="ext-link" href="https://bugs.webkit.org/show_bug.cgi?id=58013"><span class="icon"> </span>https://bugs.webkit.org/show_bug.cgi?id=58013</a>\n' +
85
'Patch by Kentaro Hara &lt;<a class="mail-link" href="mailto:haraken@google.com"><span class="icon"> </span>haraken@google.com</a>&gt; on 2011-08-03\n' +
86
'Reviewed by Darin Fisher.\n' +
89
'Implemented EventSender.scalePageBy(f, x, y), which scales a page by a factor of f\n' +
90
'and then sets a scroll position to (x, y). Enabled the tests that had been waiting\n' +
91
'for the implementation of EventSender.scalePageBy(f, x, y).\n' +
94
'Source/WebKit/chromium:\n' +
97
'Tests: compositing/scaling/tiled-layer-recursion.html\n' +
99
'<blockquote>\n' +
101
'fast/repaint/scale-page-shrink.html\n' +
102
'fast/dom/Element/scale-page-client-rects.html\n' +
103
'fast/dom/Range/scale-page-client-rects.html\n' +
104
'fast/events/scroll-in-scaled-page-with-overflow-hidden.html\n' +
105
'fast/dom/Element/scale-page-bounding-client-rect.html\n' +
106
'fast/dom/Range/scale-page-bounding-client-rect.html\n' +
108
'</blockquote>\n' +
110
'* public/WebView.h:\n' +
111
'* src/WebViewImpl.cpp:\n' +
112
'(WebKit::WebViewImpl::scalePage): A wrapper method for scalePage() in WebCore.\n' +
113
'* src/WebViewImpl.h:\n' +
119
'Tests: compositing/scaling/tiled-layer-recursion.html\n' +
121
'<blockquote>\n' +
123
'fast/repaint/scale-page-shrink.html\n' +
124
'fast/dom/Element/scale-page-client-rects.html\n' +
125
'fast/dom/Range/scale-page-client-rects.html\n' +
126
'fast/events/scroll-in-scaled-page-with-overflow-hidden.html\n' +
127
'fast/dom/Element/scale-page-bounding-client-rect.html\n' +
128
'fast/dom/Range/scale-page-bounding-client-rect.html\n' +
130
'</blockquote>\n' +
132
'* DumpRenderTree/chromium/EventSender.cpp:\n' +
133
'(EventSender::EventSender): Added bindings for scalePageBy().\n' +
134
'(EventSender::scalePageBy): A wrapper method for scalePage() in WebView.\n' +
135
'* DumpRenderTree/chromium/EventSender.h:\n' +
136
'* DumpRenderTree/chromium/TestShell.cpp:\n' +
137
'(TestShell::resetTestController): Resets the scale factor to 1.\n' +
143
'* platform/chromium-linux/compositing/scaling/tiled-layer-recursion-expected.png: Added.\n' +
144
'* platform/chromium-linux/fast/repaint/scale-page-shrink-expected.png: Added.\n' +
145
'* platform/chromium-linux/fast/repaint/scale-page-shrink-expected.txt: Added.\n' +
146
'* platform/chromium-mac/fast/dom/Element/scale-page-bounding-client-rect-expected.txt: Removed.\n' +
147
'* platform/chromium-mac/fast/dom/Range/scale-page-bounding-client-rect-expected.txt: Removed.\n' +
148
'* platform/chromium-win/fast/dom/Element/scale-page-bounding-client-rect-expected.txt: Removed.\n' +
149
'* platform/chromium-win/fast/dom/Element/scale-page-client-rects-expected.txt: Removed.\n' +
150
'* platform/chromium-win/fast/dom/Range/scale-page-bounding-client-rect-expected.txt: Removed.\n' +
151
'* platform/chromium-win/fast/dom/Range/scale-page-client-rects-expected.txt: Removed.\n' +
152
'* platform/chromium/test_expectations.txt: Enabled one test. Enabled two tests for chromium-linux.\n' +
155
' <category>Log</category>\n' +
157
' <author>rniwa@webkit.org</author>\n' +
158
' <pubDate>Thu, 04 Aug 2011 01:41:29 GMT</pubDate>\n' +
159
' <title>Revision 92338: Revert an erroneous rebaseline from r92315.\n' +
161
' <link>http://trac.webkit.org/changeset/92338/trunk</link>\n' +
162
' <guid isPermaLink="false">http://trac.webkit.org/changeset/92338/trunk</guid>\n' +
163
' <description><p>\n' +
164
'Revert an erroneous rebaseline from <a class="changeset" href="http://trac.webkit.org/changeset/92315" title="Remove LegacyDefaultOptionalArguments flag from navigator IDL files ...">r92315</a>.\n' +
167
'* fast/dom/navigator-detached-no-crash-expected.txt:\n' +
170
' <category>Log</category>\n' +
172
' <author>noam.rosenthal@nokia.com</author>\n' +
173
' <pubDate>Thu, 04 Aug 2011 00:22:21 GMT</pubDate>\n' +
174
' <title>Revision 92337: [Qt][Texmap][REGRESSION] http://webkit.org/blog-files/transform-style.html ...</title>\n' +
175
' <link>http://trac.webkit.org/changeset/92337/trunk</link>\n' +
176
' <guid isPermaLink="false">http://trac.webkit.org/changeset/92337/trunk</guid>\n' +
177
' <description><p>\n' +
178
'[Qt][Texmap][REGRESSION] <a class="ext-link" href="http://webkit.org/blog-files/transform-style.html"><span class="icon"> </span>http://webkit.org/blog-files/transform-style.html</a> doesn\'t show composited content\n' +
179
'<a class="ext-link" href="https://bugs.webkit.org/show_bug.cgi?id=65629"><span class="icon"> </span>https://bugs.webkit.org/show_bug.cgi?id=65629</a>\n' +
182
'Reviewed by Benjamin Poulain.\n' +
185
'Some non-ES2 initialization was wrongfully #ifdefed in CPU(X86) and thus compiled-out.\n' +
186
'When put it in the correct #ifdef, composited layers which require an intermediate buffer\n' +
190
'No new tests. Existing opacity tests in LayoutTests/compositing test this.\n' +
193
'* platform/graphics/opengl/TextureMapperGL.cpp:\n' +
194
'(WebCore::BitmapTextureGL::bind):\n' +
197
' <category>Log</category>\n' +
199
' <author>commit-queue@webkit.org</author>\n' +
200
' <pubDate>Wed, 03 Aug 2011 04:26:52 GMT</pubDate>\n' +
201
' <title>Revision 92259: Unreviewed, rolling out r92256.\n' +
202
'http://trac.webkit.org/changeset/92256 ...</title>\n' +
203
' <link>http://trac.webkit.org/changeset/92259/trunk</link>\n' +
204
' <guid isPermaLink="false">http://trac.webkit.org/changeset/92259/trunk</guid>\n' +
205
' <description><p>\n' +
206
'Unreviewed, rolling out <a class="changeset" href="http://trac.webkit.org/changeset/92256" title="Make EventDispatchMediator RefCounted. ...">r92256</a>.\n' +
207
'<a class="ext-link" href="http://trac.webkit.org/changeset/92256"><span class="icon"> </span>http://trac.webkit.org/changeset/92256</a>\n' +
208
'<a class="ext-link" href="https://bugs.webkit.org/show_bug.cgi?id=65593"><span class="icon"> </span>https://bugs.webkit.org/show_bug.cgi?id=65593</a>\n' +
211
'Causing tons of crashes on the chromium win bots (Requested by\n' +
212
'jamesr on #webkit).\n' +
215
'Patch by Sheriff Bot &lt;<a class="mail-link" href="mailto:webkit.review.bot@gmail.com"><span class="icon"> </span>webkit.review.bot@gmail.com</a>&gt; on 2011-08-02\n' +
218
'* dom/Event.cpp:\n' +
220
'* dom/EventDispatcher.cpp:\n' +
221
'(WebCore::EventDispatcher::dispatchEvent):\n' +
222
'* dom/EventDispatcher.h:\n' +
223
'* dom/KeyboardEvent.cpp:\n' +
224
'* dom/KeyboardEvent.h:\n' +
225
'* dom/MouseEvent.cpp:\n' +
226
'* dom/MouseEvent.h:\n' +
227
'* dom/Node.cpp:\n' +
228
'(WebCore::Node::dispatchEvent):\n' +
229
'(WebCore::Node::dispatchKeyEvent):\n' +
230
'(WebCore::Node::dispatchMouseEvent):\n' +
231
'(WebCore::Node::dispatchWheelEvent):\n' +
232
'* dom/WheelEvent.cpp:\n' +
233
'* dom/WheelEvent.h:\n' +
236
' <category>Log</category>\n' +
241
var kExampleCommitDataList = [{
243
"title": "Revision 92342: Support cast between CSSPrimitiveValue and EBoxSizing, use in ...",
244
"time": "Thu, 04 Aug 2011 02:09:19 GMT",
245
"summary": "Support cast between CSSPrimitiveValue and EBoxSizing, use in CSSStyleSelector.",
246
"author": "macpherson@chromium.org",
247
"reviewer": "Simon Fraser",
249
"revertedRevision": undefined
252
"title": "Revision 92341: Implement EventSender.scalePageBy() ...",
253
"time": "Thu, 04 Aug 2011 02:01:31 GMT",
254
"summary": "Implement EventSender.scalePageBy()",
255
"author": "Kentaro Hara",
256
"reviewer": "Darin Fisher",
258
"revertedRevision": undefined
261
"title": "Revision 92338: Revert an erroneous rebaseline from r92315.\n* ...",
262
"time": "Thu, 04 Aug 2011 01:41:29 GMT",
263
"summary": "Revert an erroneous rebaseline from r92315.",
264
"author": "rniwa@webkit.org",
267
"revertedRevision": undefined
270
"title": "Revision 92337: [Qt][Texmap][REGRESSION] http://webkit.org/blog-files/transform-style.html ...",
271
"time": "Thu, 04 Aug 2011 00:22:21 GMT",
272
"summary": "[Qt][Texmap][REGRESSION] http://webkit.org/blog-files/transform-style.html doesn't show composited content",
273
"author": "noam.rosenthal@nokia.com",
274
"reviewer": "Benjamin Poulain",
276
"revertedRevision": undefined
279
"title": "Revision 92259: Unreviewed, rolling out r92256.\nhttp://trac.webkit.org/changeset/92256 ...",
280
"time": "Wed, 03 Aug 2011 04:26:52 GMT",
281
"summary": "Unreviewed, rolling out r92256.",
282
"author": "Sheriff Bot",
285
"revertedRevision": 92256
288
test("changesetURL", 1, function() {
289
equals(trac.changesetURL(1234), "http://trac.webkit.org/changeset/1234");
292
test("logURL", 4, function() {
293
equals(trac.logURL('trunk', 1234, 1236, false, false), "http://trac.webkit.org/log/trunk?rev=1236&stop_rev=1234&limit=4");
294
equals(trac.logURL('trunk', 1234, 1234, true, false), "http://trac.webkit.org/log/trunk?rev=1234&stop_rev=1234&limit=2&verbose=on");
295
equals(trac.logURL('trunk', 1236, 1236, false, true), "http://trac.webkit.org/log/trunk?rev=1236&stop_rev=1236&limit=2&format=rss");
296
equals(trac.logURL('trunk', 1234, 1236, true, true), "http://trac.webkit.org/log/trunk?rev=1236&stop_rev=1234&limit=4&verbose=on&format=rss");
299
test("recentCommitData", 3, function() {
300
var simulator = new NetworkSimulator();
301
simulator.get = function(url, callback)
303
equals(url, 'http://trac.webkit.org/log/trunk?verbose=on&format=rss&limit=10');
304
simulator.scheduleCallback(function() {
305
var parser = new DOMParser();
306
var responseDOM = parser.parseFromString(kExampleCommitDataXML, "application/xml");
307
callback(responseDOM);
311
simulator.runTest(function() {
312
trac.recentCommitData('trunk', 10, function(commitDataList) {
313
$.each(commitDataList, function(index, commitData) {
314
// Including the entire message makes the deepEqual below to unwieldy.
315
delete commitData.message;
317
deepEqual(commitDataList, kExampleCommitDataList);
322
test("commitDataForRevisionRange", 3, function() {
323
var simulator = new NetworkSimulator();
324
simulator.get = function(url, callback)
326
equals(url, 'http://trac.webkit.org/log/trunk?rev=12365&stop_rev=12345&limit=22&verbose=on&format=rss');
327
simulator.scheduleCallback(function() {
328
var parser = new DOMParser();
329
var responseDOM = parser.parseFromString(kExampleCommitDataXML, "application/xml");
330
callback(responseDOM);
334
simulator.runTest(function() {
335
trac.commitDataForRevisionRange('trunk', 12345, 12365, function(commitDataList) {
336
$.each(commitDataList, function(index, commitData) {
337
// Including the entire message makes the deepEqual below to unwieldy.
338
delete commitData.message;
340
deepEqual(commitDataList, kExampleCommitDataList);