blob: 7e96716e4cbce192ebc40154060ada6b466ff8ae [file] [log] [blame]
Tests for the DOM.highlightSelector command.
PASS: Page should have a subframe.
== Running test suite: DOM.highlightSelector
-- Running test case: MainFrameTagSelector
- Frame: <main-frame>
- Selector: div
PASS: Should highlight 3 element(s).
Highlighted Elements:
{"tagName":"div","idValue":"","size":{"width":500,"height":500},"role":""}
{"tagName":"div","idValue":"","classes":["class-one",".escaped"],"size":{"width":10,"height":20},"role":""}
{"tagName":"div","idValue":"id-one","classes":["class-two"],"size":{"width":100,"height":200},"role":""}
-- Running test case: MainFrameWithClassSelector
- Frame: <main-frame>
- Selector: .class-one
PASS: Should highlight 2 element(s).
Highlighted Elements:
{"tagName":"div","idValue":"","classes":["class-one",".escaped"],"size":{"width":10,"height":20},"role":""}
{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":""}
-- Running test case: MainFrameWithMultipleClassSelector
- Frame: <main-frame>
- Selector: .class-one.\.escaped
PASS: Should highlight 1 element(s).
Highlighted Elements:
{"tagName":"div","idValue":"","classes":["class-one",".escaped"],"size":{"width":10,"height":20},"role":""}
-- Running test case: MainFrameIdSelector
- Frame: <main-frame>
- Selector: #id-one
PASS: Should highlight 1 element(s).
Highlighted Elements:
{"tagName":"div","idValue":"id-one","classes":["class-two"],"size":{"width":100,"height":200},"role":""}
-- Running test case: MainFrameMultipleSelectors
- Frame: <main-frame>
- Selector: .class-one, .class-two
PASS: Should highlight 3 element(s).
Highlighted Elements:
{"tagName":"div","idValue":"","classes":["class-one",".escaped"],"size":{"width":10,"height":20},"role":""}
{"tagName":"div","idValue":"id-one","classes":["class-two"],"size":{"width":100,"height":200},"role":""}
{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":""}
-- Running test case: MissingOptionalFrameIdShouldUseMainFrame
- Frame: Not Provided
- Selector: iframe.class-one
PASS: Should highlight 1 element(s).
Highlighted Elements:
{"tagName":"iframe","idValue":"","classes":["class-one"],"size":{"width":304,"height":154},"role":""}
-- Running test case: MainFrameNonMatchingSelector
- Frame: <main-frame>
- Selector: .no-elements
PASS: Should highlight 0 element(s).
-- Running test case: BadFrameShouldError
- Frame: Bad Value
- Selector: div
PASS: Should throw error: No frame for given id found
-- Running test case: BadSelectorShouldError
- Frame: <main-frame>
- Selector: $%foobar
PASS: Should throw error: DOM Error while querying
-- Running test case: ChildFrameTagSelector
- Frame: <child-frame>
- Selector: div
PASS: Should highlight 2 element(s).
Highlighted Elements:
{"tagName":"div","idValue":"id-one","size":{"width":150,"height":250},"role":""}
{"tagName":"div","idValue":"","size":{"width":269,"height":0},"role":""}
-- Running test case: ChildFrameIdSelector
- Frame: <child-frame>
- Selector: #id-one
PASS: Should highlight 1 element(s).
Highlighted Elements:
{"tagName":"div","idValue":"id-one","size":{"width":150,"height":250},"role":""}