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

Side by Side Diff: test/perf/input/testing.js

Issue 11683002: Setting up benchmarks and perf utilities (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 11 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 if (navigator.webkitStartDart) {
6 navigator.webkitStartDart();
7 }
8
9 if (window.layoutTestController) { 5 if (window.layoutTestController) {
6 window.layoutTestController.dumpAsText();
10 window.layoutTestController.waitUntilDone(); 7 window.layoutTestController.waitUntilDone();
11 } 8 }
12 9
13 function messageHandler(e) { 10 function messageHandler(e) {
14 if (e.data == 'done') { 11 if (e.data == 'done' && window.layoutTestController) {
15 // TODO(sigmund): use && in this condition, issue #41 12 window.layoutTestController.notifyDone();
16 if (window.layoutTestController) {
17 window.layoutTestController.notifyDone();
18 }
19 } 13 }
20 } 14 }
21 15
22 window.addEventListener('message', messageHandler, false); 16 window.addEventListener('message', messageHandler, false);
23 17
24 function errorHandler(e) { 18 function errorHandler(e) {
25 if (window.layoutTestController) { 19 if (window.layoutTestController) {
26 window.layoutTestController.notifyDone(); 20 window.layoutTestController.notifyDone();
27 } 21 }
28 window.console.log('FAIL'); 22 window.console.log('FAIL');
29 } 23 }
30 24
31 window.addEventListener('error', errorHandler, false); 25 window.addEventListener('error', errorHandler, false);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698