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

Side by Side Diff: tools/testing/architecture.py

Issue 8427012: Increase timeout and start only when document is loaded. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Wait with timeout until document is loaded. Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2011, 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 5
6 """Runs a Dart unit test in different configurations. 6 """Runs a Dart unit test in different configurations.
7 7
8 Currently supported architectures include dartium, chromium, ia32, x64, 8 Currently supported architectures include dartium, chromium, ia32, x64,
9 arm, simarm, and dartc. 9 arm, simarm, and dartc.
10 10
(...skipping 26 matching lines...) Expand all
37 </style> 37 </style>
38 </head> 38 </head>
39 <body> 39 <body>
40 <h1> Running %(title)s </h1> 40 <h1> Running %(title)s </h1>
41 <script type="text/javascript" src="%(controller_script)s"></script> 41 <script type="text/javascript" src="%(controller_script)s"></script>
42 <script type="%(script_type)s" src="%(source_script)s"></script> 42 <script type="%(script_type)s" src="%(source_script)s"></script>
43 <script type="text/javascript"> 43 <script type="text/javascript">
44 // If nobody intercepts the error, finish the test. 44 // If nobody intercepts the error, finish the test.
45 window.onerror = function() { window.layoutTestController.notifyDone() }; 45 window.onerror = function() { window.layoutTestController.notifyDone() };
46 46
47 // If 'startedDartTest' is not set, that means that the test did not have 47 window.addEventListener('DOMContentLoaded', function() {
48 // a chance to load. This will happen when a load error occurs in the VM. 48 // If 'startedDartTest' is not set, that means that the test did not have
49 // Give the machine time to start up. 49 // a chance to load. This will happen when a load error occurs in the VM.
50 setTimeout(function() { 50 // Give the machine time to start up.
51 // A window.postMessage might have been enqueued after this timeout.
52 // Just sleep another time to give the browser the time to process the
53 // posted message.
54 setTimeout(function() { 51 setTimeout(function() {
55 if (window.layoutTestController 52 // A window.postMessage might have been enqueued after this timeout.
56 && !window.layoutTestController.startedDartTest) { 53 // Just sleep another time to give the browser the time to process the
57 window.layoutTestController.notifyDone(); 54 // posted message.
58 } 55 setTimeout(function() {
59 }, 0); 56 if (window.layoutTestController
60 }, 0); 57 && !window.layoutTestController.startedDartTest) {
58 window.layoutTestController.notifyDone();
59 }
60 }, 0);
61 }, 50);
62 }, false);
61 </script> 63 </script>
62 </body> 64 </body>
63 </html> 65 </html>
64 """ 66 """
65 67
66 DART_TEST_AS_LIBRARY = """ 68 DART_TEST_AS_LIBRARY = """
67 #library('test'); 69 #library('test');
68 #source('%(test)s'); 70 #source('%(test)s');
69 """ 71 """
70 72
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 return ChromiumArchitecture(root_path, arch, mode, test) 509 return ChromiumArchitecture(root_path, arch, mode, test)
508 510
509 elif arch == 'dartium': 511 elif arch == 'dartium':
510 return DartiumArchitecture(root_path, arch, mode, test) 512 return DartiumArchitecture(root_path, arch, mode, test)
511 513
512 elif arch in ['ia32', 'x64', 'simarm', 'arm']: 514 elif arch in ['ia32', 'x64', 'simarm', 'arm']:
513 return RuntimeArchitecture(root_path, arch, mode, test) 515 return RuntimeArchitecture(root_path, arch, mode, test)
514 516
515 elif arch == 'dartc': 517 elif arch == 'dartc':
516 return DartcArchitecture(root_path, arch, mode, test) 518 return DartcArchitecture(root_path, arch, mode, test)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698