anchor.diff:  }
   
   /**
  - * Lazily creates a UnitTestSuite if there isn't already an active one. Returns
  - * whether or not one was created.
  - */
  -_ensureActiveSuite() {
  -  if (_currentSuite != null) {
  -    return;
  -  }
  -
  -  _currentSuite = new UnitTestSuite();
  + * Lazily initializes the test library if not already initialized.
  + */
  +_ensureInitialized() {
  +  if (_state != _UNINITIALIZED) return;
  +
  +  _tests = <TestCase>[];
  +  _onErrorClosure = (e) { _onError(e); };
  +
  +  // Immediately queue the suite up. It will run after a timeout (i.e. after
  +  // main() has returned).
  +  listener(e) {
  +    _currentGroup = '';
  +    _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);
  +  }
  +
  +  _state = _READY;
   }
   
   /**
  
positive.code:     : success = false,
        fail = false,
        error = false {
      message = """<tr>
            <td>${id}</td>
            <td class='unittest-error'>NO STATUS</td>
            <td>Test did not complete</td>
          </tr>""";
    }
  
    bool isComplete() => success || fail || error;
  
    void recordSuccess() {
      message = "<tr><td>${id}</td><td class='unittest-pass'>PASS</td></tr>";
      success = true;
    }
  
    void recordError(String msg, String stackTrace) {
      message = """
          <tr>
            <td>${id}</td>
            <td class='unittest-error'>ERROR</td>
            <td>${msg}</td>
          </tr>""";
      if (stackTrace != null) {
        message +=
            "<tr><td></td><td colspan='2'><pre>${stackTrace}</pre></td></tr>";
      }
      error = true;
    }
  
    void recordFail(String msg, String stackTrace) {
      // Include the spec description if we have one.
      // TODO(rnystrom): When all of our tests are using group() and test(), we
      // can assume description will be non-null and eliminate this check.
      if (description != null) {
        msg = 'Expectation: $description. $msg';
      }
  
      message = """
          <tr>
            <td>${id}</td>
            <td class='unittest-fail'>FAIL</td>
            <td>${msg}</td>
          </tr>""";
      if (stackTrace != null) {
        message +=
            "<tr><td></td><td colspan='2'><pre>${stackTrace}</pre></td></tr>";
      }
      fail = true;
    }
  }
  
  
negative.code:  * calls.
   */
  void asyncTest(String spec, int callbacks, TestFunction body) {
    _ensureInitialized();
  
    final testCase = new TestCase(
        _tests.length + 1, _fullSpec(spec), body, callbacks);
    _tests.add(testCase);
  
    if (callbacks < 1) {
      testCase.recordError(
  