| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script src="../resources/picker-common.js"></script> | 5 <script src="../resources/picker-common.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <style> | 8 <style> |
| 9 select { | 9 select { |
| 10 position: absolute; | 10 position: absolute; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 menu.style.left = '-100px'; | 82 menu.style.left = '-100px'; |
| 83 setItemCount(1); | 83 setItemCount(1); |
| 84 openPicker(menu, function () { | 84 openPicker(menu, function () { |
| 85 injectFakeScreenSize(); | 85 injectFakeScreenSize(); |
| 86 injectFakeItemSize(200, 100, test5); | 86 injectFakeItemSize(200, 100, test5); |
| 87 }, openPickerErrorCallback); | 87 }, openPickerErrorCallback); |
| 88 } | 88 } |
| 89 | 89 |
| 90 function test5() { | 90 function test5() { |
| 91 popupWindowRect = getPopupWindowRect(); | 91 popupWindowRect = getPopupWindowRect(); |
| 92 shouldBe('popupWindowRect.x', '-100'); | 92 shouldBe('popupWindowRect.x', '0'); |
| 93 shouldBe('popupWindowRect.y', 'menuHeight'); | 93 shouldBe('popupWindowRect.y', 'menuHeight'); |
| 94 | 94 |
| 95 popupWindow.pagePopupController.closePopup(); | 95 popupWindow.pagePopupController.closePopup(); |
| 96 // Position close to right edge. | 96 // Position close to right edge. |
| 97 menu.style.top = '0'; | 97 menu.style.top = '0'; |
| 98 menu.style.left = (screenWidth - menuWidth - 10) + 'px'; | 98 menu.style.left = (screenWidth - menuWidth - 10) + 'px'; |
| 99 setItemCount(1); | 99 setItemCount(1); |
| 100 openPicker(menu, function () { | 100 openPicker(menu, function () { |
| 101 injectFakeScreenSize(); | 101 injectFakeScreenSize(); |
| 102 injectFakeItemSize(250, 100, test6); | 102 injectFakeItemSize(250, 100, test6); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 function injectFakeItemSize(width, height, callback) { | 174 function injectFakeItemSize(width, height, callback) { |
| 175 var style = popupWindow.document.createElement('style'); | 175 var style = popupWindow.document.createElement('style'); |
| 176 style.innerHTML = 'select { width: ' + width + 'px !important; } option { he
ight: ' + height + 'px; }'; | 176 style.innerHTML = 'select { width: ' + width + 'px !important; } option { he
ight: ' + height + 'px; }'; |
| 177 popupWindow.document.body.appendChild(style); | 177 popupWindow.document.body.appendChild(style); |
| 178 popupWindow.global.picker._fixWindowSize(); | 178 popupWindow.global.picker._fixWindowSize(); |
| 179 popupWindow.addEventListener('resize', callback, false); | 179 popupWindow.addEventListener('resize', callback, false); |
| 180 } | 180 } |
| 181 </script> | 181 </script> |
| 182 </body> | 182 </body> |
| 183 </html> | 183 </html> |
| OLD | NEW |