anchor.diff:   */
   library unittest_html_enhanced_config;
   
  +import 'dart:async';
   import 'dart:collection' show LinkedHashMap;
   import 'dart:html';
   import 'package:unittest/unittest.dart';
  -
  -class HtmlEnhancedConfiguration extends Configuration {
  +import 'package:meta/meta.dart';
  +
  +class _HtmlEnhancedConfiguration extends Configuration {
     /** Whether this is run within dartium layout tests. */
     final bool _isLayoutTest;
  -  HtmlEnhancedConfiguration(this._isLayoutTest);
  -
  -  // TODO(rnystrom): Get rid of this if we get canonical closures for methods.
  -  EventListener _onErrorClosure;
  -  EventListener _onMessageClosure;
  +  _HtmlEnhancedConfiguration(this._isLayoutTest);
  +
  +  var _onErrorSubscription = null;
  +  var _onMessageSubscription = null;
  +
  +  void _installOnErrorHandler() {
  +    if (_onErrorSubscription == null) {
  +      // Listen for uncaught errors.
  +      _onErrorSubscription = window.onError.listen(
  +          (e) => handleExternalError(e, '(DOM callback has errors)'));
  +    }
  +  }
  +
  +  void _installOnMessageHandler() {
  +    if (_onMessageSubscription == null) {
  +      // Listen for errors from JS.
  +      _onMessageSubscription = window.onMessage.listen(
  +          (e) => processMessage(e));
  +    }
  +  }
   
     void _installHandlers() {
  -    if (_onErrorClosure == null) {
  -      _onErrorClosure =
  -          (e) => handleExternalError(e, '(DOM callback has errors)');
  -      // Listen for uncaught errors.
  -      window.onError.listen(_onErrorClosure);
  -    }
  -    if (_onMessageClosure == null) {
  -      _onMessageClosure = (e) => processMessage(e);
  -      // Listen for errors from JS.
  -      window.onMessage.listen(_onMessageClosure);
  -    }
  +    _installOnErrorHandler();
  +    _installOnMessageHandler();
     }
   
     void _uninstallHandlers() {
  -    if (_onErrorClosure != null) {
  -      window.on.error.remove(_onErrorClosure);
  -      _onErrorClosure = null;
  -    }
  -    if (_onMessageClosure != null) {
  -      window.on.message.remove(_onMessageClosure);
  -      _onMessageClosure = null;
  +    if (_onErrorSubscription != null) {
  +      _onErrorSubscription.cancel();
  +      _onErrorSubscription = null;
  +    }
  +    if (_onMessageSubscription != null) {
  +      _onMessageSubscription.cancel();
  +      _onMessageSubscription = null;
       }
     }
   
  
positive.code: // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
  // for details. All rights reserved. Use of this source code is governed by a
  // BSD-style license that can be found in the LICENSE file.
  
  // TODO: This is temporary addition to BOT util
  // DARTBUG: http://code.google.com/p/dart/issues/detail?id=8335
  // is fixed.
  
  /**
   * A simple unit test library for running tests in a browser.
  
negative.code: 
    void onStart() {
      // Listen for uncaught errors.
      _installOnErrorHandler();
    }
  
    void onTestResult(TestCase testCase) {}
  