OLD | NEW |
| (Empty) |
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 par
ent OPTGROUP style.'); | |
20 var menuElement = document.getElementById('menu'); | |
21 var params = null; | |
22 | |
23 function openPickerErrorCallback() { | |
24 testFailed('picker didn\'t open') | |
25 finishJSTest(); | |
26 } | |
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'); | |
34 | |
35 finishJSTest(); | |
36 } | |
37 </script> | |
38 </body> | |
39 </html> | |
OLD | NEW |