OLD | NEW |
1 // Copyright 2010 Google Inc. All Rights Reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
2 | 4 |
3 /** | 5 /** |
4 * @fileoverview Playback agent. | 6 * @fileoverview Playback agent. |
5 */ | 7 */ |
6 | 8 |
7 var Benchmark = Benchmark || {}; | 9 var Benchmark = Benchmark || {}; |
8 | 10 |
9 /** | 11 /** |
10 * Playback agent class. | 12 * Playback agent class. |
11 * @param {Object} data Test data. | 13 * @param {Object} data Test data. |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 Benchmark.reportScore = function(score) { | 249 Benchmark.reportScore = function(score) { |
248 Benchmark.score = score; | 250 Benchmark.score = score; |
249 }; | 251 }; |
250 | 252 |
251 Benchmark.originals.addEventListenerToWindow.call( | 253 Benchmark.originals.addEventListenerToWindow.call( |
252 window, 'message', function(event) { | 254 window, 'message', function(event) { |
253 if (Benchmark.score) { | 255 if (Benchmark.score) { |
254 event.source.postMessage(Benchmark.score, event.origin); | 256 event.source.postMessage(Benchmark.score, event.origin); |
255 } | 257 } |
256 }, false); | 258 }, false); |
OLD | NEW |