blob: f9f329d061b3e3ae68d115b0ebe489c7ed971c95 [file] [log] [blame]
Tests the interfaces of the highlight API, which include Highlight, HighlightRegister, and extensions to the CSS namespace.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Testing Highlight:
PASS Highlight instanceof Function is true
PASS typeof Highlight is "function"
PASS new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})) instanceof Highlight is true
PASS HighlightRegister instanceof Function is true
PASS typeof HighlightRegister is "function"
PASS new HighlightRegister() instanceof HighlightRegister is true
PASS new HighlightRegister().set("foo-styling",new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}))) is defined.
PASS CSS.highlights is defined.
PASS CSS.highlights.set("foo-styling",new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2}))) is CSS.highlights
PASS successfullyParsed is true
TEST COMPLETE