| <!DOCTYPE HTML> |
| <script> |
| function highlightRange(id, start, end, active) { |
| var range = document.createRange(); |
| var elem = document.getElementById(id).firstChild; |
| range.setStart(elem, start); |
| range.setEnd(elem, end); |
| window.internals.addTextMatchMarker(range, active); |
| window.internals.setMarkedTextMatchesAreHighlighted(document, true); |
| } |
| function highlightTest() { |
| highlightRange('1', 2, 5, 'kActive'); |
| } |
| </script> |
| |
| <body onload="highlightTest()"> |
| Test for crbug.com/504712 |
| <p>Find In Page: The below transparent text "ndM" from findMe should be highlighted as orange and painted as black</p> |
| <span id="1" style="color:transparent">findMe</span> |
| </body> |