| Tests for the injected WebInspectorAudit.DOM functions. |
| |
| |
| |
| == Running test suite: Audit.run.DOM |
| -- Running test case: Audit.run.DOM.hasEventListeners.noListeners |
| Audit setup... |
| Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#noListeners"))`... |
| Result: false |
| Audit teardown... |
| |
| -- Running test case: Audit.run.DOM.hasEventListeners.noListeners.WithArgs |
| Audit setup... |
| Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#noListeners"), ["FakeEvent"])`... |
| Result: false |
| Audit teardown... |
| |
| -- Running test case: Audit.run.DOM.hasEventListeners.attributeListener |
| Audit setup... |
| Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#attributeListener"))`... |
| Result: true |
| Audit teardown... |
| |
| -- Running test case: Audit.run.DOM.hasEventListeners.attributeListener.WithArgs |
| Audit setup... |
| Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#attributeListener"), ["FakeEvent"])`... |
| Result: false |
| Audit teardown... |
| |
| -- Running test case: Audit.run.DOM.hasEventListeners.javascriptListener |
| Audit setup... |
| Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#javascriptListener"))`... |
| Result: true |
| Audit teardown... |
| |
| -- Running test case: Audit.run.DOM.hasEventListeners.javascriptListener.WithArgs |
| Audit setup... |
| Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#javascriptListener"), ["FakeEvent"])`... |
| Result: false |
| Audit teardown... |
| |
| -- Running test case: Audit.run.DOM.hasEventListeners.builtinListener |
| Audit setup... |
| Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#builtinListener"))`... |
| Result: false |
| Audit teardown... |
| |
| -- Running test case: Audit.run.DOM.hasEventListeners.builtinListener.WithArgs |
| Audit setup... |
| Audit run `WebInspectorAudit.DOM.hasEventListeners(document.querySelector("#builtinListener"), ["FakeEvent"])`... |
| Result: false |
| 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 |
| |