advanceActualNode = function() {
    'use strict';
    // If the iterator has already been advanced, don't advance it again.
    if (!preIterated) {
      actualNode = goog.iter.nextOrValue(actualIt, null);
    }
    preIterated = false;

    // Advance the iterator so long as it is return end tags.
    while (actualNode == goog.testing.dom.END_TAG_MARKER_) {
      actualNode = goog.iter.nextOrValue(actualIt, null);
    }
  }
Assert that the html in `actual` is substantially similar to
htmlPattern.  This method tests for the same set of styles, for the same
order of nodes, and the presence of attributes.  Breaking whitespace nodes
are ignored.  Elements can be
annotated with classnames corresponding to keys in goog.userAgent and will be
expected to show up in that user agent and expected not to show up in
others.
@param {string} htmlPattern The pattern to match.
@param {!Element} actual The element to check: its contents are matched
    against the HTML pattern.
@param {boolean=} opt_strictAttributes If false, attributes that appear in
    htmlPattern must be in actual, but actual can have attributes not
    present in htmlPattern.  If true, htmlPattern and actual must have the
    same set of attributes.  Default is false.