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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/misc/resources/cross-origin-subframe-for-scrolling.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/resources/cross-origin-subframe-for-scrolling.html b/third_party/WebKit/LayoutTests/http/tests/misc/resources/cross-origin-subframe-for-scrolling.html
new file mode 100644
index 0000000000000000000000000000000000000000..75414848f7d7422ede192739fff1dab2f4cf88fa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/misc/resources/cross-origin-subframe-for-scrolling.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<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
+<div style="height: 300px"></div>
+
+<script>
+setPrintTestResultsLazily();
+self.jsTestIsAsync = true;
+
+window.onload = (() => {
+ if (!window.eventSender || !window.internals) {
+ debug("This test requires window.eventSender.");
+ return;
+ }
+ internals.settings.setScrollAnimatorEnabled(true);
+});
+
+function handleMessage(event) {
+ if (event.data.hasOwnProperty('scrollBy')) {
+ 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
+ eventSender.mouseScrollBy(0, event.data.scrollBy);
+ 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.
+ } else {
+ event.source.postMessage({scrollTop: document.documentElement.scrollTop}, "*");
+ }
+}
+
+window.addEventListener("message", handleMessage);
+</script>

Powered by Google App Engine
This is Rietveld 408576698