Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 | |
| 3 <style> | |
| 4 | |
| 5 body { | |
| 6 height: 800px; | |
| 7 width: 600px; | |
|
bokan
2016/09/14 21:38:11
Nit: unnecessary tab
| |
| 8 } | |
| 9 </style> | |
| 10 | |
| 11 <pre> | |
| 12 <a href="./same-page-navigate.html" id="same-page-0">link to self html</a> | |
| 13 <a href="#1">goto 1</a> <a href="#2">goto 2</a> <a href="#3">goto 3</a> <a href= "#4">goto 4</a> <a href="#5">goto 5</a> <a href="#6">goto 6</a> | |
| 14 | |
| 15 . | |
| 16 . | |
| 17 . | |
| 18 . | |
| 19 . | |
| 20 . | |
| 21 . | |
| 22 . | |
| 23 . | |
| 24 . | |
| 25 . | |
| 26 . | |
| 27 . | |
| 28 . | |
| 29 . | |
|
bokan
2016/09/14 21:38:11
All this space and other links are just adding unn
| |
| 30 . | |
| 31 . | |
| 32 . | |
| 33 . | |
| 34 . | |
| 35 . | |
| 36 . | |
| 37 . | |
| 38 . | |
| 39 . | |
| 40 . | |
| 41 . | |
| 42 <a name="1">1 | |
| 43 <a href="./same-page-navigate.html" id="same-page-1">link to self html</a> | |
| 44 <a href="#1">goto 1</a> <a href="#2">goto 2</a> <a href="#3">goto 3</a> <a href= "#4">goto 4</a> <a href="#5">goto 5</a> <a href="#6">goto 6</a> | |
| 45 . | |
| 46 . | |
| 47 . | |
| 48 . | |
| 49 . | |
| 50 . | |
| 51 . | |
| 52 . | |
| 53 . | |
| 54 . | |
| 55 . | |
| 56 . | |
| 57 . | |
| 58 . | |
| 59 . | |
| 60 . | |
| 61 . | |
| 62 . | |
| 63 . | |
| 64 . | |
| 65 . | |
| 66 . | |
| 67 . | |
| 68 . | |
| 69 . | |
| 70 . | |
| 71 . | |
| 72 <a name="2">2 | |
| 73 <a href="./same-page-navigate.html" id="same-page-2">link to self html</a> | |
| 74 <a href="#1">goto 1</a> <a href="#2">goto 2</a> <a href="#3">goto 3</a> <a href= "#4">goto 4</a> <a href="#5">goto 5</a> <a href="#6">goto 6</a> | |
| 75 . | |
| 76 . | |
| 77 . | |
| 78 . | |
| 79 . | |
| 80 . | |
| 81 . | |
| 82 . | |
| 83 . | |
| 84 . | |
| 85 . | |
| 86 . | |
| 87 . | |
| 88 . | |
| 89 . | |
| 90 . | |
| 91 . | |
| 92 . | |
| 93 . | |
| 94 . | |
| 95 . | |
| 96 . | |
| 97 . | |
| 98 . | |
| 99 . | |
| 100 . | |
| 101 . | |
| 102 <a name="3">3 | |
| 103 <a href="./same-page-navigate.html" id="same-page-3">link to self html</a> | |
| 104 <a href="#1">goto 1</a> <a href="#2">goto 2</a> <a href="#3">goto 3</a> <a href= "#4">goto 4</a> <a href="#5">goto 5</a> <a href="#6">goto 6</a> | |
| 105 . | |
| 106 . | |
| 107 . | |
| 108 . | |
| 109 . | |
| 110 . | |
| 111 . | |
| 112 . | |
| 113 . | |
| 114 . | |
| 115 . | |
| 116 . | |
| 117 . | |
| 118 . | |
| 119 . | |
| 120 . | |
| 121 . | |
| 122 . | |
| 123 . | |
| 124 . | |
| 125 . | |
| 126 . | |
| 127 . | |
| 128 . | |
| 129 . | |
| 130 . | |
| 131 . | |
| 132 <a name="4">4 | |
| 133 <a href="./same-page-navigate.html" id="same-page-4">link to self html</a> | |
| 134 <a href="#1">goto 1</a> <a href="#2">goto 2</a> <a href="#3">goto 3</a> <a href= "#4">goto 4</a> <a href="#5">goto 5</a> <a href="#6">goto 6</a> | |
| 135 . | |
| 136 . | |
| 137 . | |
| 138 . | |
| 139 . | |
| 140 . | |
| 141 . | |
| 142 . | |
| 143 . | |
| 144 . | |
| 145 . | |
| 146 . | |
| 147 . | |
| 148 . | |
| 149 . | |
| 150 . | |
| 151 . | |
| 152 . | |
| 153 . | |
| 154 . | |
| 155 . | |
| 156 . | |
| 157 . | |
| 158 . | |
| 159 . | |
| 160 . | |
| 161 . | |
| 162 <a name="5">5 | |
| 163 <a href="./same-page-navigate.html" id="same-page-5">link to self html</a> | |
| 164 <a href="#1">goto 1</a> <a href="#2">goto 2</a> <a href="#3">goto 3</a> <a href= "#4">goto 4</a> <a href="#5">goto 5</a> <a href="#6">goto 6</a> | |
| 165 . | |
| 166 . | |
| 167 . | |
| 168 . | |
| 169 . | |
| 170 . | |
| 171 . | |
| 172 . | |
| 173 . | |
| 174 . | |
| 175 . | |
| 176 . | |
| 177 . | |
| 178 . | |
| 179 . | |
| 180 . | |
| 181 . | |
| 182 . | |
| 183 . | |
| 184 . | |
| 185 . | |
| 186 . | |
| 187 . | |
| 188 . | |
| 189 . | |
| 190 . | |
| 191 . | |
| 192 <a name="6">6 | |
| 193 <a href="./same-page-navigate.html" id="same-page-6">link to self html</a> | |
| 194 <a href="#1">goto 1</a> <a href="#2">goto 2</a> <a href="#3">goto 3</a> <a href= "#4">goto 4</a> <a href="#5">goto 5</a> <a href="#6">goto 6</a> | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 <a href="./same-page-navigate.html" id="same-page-bottom">link to self html</a> | |
| 200 </pre> | |
| 201 | |
| 202 <script src="../../resources/testharness.js"></script> | |
| 203 <script src="../../resources/testharnessreport.js"></script> | |
| 204 | |
| 205 <script> | |
| 206 | |
| 207 // Ensure that the scroll position is correct when we navigate to same page afte r scale(zoom-in/zoom-out) | |
| 208 // crbug.com/642279 | |
| 209 test(function() { | |
| 210 | |
| 211 console.log(innerWidth); | |
| 212 | |
| 213 // exit in second load, using innerWidth to detect scale | |
| 214 if (innerWidth < 800) { | |
| 215 assert_equals(scrollX, 0); | |
| 216 assert_equals(scrollY, 0); | |
| 217 return; | |
|
bokan
2016/09/14 21:38:11
Did the `waitUntilDone` and `notifyDone` methods n
chaopeng
2016/09/15 00:15:21
Yes, async test will give "missing actual" but I c
| |
| 218 } | |
| 219 | |
| 220 window.internals.setPageScaleFactor(2); | |
| 221 scrollTo(0, 10000); | |
| 222 | |
| 223 var atag = document.getElementById('same-page-bottom'); | |
| 224 | |
| 225 var x = (atag.offsetLeft - scrollX + 1) * 2; | |
| 226 var y = (atag.offsetTop - scrollY + 1) * 2; | |
| 227 eventSender.mouseMoveTo(x, y); | |
| 228 eventSender.mouseDown(); | |
| 229 eventSender.mouseUp(); | |
| 230 }, 'Ensure that the scroll position is correct when we navigate to same page aft er scale(zoom-in/zoom-out)'); | |
| 231 | |
| 232 </script> | |
| 233 | |
| 234 | |
| 235 | |
| OLD | NEW |