4 https://bugzilla.mozilla.org/show_bug.cgi?id=1151667
7 <title>Test for Bug
1151667</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
10 <script src=
"/tests/SimpleTest/paint_listener.js"></script>
11 <script type=
"application/javascript" src=
"apz_test_native_event_utils.js"></script>
12 <script type=
"application/javascript" src=
"apz_test_utils.js"></script>
13 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
24 /* the background is so that we can see it scroll*/
25 background: repeating-linear-gradient(#EEE, #EEE
100px, #DDD
100px, #DDD
200px);
34 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1151667">Mozilla Bug
1151667</a>
37 <!-- This makes sure the subframe is scrollable -->
38 <div id=
"subframe-content"></div>
40 <!-- This makes sure the page is also scrollable, so it (rather than the subframe)
41 is considered the primary async-scrollable frame, and so the subframe isn't
42 layerized upon page load. -->
43 <div id=
"page-content"></div>
45 <script type=
"application/javascript">
47 async function test() {
48 var subframe = document.getElementById(
"subframe");
49 await promiseNativeWheelAndWaitForScrollEvent(subframe,
100,
150,
0, -
10);
51 is(subframe.scrollTop
> 0, true,
"We should have scrolled the subframe down");
52 is(document.documentElement.scrollTop,
0,
"We should not have scrolled the page");
55 SimpleTest.waitForExplicitFinish();
58 .then(SimpleTest.finish, SimpleTest.finishWithFailure);