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

Unified Diff: sky/tests/framework/citylist-scrolled.sky

Issue 708633002: Add city-list example tests to sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: working Created 6 years, 1 month 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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/framework/citylist-scrolled.sky
diff --git a/sky/tests/framework/citylist-scrolled.sky b/sky/tests/framework/citylist-scrolled.sky
new file mode 100644
index 0000000000000000000000000000000000000000..6216888a6b5c34fd25c7ae7bd136b0a8ee6643cd
--- /dev/null
+++ b/sky/tests/framework/citylist-scrolled.sky
@@ -0,0 +1,19 @@
+<html>
+<import src="/sky/examples/city-list/city-list.sky" />
+<city-list></city-list>
+<script>
+var cityList = document.querySelector('city-list');
+var scrolled = false
+cityList.addEventListener('load', function() {
+ if (scrolled) {
+ internals.notifyTestComplete(internals.renderTreeAsText());
+ } else {
+ scrolled = true;
+ setTimeout(function() {
+ cityList.scrollerElement.scrollTop = 200;
+ cityList.handleScroll({ target: cityList.scrollerElement });
+ }, 0);
+ }
+});
+</script>
+</html>
« 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