blob: 8b315a1ed158465f5e05c2a9e88ccee6bf5f5977 [file] [log] [blame]
Tests for the injected WebInspectorAudit.DOM functions.
== Running test suite: Audit.run.DOM
-- Running test case: Audit.run.DOM.hasEventListeners.None.General
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#noListeners"))`...
Result: false
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.None.click
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#noListeners"), "click")`...
Result: false
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.None.FakeEvent
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#noListeners"), "FakeEvent")`...
Result: false
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.Attribute.General
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#attributeListener"))`...
Result: true
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.Attribute.click
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#attributeListener"), "click")`...
Result: true
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.Attribute.FakeEvent
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#attributeListener"), "FakeEvent")`...
Result: false
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.JavaScript.General
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#javascriptListener"))`...
Result: true
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.JavaScript.click
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#javascriptListener"), "click")`...
Result: true
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.JavaScript.FakeEvent
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#javascriptListener"), "FakeEvent")`...
Result: false
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.Builtin.General
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#builtinListener"))`...
Result: false
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.Builtin.play
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#builtinListener"), "play")`...
Result: false
Audit teardown...
-- Running test case: Audit.run.DOM.hasEventListeners.Builtin.FakeEvent
Audit setup...
Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#builtinListener"), "FakeEvent")`...
Result: false
Audit teardown...
-- Running test case: Audit.run.DOM.simulateUserInteraction.UserGesture
Audit setup...
Audit run `(() => { let result = undefined; WebInspectorAudit.DOM.simulateUserInteraction(() => { result = internals.isProcessingUserGesture(); }); return result; })()`...
Result: true
Audit teardown...
-- Running test case: Audit.run.DOM.simulateUserInteraction.TransientActivation
Audit setup...
Audit run `(() => { let result = undefined; WebInspectorAudit.DOM.simulateUserInteraction(() => { result = internals.hasTransientActivation(); }); return result; })()`...
Result: true
Audit teardown...
-- Running test case: Audit.run.DOM.InvalidCopiedFunctionCall
Audit setup...
Copying WebInspectorAudit to window...
Audit teardown...
Testing copied hasEventListeners...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied simulateUserInteraction...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit