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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/misc/resources/cross-origin-subframe-for-scrolling.html

Issue 2631853002: Give OOPIF FrameViews their own scroll animation timelines and hosts (Closed)
Patch Set: Test added Created 3 years, 11 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="/js-test-resources/js-test.js"></script>
bokan 2017/01/19 20:05:39 Why do you need js-test here? IIRC, window.testRun
kenrb 2017/01/19 21:36:19 I realized that after I had already written it thi
3 <div style="height: 300px"></div>
4
5 <script>
6 setPrintTestResultsLazily();
7 self.jsTestIsAsync = true;
8
9 window.onload = (() => {
10 if (!window.eventSender || !window.internals) {
11 debug("This test requires window.eventSender.");
12 return;
13 }
14 internals.settings.setScrollAnimatorEnabled(true);
15 });
16
17 function handleMessage(event) {
18 if (event.data.hasOwnProperty('scrollBy')) {
19 eventSender.mouseMoveTo(event.data.left + 5, event.data.top + 5);
bokan 2017/01/19 20:05:39 Does event sender perform the scroll event in the
kenrb 2017/01/19 21:36:19 Yes, we don't have a way to send events across pro
20 eventSender.mouseScrollBy(0, event.data.scrollBy);
21 requestAnimationFrame(() => {setTimeout(() => {event.source.postMessage("", "*")}, 500)});
bokan 2017/01/19 20:05:39 I'm weary of timeouts, they're a frequent source o
kenrb 2017/01/19 21:36:19 Will update in follow up.
22 } else {
23 event.source.postMessage({scrollTop: document.documentElement.scrollTop}, "* ");
24 }
25 }
26
27 window.addEventListener("message", handleMessage);
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698