Get foreground tab on Android
[chromium-blink-merge.git] / content / test / data / overscroll_navigation.html
blob7ea687bc608e1bf1f6ad4a61196324a9ce5226ec
1 <html>
2 <title>Title: 0</title>
3 <style>
5 .large {
6 width: 300px;
7 height: 100px;
8 background-color: red;
9 margin: 300px;
12 </style>
14 <div name='0' class='large'></div>
15 <div name='1' class='large'></div>
16 <div name='2' class='large'></div>
17 <div name='3' class='large'></div>
18 <div name='4' class='large'></div>
19 <div name='5' class='large'></div>
20 <div name='6' class='large'></div>
21 <div name='7' class='large'></div>
22 <div name='8' class='large'></div>
23 <div name='9' class='large'></div>
25 <script>
27 function get_current() {
28 if (location.hash.length == 0)
29 return 0;
30 return parseInt(location.hash.substr(1));
33 function navigate_next() {
34 var current = get_current();
35 current = (current + 1) % 10;
36 location.hash = "#" + current;
39 function navigate_prev() {
40 var current = get_current();
41 current = (current + 9) % 10;
42 location.hash = "#" + current;
45 function touch_start_handler() {
48 function install_touch_handler() {
49 document.addEventListener('touchstart', touch_start_handler);
52 function uninstall_touch_handler() {
53 document.removeEventListener('touchstart', touch_start_handler);
56 onload = function() {
57 window.onhashchange = function() {
58 document.title = "Title: " + location.hash;
62 </script>
64 </html>