Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: LayoutTests/imported/web-platform-tests/user-timing/resources/webperftestharnessextension.js

Issue 1191043004: Import hr-time and user-timing tests, remove redundant webperf copies (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add idlharness result Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 Distributed under both the W3C Test Suite License [1] and the W3C 2 Distributed under both the W3C Test Suite License [1] and the W3C
3 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the 3 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
4 policies and contribution forms [3]. 4 policies and contribution forms [3].
5 5
6 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license 6 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
7 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license 7 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
8 [3] http://www.w3.org/2004/10/27-testcases 8 [3] http://www.w3.org/2004/10/27-testcases
9 */ 9 */
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 function PerformanceContext(context) 135 function PerformanceContext(context)
136 { 136 {
137 this.performanceContext = context; 137 this.performanceContext = context;
138 } 138 }
139 139
140 PerformanceContext.prototype = 140 PerformanceContext.prototype =
141 { 141 {
142 142
143 initialMeasures: function(item, index, array) 143 initialMeasures: function(item, index, array)
144 { 144 {
145 (this.performanceContext.measure || 145 this.performanceContext.measure.apply(this.performanceContext, item);
146 this.performanceContext.mozMeasure ||
147 this.performanceContext.msMeasure ||
148 this.performanceContext.oMeasure ||
149 this.performanceContext.webkitMeasure)
150 .apply(this.performanceContext, item);
151 }, 146 },
152 147
153 mark: function() 148 mark: function()
154 { 149 {
155 (this.performanceContext.mark || 150 this.performanceContext.mark.apply(this.performanceContext, arguments);
156 this.performanceContext.mozMark ||
157 this.performanceContext.msMark ||
158 this.performanceContext.oMark ||
159 this.performanceContext.webkitMark)
160 .apply(this.performanceContext, arguments);
161 }, 151 },
162 152
163 measure: function() 153 measure: function()
164 { 154 {
165 (this.performanceContext.measure || 155 this.performanceContext.measure.apply(this.performanceContext, arguments );
166 this.performanceContext.mozMeasure ||
167 this.performanceContext.msMeasure ||
168 this.performanceContext.oMeasure ||
169 this.performanceContext.webkitMeasure)
170 .apply(this.performanceContext, arguments);
171 }, 156 },
172 157
173 clearMarks: function() 158 clearMarks: function()
174 { 159 {
175 (this.performanceContext.clearMarks || 160 this.performanceContext.clearMarks.apply(this.performanceContext, argume nts);
176 this.performanceContext.mozClearMarks ||
177 this.performanceContext.msClearMarks ||
178 this.performanceContext.oClearMarks ||
179 this.performanceContext.webkitClearMarks)
180 .apply(this.performanceContext, arguments);
181
182 }, 161 },
183 162
184 clearMeasures: function() 163 clearMeasures: function()
185 { 164 {
186 (this.performanceContext.clearMeasures || 165 this.performanceContext.clearMeasures.apply(this.performanceContext, arg uments);
187 this.performanceContext.mozClearMeasures ||
188 this.performanceContext.msClearMeasures ||
189 this.performanceContext.oClearMeasures ||
190 this.performanceContext.webkitClearMeasures)
191 .apply(this.performanceContext, arguments);
192 166
193 }, 167 },
194 168
195 getEntries: function() 169 getEntries: function()
196 { 170 {
197 return (this.performanceContext.getEntries || 171 return this.performanceContext.getEntries.apply(this.performanceContext, arguments);
198 this.performanceContext.mozGetEntries ||
199 this.performanceContext.msGetEntries ||
200 this.performanceContext.oGetEntries ||
201 this.performanceContext.webkitGetEntries)
202 .apply(this.performanceContext, arguments);
203 }, 172 },
204 173
205 getEntriesByType: function() 174 getEntriesByType: function()
206 { 175 {
207 return (this.performanceContext.getEntriesByType || 176 return this.performanceContext.getEntriesByType.apply(this.performanceCo ntext, arguments);
208 this.performanceContext.mozGetEntriesByType ||
209 this.performanceContext.msGetEntriesByType ||
210 this.performanceContext.oGetEntriesByType ||
211 this.performanceContext.webkitGetEntriesByType)
212 .apply(this.performanceContext, arguments);
213 }, 177 },
214 178
215 getEntriesByName: function() 179 getEntriesByName: function()
216 { 180 {
217 return (this.performanceContext.getEntriesByName || 181 return this.performanceContext.getEntriesByName.apply(this.performanceCo ntext, arguments);
218 this.performanceContext.mozGetEntriesByName ||
219 this.performanceContext.msGetEntriesByName ||
220 this.performanceContext.oGetEntriesByName ||
221 this.performanceContext.webkitGetEntriesByName)
222 .apply(this.performanceContext, arguments);
223 }, 182 },
224 183
225 setResourceTimingBufferSize: function() 184 setResourceTimingBufferSize: function()
226 { 185 {
227 return (this.performanceContext.setResourceTimingBufferSize || 186 return this.performanceContext.setResourceTimingBufferSize.apply(this.pe rformanceContext, arguments);
228 this.performanceContext.mozSetResourceTimingBufferSize ||
229 this.performanceContext.msSetResourceTimingBufferSize ||
230 this.performanceContext.oSetResourceTimingBufferSize ||
231 this.performanceContext.webkitSetResourceTimingBufferSize)
232 .apply(this.performanceContext, arguments);
233 }, 187 },
234 188
235 registerResourceTimingBufferFullCallback: function(func) 189 registerResourceTimingBufferFullCallback: function(func)
236 { 190 {
237 if (typeof this.performanceContext.onresourcetimingbufferfull !== "undef ined") 191 this.performanceContext.onresourcetimingbufferfull = func;
238 this.performanceContext.onresourcetimingbufferfull = func;
239 else if (typeof this.performanceContext.onmozresourcetimingbufferfull != = "undefined")
240 this.performanceContext.onmozresourcetimingbufferfull = func;
241 else if (typeof this.performanceContext.onmsresourcetimingbufferfull !== "undefined")
242 this.performanceContext.onmsresourcetimingbufferfull = func;
243 else if (typeof this.performanceContext.onoresourcetimingbufferfull !== "undefined")
244 this.performanceContext.onoresourcetimingbufferfull = func;
245 else if (typeof this.performanceContext.onwebkitresourcetimingbufferfull !== "undefined")
246 this.performanceContext.onwebkitresourcetimingbufferfull = func;
247 }, 192 },
248 193
249 clearResourceTimings: function() 194 clearResourceTimings: function()
250 { 195 {
251 (this.performanceContext.clearResourceTimings || 196 this.performanceContext.clearResourceTimings.apply(this.performanceConte xt, arguments);
252 this.performanceContext.mozClearResourceTimings ||
253 this.performanceContext.msClearResourceTimings ||
254 this.performanceContext.oClearResourceTimings ||
255 this.performanceContext.webkitClearResourceTimings)
256 .apply(this.performanceContext, arguments);
257 } 197 }
258 198
259 }; 199 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698