blob: b1fd72d36606bb0cfc97de5ca5383fc335c82f17 [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.Invalid
TypeError: eval(`(42)`) is not a function. (In 'eval(`(42)`)(WebInspectorAudit)', 'eval(`(42)`)' is 42)