Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: LayoutTests/fast/dom/Element/scrollingElement-null-body-documentElement.html

Issue 1216953003: Promote scrollTopLeftInterop mode to experimental (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove fixes moved to other patches Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <iframe id="nullbody" src="resources/quirks-empty.html"></iframe><br> 3 <iframe id="nullbody" src="resources/quirks-empty.html"></iframe><br>
4 <iframe id="nullroot" src="resources/quirks-empty.html"></iframe><br> 4 <iframe id="nullroot" src="resources/quirks-empty.html"></iframe><br>
5 <script> 5 <script>
6 description("Verifies that asking for the scrollingElement of a document with null body or null documentElement doesn't crash"); 6 description("Verifies that asking for the scrollingElement of a document with null body or null documentElement doesn't crash");
7 var jsTestIsAsync = true; 7 var jsTestIsAsync = true;
8 8
9 if (window.internals)
10 internals.settings.setScrollTopLeftInteropEnabled(true);
11
12 function runtests() 9 function runtests()
13 { 10 {
14 // Verify scrollTopLeftInterop is actually enabled. 11 // Verify scrollTopLeftInterop is actually enabled.
15 shouldBe("document.scrollingElement", "document.documentElement"); 12 shouldBe("document.scrollingElement", "document.documentElement");
16 13
17 // Verify null body doesn't crash. 14 // Verify null body doesn't crash.
18 var nullbody = document.getElementById("nullbody"); 15 var nullbody = document.getElementById("nullbody");
19 nullbody.contentDocument.documentElement.removeChild(nullbody.contentDocumen t.body); 16 nullbody.contentDocument.documentElement.removeChild(nullbody.contentDocumen t.body);
20 shouldBeEqualToString("nullbody.contentDocument.compatMode", "BackCompat"); 17 shouldBeEqualToString("nullbody.contentDocument.compatMode", "BackCompat");
21 shouldBeNull("nullbody.contentDocument.body"); 18 shouldBeNull("nullbody.contentDocument.body");
(...skipping 13 matching lines...) Expand all
35 function onload(e) { 32 function onload(e) {
36 e.target.loaded = true; 33 e.target.loaded = true;
37 if (nullbody.loaded && nullroot.loaded) 34 if (nullbody.loaded && nullroot.loaded)
38 runtests(); 35 runtests();
39 } 36 }
40 37
41 nullbody.addEventListener('load', onload); 38 nullbody.addEventListener('load', onload);
42 nullroot.addEventListener('load', onload); 39 nullroot.addEventListener('load', onload);
43 40
44 </script> 41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698