function assertSanitizedHtml(originalHtml, expectedHtml, opt_sanitizer) {
  const sanitizer = opt_sanitizer || new Builder().build();
  const sanitized = SafeHtml.unwrap(sanitizer.sanitize(originalHtml));
  if (typeof expectedHtml == 'string') {
    testingDom.assertHtmlMatches(
        expectedHtml, sanitized, true /* opt_strictAttributes */);
  } else {
    assertRegExp(expectedHtml, sanitized);
  }
  if (!opt_sanitizer) {
    // Retry with raw sanitizer created without the builder.
    assertSanitizedHtml(originalHtml, expectedHtml, new HtmlSanitizer());
    // Retry with an explicitly passed in Builder.
    const builder = new Builder();
    assertSanitizedHtml(originalHtml, expectedHtml, new HtmlSanitizer(builder));
  }
}
Sanitizes the original HTML and asserts that it is the same as the expected
HTML. If present the config is passed through to the sanitizer. Supports
approximate matching using a RegExp.
@param {string} originalHtml
@param {string|!RegExp} expectedHtml
@param {?HtmlSanitizer=} opt_sanitizer