Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select / popup-menu-nested-style.html
blobe5e13d8b7d6d9cb0ead031c8125e03f3a5d5f3e0
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="../resources/common.js"></script>
6 <script src="../resources/picker-common.js"></script>
7 </head>
8 <body>
9 <select id="menu" style="background-color:white; color:black;">
10 <option>foo</option>
11 <optgroup label="Group" style="background-color:black; color:white;">
12 <option style="background-color:white; color:black;">bar</option>
13 </optgroup>
14 <optgroup label="Group2" style="display:none;">
15 <option>baz</option>
16 </optgroup>
17 </select>
18 <script>
19 description('Check if an OPTION style is serialized with comparison with the parent OPTGROUP style.');
20 var menuElement = document.getElementById('menu');
21 var params = null;
23 function openPickerErrorCallback() {
24 testFailed('picker didn\'t open')
25 finishJSTest();
27 openPicker(menu, test1, openPickerErrorCallback);
28 function test1() {
29 params = window.internals.pagePopupWindow.global.params;
30 shouldBeEqualToString('params.children[1].type', 'optgroup');
31 shouldBeUndefined('params.children[1].children[0].type');
32 shouldBeEqualToString('params.children[1].children[0].style.color', '#000000');
33 shouldBeEqualToString('params.children[1].children[0].style.backgroundColor', '#ffffff');
35 finishJSTest();
37 </script>
38 </body>
39 </html>