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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/intersection-observer/iframe-cross-origin.html

Issue 1806133002: IntersectionObserver: use an idle callback to send notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebase Created 4 years, 8 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="/js-test-resources/js-test.js"></script> 2 <script src="/js-test-resources/js-test.js"></script>
3 <div style="width:100%; height:700px;"></div> 3 <div style="width:100%; height:700px;"></div>
4 <iframe id="target-iframe" src="http://localhost:8080/intersection-observer/reso urces/cross-origin-subframe.html" style="height: 100px; overflow-y: scroll"></if rame> 4 <iframe id="target-iframe" src="http://localhost:8080/intersection-observer/reso urces/cross-origin-subframe.html" style="height: 100px; overflow-y: scroll"></if rame>
5 <div style="width:100%; height:700px;"></div> 5 <div style="width:100%; height:700px;"></div>
6 6
7 <script> 7 <script>
8 setPrintTestResultsLazily(); 8 setPrintTestResultsLazily();
9 self.jsTestIsAsync = true; 9 self.jsTestIsAsync = true;
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 checkData(event.data.actual, event.data.expected); 54 checkData(event.data.actual, event.data.expected);
55 } else if (event.data.hasOwnProperty('DONE')) { 55 } else if (event.data.hasOwnProperty('DONE')) {
56 finishJSTest(); 56 finishJSTest();
57 document.scrollingElement.scrollTop = 0; 57 document.scrollingElement.scrollTop = 0;
58 } else { 58 } else {
59 requestAnimationFrame(function () { iframe.contentWindow.postMessage("", "*" ) }); 59 requestAnimationFrame(function () { iframe.contentWindow.postMessage("", "*" ) });
60 } 60 }
61 } 61 }
62 62
63 window.addEventListener("message", handleMessage); 63 window.addEventListener("message", handleMessage);
64
64 iframe.onload = function() { 65 iframe.onload = function() {
65 iframe.contentWindow.postMessage("", "*") 66 // See LayoutTests/intersection-observer/README for explanation of double RAF.
66 }; 67 requestAnimationFrame(() => {
68 requestAnimationFrame(() => { iframe.contentWindow.postMessage("", "*") })
69 });
70 }
67 </script> 71 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698