ls(Object.getPrototypeOf(dp), DOMParserSubclass.prototype);
      assert_equals(object_realm(dp), "parent window");
    }, "Subclass constructor in parent window");

    test(function() {
      var dp = new child.DOMParserSubclass();
      assert_equals(Object.getPrototypeOf(dp), child.DOMParserSubclass.prototype);
      assert_equals(object_realm(dp), "child window");
    }, "Subclass constructor in child window");

    test(function() {
      class ForeignDOMParserSubclass extends child.DOMParser {}
     