chromium/third_party/blink/web_tests/fast/dom/Element/scrollTop-scrollLeft-strict-quirks-modes.html

<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<iframe id="strict" src="resources/scrollable-iframe-strict.html"></iframe><br>
<iframe id="quirks" src="resources/scrollable-iframe-quirks.html"></iframe><br>
<script>
  var count = 0;
  var iframeStrict;
  var iframeQuirks;

  shouldBe("document.scrollingElement", "document.documentElement");

  function verifyTest() {
    // Need to wait on both inner frames to load.
    if (count++ < 1)
        return;

    description('Test for scrollTop/Left values of document.body and document.documentElement in documents in quirks and strict modes');

    iframeStrict = document.getElementById("strict");
    iframeQuirks = document.getElementById("quirks");

    shouldBe("iframeStrict.contentDocument.scrollingElement", "iframeStrict.contentDocument.documentElement");
    shouldBe("iframeStrict.contentDocument.documentElement.scrollTop", "5000");
    shouldBe("iframeStrict.contentDocument.documentElement.scrollLeft", "4000");
    shouldBe("iframeStrict.contentDocument.documentElement.scrollHeight", "10020");
    shouldBe("iframeStrict.contentDocument.documentElement.scrollWidth", "10010");
    shouldBe("iframeStrict.contentDocument.body.scrollTop", "0");
    shouldBe("iframeStrict.contentDocument.body.scrollLeft", "0");
    shouldBe("iframeStrict.contentDocument.body.scrollHeight", "10010");
    shouldBe("iframeStrict.contentDocument.body.scrollWidth", "10005");
    shouldBe("iframeStrict.contentWindow.pageYOffset", "5000");
    shouldBe("iframeStrict.contentWindow.pageXOffset", "4000");

    shouldBe("iframeQuirks.contentDocument.scrollingElement", "iframeQuirks.contentDocument.body");
    shouldBe("iframeQuirks.contentDocument.documentElement.scrollTop", "0");
    shouldBe("iframeQuirks.contentDocument.documentElement.scrollLeft", "0");
    shouldBe("iframeQuirks.contentDocument.documentElement.scrollHeight", "10020");
    shouldBe("iframeQuirks.contentDocument.documentElement.scrollWidth", "10010");
    shouldBe("iframeQuirks.contentDocument.body.scrollTop", "5000");
    shouldBe("iframeQuirks.contentDocument.body.scrollLeft", "4000");
    shouldBe("iframeQuirks.contentDocument.body.scrollHeight", "10020");
    shouldBe("iframeQuirks.contentDocument.body.scrollWidth", "10010");
    shouldBe("iframeQuirks.contentWindow.pageYOffset", "5000");
    shouldBe("iframeQuirks.contentWindow.pageXOffset", "4000");
    finishJSTest();
  }
  var jsTestIsAsync = true;
</script>