OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../../resources/testharness.js"></script> |
3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../../resources/testharnessreport.js"></script> |
4 <script src="../../assert_selection.js"></script> | 4 <script src="../../assert_selection.js"></script> |
5 <div id="log"></div> | 5 <div id="log"></div> |
6 <script> | 6 <script> |
7 test(() => { | 7 test(() => { |
8 assert_selection( | 8 assert_selection( |
9 [ | 9 [ |
10 '|<legend style="all: initial">foo</legend>', | 10 '|<legend style="all: initial">foo</legend>', |
11 '<details style="display: inline"></details>', | 11 '<details style="display: inline"></details>', |
12 '<textarea></textarea>', | 12 '<textarea></textarea>', |
13 ].join(''), | 13 ].join(''), |
14 selection => { | 14 selection => { |
15 selection.document.execCommand('selectAll'); | 15 selection.document.execCommand('selectAll'); |
16 selection.document.designMode = 'on'; | 16 selection.document.designMode = 'on'; |
17 }, | 17 }, |
18 [ | 18 [ |
19 '<legend style="all: initial">^foo</legend>', | 19 '<legend style="all: initial">^foo|</legend>', |
20 '<details style="display: inline"></details>', | 20 '<details style="display: inline"></details>', |
21 '<textarea></textarea>|', | 21 '<textarea></textarea>', |
22 ].join('')); | 22 ].join('')); |
23 }, 'selectAll on DETAILS should not crash'); | 23 }, 'selectAll on DETAILS should not crash'); |
24 </script> | 24 </script> |
OLD | NEW |