| 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/common.js"></script> | 5 <script src="../resources/common.js"></script> |
| 6 <script src="../resources/picker-common.js"></script> | 6 <script src="../resources/picker-common.js"></script> |
| 7 </head> | 7 </head> |
| 8 <body> | 8 <body> |
| 9 <select id="menu"> | 9 <select id="menu"> |
| 10 <option>foo</option> | 10 <option>foo</option> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 waitUntilClosing(function() { | 88 waitUntilClosing(function() { |
| 89 openPicker(menu, test2, openPickerErrorCallback); | 89 openPicker(menu, test2, openPickerErrorCallback); |
| 90 }); | 90 }); |
| 91 } | 91 } |
| 92 | 92 |
| 93 function test2() { | 93 function test2() { |
| 94 picker = window.internals.pagePopupWindow.global.picker; | 94 picker = window.internals.pagePopupWindow.global.picker; |
| 95 shouldBeEqualToString('picker._selectElement.value', '2'); | 95 shouldBeEqualToString('picker._selectElement.value', '2'); |
| 96 shouldBeEqualToString('internals.selectMenuListText(menu)', 'baz'); | 96 shouldBeEqualToString('internals.selectMenuListText(menu)', 'baz'); |
| 97 | 97 |
| 98 eventSender.keyDown('upArrow'); | 98 eventSender.keyDown('ArrowUp'); |
| 99 shouldBeEqualToString('picker._selectElement.value', '1'); | 99 shouldBeEqualToString('picker._selectElement.value', '1'); |
| 100 shouldBeEqualToString('menu.value', 'baz'); | 100 shouldBeEqualToString('menu.value', 'baz'); |
| 101 shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar'); | 101 shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar'); |
| 102 | 102 |
| 103 // click outside to close popup | 103 // click outside to close popup |
| 104 eventSender.mouseMoveTo(300, 1); | 104 eventSender.mouseMoveTo(300, 1); |
| 105 eventSender.mouseDown(); | 105 eventSender.mouseDown(); |
| 106 eventSender.mouseUp(); | 106 eventSender.mouseUp(); |
| 107 shouldBeNull('window.internals.pagePopupWindow'); | 107 shouldBeNull('window.internals.pagePopupWindow'); |
| 108 shouldBeEqualToString('menu.value', 'bar'); | 108 shouldBeEqualToString('menu.value', 'bar'); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 120 eventSender.mouseMoveTo(10, picker._selectElement.offsetHeight - 2); | 120 eventSender.mouseMoveTo(10, picker._selectElement.offsetHeight - 2); |
| 121 shouldBeEqualToString('picker._selectElement.selectedOptions[0].label', 'opt
ion20'); | 121 shouldBeEqualToString('picker._selectElement.selectedOptions[0].label', 'opt
ion20'); |
| 122 | 122 |
| 123 finishJSTest(); | 123 finishJSTest(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 | 126 |
| 127 </script> | 127 </script> |
| 128 </body> | 128 </body> |
| 129 </html> | 129 </html> |
| OLD | NEW |