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

Side by Side Diff: sky/tests/framework/citylist-scrolled.sky

Issue 875473004: Fix city-list example after changes to scrolling (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase tests Created 5 years, 10 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 <html> 1 <html>
2 <import src="/sky/examples/city-list/city-list.sky" /> 2 <import src="/sky/examples/city-list/city-list.sky" />
3 <city-list></city-list> 3 <city-list></city-list>
4 <script> 4 <script>
5 var cityList = document.querySelector('city-list'); 5 var cityList = document.querySelector('city-list');
6 var scrolled = false 6 var scrolled = false
7 cityList.addEventListener('load', function() { 7 cityList.addEventListener('load', function() {
8 if (scrolled) { 8 if (scrolled) {
9 internals.notifyTestComplete(internals.renderTreeAsText()); 9 internals.notifyTestComplete(internals.renderTreeAsText());
10 } else { 10 } else {
11 scrolled = true; 11 scrolled = true;
12 setTimeout(function() { 12 setTimeout(function() {
13 cityList.scrollerElement.scrollTop = 200; 13 cityList.scrollBy(200);
14 cityList.handleScroll({ target: cityList.scrollerElement });
15 }, 0); 14 }, 0);
16 } 15 }
17 }); 16 });
18 </script> 17 </script>
19 </html> 18 </html>
OLDNEW
« no previous file with comments | « sky/tests/framework/citylist-expected.txt ('k') | sky/tests/framework/citylist-scrolled-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698