function doTestFontSizeStyledSpan(doSelect) {
  // Make sure no new browsers start getting this bad behavior. If they do,
  // this test will unexpectedly pass.
  expectedFailures.expectFailureFor(
      !BrowserFeature.DOESNT_OVERRIDE_FONT_SIZE_IN_STYLE_ATTR);

  try {
    setUpFontSizeTests();
    FIELDMOCK.$replay();

    doSelect();
    FORMATTER.execCommandInternal(BasicTextFormatter.COMMAND.FONT_SIZE, 7);
    const parentNode = HELPER.findTextNode('23').parentNode;
    const grandparentNode = parentNode.parentNode;
    const fontNode =
        dom.getElementsByTagNameAndClass(TagName.FONT, undefined, ROOT)[0];
    const spanNode =
        dom.getElementsByTagNameAndClass(TagName.SPAN, undefined, ROOT)[0];
    assertTrue(
        'A font tag should have been added either outside or inside' +
            ' the existing span',
        parentNode == spanNode && grandparentNode == fontNode ||
            parentNode == fontNode && grandparentNode == spanNode);

    FIELDMOCK.$verify();
  } catch (e) {
    expectedFailures.handleException(e);
  }
}
Helper to make sure the precondition that executing the font size command
wraps the content in font tags instead of modifying the style attribute is
maintained by the browser even if the selection is already text that is
wrapped in a tag with a font size style. We test this with several
permutations of how the selection looks: selecting the text in the text
node, selecting the whole text node as a unit, or selecting the whole span
node as a unit. Sometimes the browser wraps the text node with the font
tag, sometimes it wraps the span with the font tag. Either one is ok as
long as a font tag is actually being used instead of just modifying the
span's style, because our fix for {@bug 1286408} would remove that style.
@param {function()} doSelect Function to select the "23" text in the test
    content.
@suppress {visibility} suppression added to enable type checking