summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-resize-after-open.html
blob: bdc5fdac400e3a338ed6ea8231ff30c2606f5086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<script src="../resources/picker-common.js"></script>
<style>
#menu {
    -webkit-appearance: none;
    width: 100px;
}
</style>
<select id="menu">
<option>o1</option>
<option>o2</option>
</select>
<script>
function openPickerErrorCallback() {
    testFailed('picker didn\'t open')
    finishJSTest();
}
function checkPopupWidth() {
    shouldBe('popupWindow.innerWidth', '150');
    finishJSTest();
}
var menu = document.getElementById('menu');
openPicker(menu, function() {
    shouldBe('popupWindow.innerWidth', '100');
    popupWindow.addEventListener("resize", checkPopupWidth, false);
    menu.style.width = "150px";
    menu.offsetTop;
}, openPickerErrorCallback);
</script>