Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Element / scrollingElement-null-body-documentElement.html
blob482ca6ece45013cef71aa76cd31aa81d6ea27330
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <iframe id="nullbody" src="resources/quirks-empty.html"></iframe><br>
4 <iframe id="nullroot" src="resources/quirks-empty.html"></iframe><br>
5 <script>
6 description("Verifies that asking for the scrollingElement of a document with null body or null documentElement doesn't crash");
7 var jsTestIsAsync = true;
9 function runtests()
11 // Verify scrollTopLeftInterop is actually enabled.
12 shouldBe("document.scrollingElement", "document.documentElement");
14 // Verify null body doesn't crash.
15 var nullbody = document.getElementById("nullbody");
16 nullbody.contentDocument.documentElement.removeChild(nullbody.contentDocument.body);
17 shouldBeEqualToString("nullbody.contentDocument.compatMode", "BackCompat");
18 shouldBeNull("nullbody.contentDocument.body");
19 shouldBeNull("nullbody.contentDocument.scrollingElement");
21 // Verify null documentElement doesn't crash.
22 var nullroot = document.getElementById("nullroot");
23 nullroot.contentDocument.removeChild(nullroot.contentDocument.documentElement);
24 shouldBeEqualToString("nullroot.contentDocument.compatMode", "BackCompat");
25 shouldBeNull("nullroot.contentDocument.documentElement");
26 shouldBeNull("nullroot.contentDocument.body");
27 shouldBeNull("nullroot.contentDocument.scrollingElement")
29 finishJSTest();
32 function onload(e) {
33 e.target.loaded = true;
34 if (nullbody.loaded && nullroot.loaded)
35 runtests();
38 nullbody.addEventListener('load', onload);
39 nullroot.addEventListener('load', onload);
41 </script>