| 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 |
| |