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

Unified 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, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/architecture.py
diff --git a/tools/testing/architecture.py b/tools/testing/architecture.py
index 428b1bc2a51380555faec3726e1ba0493f6c1cd2..ab78d05fbdc8d4d865a1acf07602523cb02eb758 100755
--- a/tools/testing/architecture.py
+++ b/tools/testing/architecture.py
@@ -44,20 +44,22 @@ HTML_CONTENTS = """
// If nobody intercepts the error, finish the test.
window.onerror = function() { window.layoutTestController.notifyDone() };
- // If 'startedDartTest' is not set, that means that the test did not have
- // a chance to load. This will happen when a load error occurs in the VM.
- // Give the machine time to start up.
- setTimeout(function() {
- // A window.postMessage might have been enqueued after this timeout.
- // Just sleep another time to give the browser the time to process the
- // posted message.
+ window.addEventListener('DOMContentLoaded', function() {
+ // If 'startedDartTest' is not set, that means that the test did not have
+ // a chance to load. This will happen when a load error occurs in the VM.
+ // Give the machine time to start up.
setTimeout(function() {
- if (window.layoutTestController
- && !window.layoutTestController.startedDartTest) {
- window.layoutTestController.notifyDone();
- }
- }, 0);
- }, 0);
+ // A window.postMessage might have been enqueued after this timeout.
+ // Just sleep another time to give the browser the time to process the
+ // posted message.
+ setTimeout(function() {
+ if (window.layoutTestController
+ && !window.layoutTestController.startedDartTest) {
+ window.layoutTestController.notifyDone();
+ }
+ }, 0);
+ }, 50);
+ }, false);
</script>
</body>
</html>
« 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