diff options
author | szager <szager@chromium.org> | 2016-01-12 17:00:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-13 01:02:26 +0000 |
commit | ae74c45ad305c6bb5317dd4f646279aa704e46d9 (patch) | |
tree | 9c658608b778d8e8b31a8fb756026693fda7ecac /third_party/WebKit/LayoutTests/intersection-observer/same-document-no-root.html | |
parent | 81a0ff269b3e54580b15c52da806249435e4e206 (diff) | |
download | chromium_src-ae74c45ad305c6bb5317dd4f646279aa704e46d9.zip chromium_src-ae74c45ad305c6bb5317dd4f646279aa704e46d9.tar.gz chromium_src-ae74c45ad305c6bb5317dd4f646279aa704e46d9.tar.bz2 |
Remove unnecessary RAF from tests.
BUG=540528
R=ojan@chromium.org,esprehn@chromium.org
Review URL: https://codereview.chromium.org/1545813002
Cr-Commit-Position: refs/heads/master@{#369060}
Diffstat (limited to 'third_party/WebKit/LayoutTests/intersection-observer/same-document-no-root.html')
-rw-r--r-- | third_party/WebKit/LayoutTests/intersection-observer/same-document-no-root.html | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/same-document-no-root.html b/third_party/WebKit/LayoutTests/intersection-observer/same-document-no-root.html index 38e043e..d70bccf 100644 --- a/third_party/WebKit/LayoutTests/intersection-observer/same-document-no-root.html +++ b/third_party/WebKit/LayoutTests/intersection-observer/same-document-no-root.html @@ -9,7 +9,6 @@ description("Simple intersection observer test with no explicit root and one document."); var target = document.getElementById("target"); var entries = []; - observer_callback = function(changes) { for (var i in changes) entries.push(changes[i]); @@ -17,16 +16,11 @@ var observer = new IntersectionObserver(observer_callback, {}); observer.observe(target); - // TODO(szager): It shouldn't be necessary to RAF after the call to observer() - // and before changing the scroll position, but it is. - - function step0() { - setTimeout(function() { - shouldBeEqualToNumber("entries.length", 0); - document.scrollingElement.scrollTop = 300; - requestAnimationFrame(step1); - }); - } + onload = function() { + shouldBeEqualToNumber("entries.length", 0); + document.scrollingElement.scrollTop = 300; + requestAnimationFrame(step1); + }; function step1() { setTimeout(function() { @@ -76,5 +70,4 @@ }); } - requestAnimationFrame(step0); </script> |