getTestsObject = (getDocument) => {
  let domHelper;
  let text;
  let div;
  let a;
  let table;
  let svg;

  return {
    setUp() {
      const doc = getDocument();
      domHelper = new DomHelper(doc);
      text = domHelper.createTextNode('foo');
      div = domHelper.createElement(TagName.DIV);
      a = domHelper.createElement(TagName.A);
      table = domHelper.createElement(TagName.TABLE);
      if (doc.createElementNS) {
        svg = doc.createElementNS('http://www.w3.org/2000/svg', 'svg');
      }
    },

    testAssertIsElement() {
      assertThrows(dom.assertIsElement.bind(null, text));

      assertEquals(div, dom.assertIsElement(div));
      assertEquals(a, dom.assertIsElement(a));
      assertEquals(table, dom.assertIsElement(table));

      if (svg) {
        assertEquals(svg, dom.assertIsElement(svg));
      }
    },

    testAssertIsHtmlElement() {
      assertThrows(dom.assertIsHtmlElement.bind(null, text));

      assertEquals(div, dom.assertIsHtmlElement(div));
      assertEquals(a, dom.assertIsHtmlElement(a));
      assertEquals(table, dom.assertIsHtmlElement(table));

      if (svg) {
        assertThrows(dom.assertIsHtmlElement.bind(null, svg));
      }
    },

    testAssertIsHtmlElementOfType() {
      assertThrows(dom.assertIsHtmlElementOfType.bind(null, text, TagName.DIV));

      assertEquals(div, dom.assertIsHtmlElementOfType(div, TagName.DIV));
      assertThrows(dom.assertIsHtmlElementOfType.bind(null, div, TagName.A));

      assertEquals(a, dom.assertIsHtmlElementOfType(a, TagName.A));
      assertThrows(dom.assertIsHtmlElementOfType.bind(null, a, TagName.DIV));

      assertEquals(table, dom.assertIsHtmlElementOfType(table, TagName.TABLE));
      assertThrows(
          dom.assertIsHtmlElementOfType.bind(null, table, TagName.DIV));

      if (svg) {
        assertThrows(
            dom.assertIsHtmlElementOfType.bind(null, svg, TagName.DIV));
      }
    },

    testAssertIsHtmlAnchorElement() {
      assertEquals(a, dom.assertIsHtmlAnchorElement(a));

      assertThrows(dom.assertIsHtmlAnchorElement.bind(null, div));
      assertThrows(dom.assertIsHtmlAnchorElement.bind(null, table));

      if (svg) {
        assertThrows(dom.assertIsHtmlAnchorElement.bind(null, svg));
      }
    },
  };
}
@param {function():!Document} getDocument
@return {!Object<string, function()>}