blob: e9d5fe5f35cfb4c42f97987019a0470cf131531f [file] [log] [blame]
Tests for the Audit.run command.
== Running test suite: Audit.run
-- Running test case: Audit.run.Valid
Audit run "function() { return 42; }"...
PASS: Run should send back 42.
-- Running test case: Audit.run.Valid.InjectedObject
Audit setup...
Audit run "function() { return WebInspectorAudit; }"...
PASS: The injected WebInspectorAudit should be an object.
PASS: The injected WebInspectorAudit should be a basic object.
Audit teardown...
-- Running test case: Audit.run.Valid.InjectedObject.Persistence
Audit setup...
Audit run "function() { WebInspectorAudit.foo = 42; return 10; }"...
PASS: Run should send back 10.
Audit run "function() { return WebInspectorAudit.foo; }"...
PASS: Run should send back 42.
Audit teardown...
Triggering GC...
Audit setup...
Audit run "function() { return WebInspectorAudit.foo; }"...
PASS: Run should send back undefined.
Audit teardown...
-- Running test case: Audit.run.Valid.InjectedObject.Accessibility
Audit setup...
Audit run "function() { return WebInspectorAudit.Accessibility; }"...
PASS: The injected WebInspectorAudit should hold an instance of InspectorAuditAccessibilityObject.
Audit teardown...
-- Running test case: Audit.run.Valid.InjectedObject.DOM
Audit setup...
Audit run "function() { return WebInspectorAudit.DOM; }"...
PASS: The injected WebInspectorAudit should hold an instance of InspectorAuditDOMObject.
Audit teardown...
-- Running test case: Audit.run.Valid.InjectedObject.Resources
Audit setup...
Audit run "function() { return WebInspectorAudit.Resources; }"...
PASS: The injected WebInspectorAudit should hold an instance of InspectorAuditResourcesObject.
Audit teardown...
-- Running test case: Audit.run.Valid.InjectedObject.Version
Audit setup...
Audit run "function() { return WebInspectorAudit.Version; }"...
PASS: The injected WebInspectorAudit should hold the current Audit::Version.
Audit teardown...
-- Running test case: Audit.run.Invalid
TypeError: eval(`(42)`) is not a function. (In 'eval(`(42)`)(WebInspectorAudit)', 'eval(`(42)`)' is 42)