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

Unified Diff: client/testing/unittest/unittestsuite.dart

Issue 8341119: Get rid of use of dart:html in unittestlib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove old comment. 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 | « client/testing/unittest/unittest_dom.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/testing/unittest/unittestsuite.dart
diff --git a/client/testing/unittest/unittestsuite.dart b/client/testing/unittest/unittestsuite.dart
index 5f03cc51f264c1e9d10a60a56c95f479c8163051..fafea3cb6faa25600ce1fa8d5b95bb7ecbc3aeeb 100644
--- a/client/testing/unittest/unittestsuite.dart
+++ b/client/testing/unittest/unittestsuite.dart
@@ -135,13 +135,9 @@ _runTests() {
window.postMessage('unittest-suite-start', '*');
window.setTimeout(() {
assert (_currentTest == 0);
+
// Listen for uncaught errors.
- try {
- window.on.error.add(_onErrorClosure);
- } catch(var e) {
- // TODO(jacobr): remove this horrible hack when dartc bugs are fixed.
- window.dynamic.onerror = _onErrorClosure;
- }
+ window.onerror = _onErrorClosure;
_nextBatch();
}, 0);
}
@@ -196,12 +192,7 @@ _nextBatch() {
/** Publish results on the page and notify controller. */
_completeTests() {
- try {
- window.on.error.remove(_onErrorClosure);
- } catch (var e) {
- // TODO(jacobr): remove this horrible hack to work around dartc bugs.
- window.dynamic.onerror = null;
- }
+ window.onerror = null;
_state = _UNINITIALIZED;
@@ -243,7 +234,7 @@ _completeTests() {
document.body.innerHTML = newBody.toString();
}
- window.dynamic/*TODO(5389254)*/.postMessage('unittest-suite-done', '*');
+ window.postMessage('unittest-suite-done', '*');
}
void _onError(e) {
@@ -281,12 +272,7 @@ _ensureInitialized() {
_runTests();
};
- try {
- window.dynamic.on.contentLoaded.add(listener);
- } catch(var e) {
- // TODO(jacobr): remove this horrible hack to work around dartc bugs.
- window.dynamic.addEventListener("DOMContentLoaded", listener, false);
- }
+ window.addEventListener('DOMContentLoaded', listener, false);
_state = _READY;
}
« no previous file with comments | « client/testing/unittest/unittest_dom.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698