Changeset 245909 in webkit
- Timestamp:
- May 30, 2019, 4:15:09 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/inspector/audit/run-expected.txt (modified) (1 diff)
-
LayoutTests/inspector/audit/run.html (modified) (1 diff)
-
LayoutTests/inspector/audit/version.html (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp (modified) (1 diff)
-
Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245905 r245909 1 2019-05-30 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Audit: tests are unable to get the current Audit version 4 https://bugs.webkit.org/show_bug.cgi?id=198270 5 6 Reviewed by Timothy Hatcher. 7 8 * inspector/audit/run.html: 9 * inspector/audit/run-expected.txt: 10 * inspector/audit/version.html: 11 1 12 2019-05-30 Justin Fan <justin_fan@apple.com> 2 13 -
trunk/LayoutTests/inspector/audit/run-expected.txt
r239976 r245909 39 39 Audit teardown... 40 40 41 -- Running test case: Audit.run.Valid.InjectedObject.Resources 42 Audit setup... 43 Audit run "function() { return WebInspectorAudit.Resources; }"... 44 PASS: The injected WebInspectorAudit should hold an instance of InspectorAuditResourcesObject. 45 Audit teardown... 46 47 -- Running test case: Audit.run.Valid.InjectedObject.Version 48 Audit setup... 49 Audit run "function() { return WebInspectorAudit.Version; }"... 50 PASS: The injected WebInspectorAudit should hold the current Audit::Version. 51 Audit teardown... 52 41 53 -- Running test case: Audit.run.Invalid 42 54 TypeError: eval(`(42)`) is not a function. (In 'eval(`(42)`)(WebInspectorAudit)', 'eval(`(42)`)' is 42) -
trunk/LayoutTests/inspector/audit/run.html
r239976 r245909 93 93 94 94 suite.addTestCase({ 95 name: "Audit.run.Valid.InjectedObject.Resources", 96 description: "Check that the injected object holds an instance of InspectorAuditResourcesObject.", 97 async test() { 98 await InspectorTest.Audit.setupAudit(); 99 await auditRun(`function() { return WebInspectorAudit.Resources; }`, (result) => { 100 InspectorTest.expectEqual(result.description, "InspectorAuditResourcesObject", "The injected WebInspectorAudit should hold an instance of InspectorAuditResourcesObject."); 101 }); 102 await InspectorTest.Audit.teardownAudit(); 103 }, 104 }); 105 106 suite.addTestCase({ 107 name: "Audit.run.Valid.InjectedObject.Version", 108 description: "Check that the injected object holds the current Audit::VERSION value.", 109 async test() { 110 await InspectorTest.Audit.setupAudit(); 111 await auditRun(`function() { return WebInspectorAudit.Version; }`, (result) => { 112 InspectorTest.expectEqual(result.value, InspectorBackend.domains.Audit.VERSION, "The injected WebInspectorAudit should hold the current Audit::Version."); 113 }); 114 await InspectorTest.Audit.teardownAudit(); 115 }, 116 }); 117 118 suite.addTestCase({ 95 119 name: "Audit.run.Invalid", 96 120 description: "Check that an error is thrown when trying to execute a non-function.", -
trunk/LayoutTests/inspector/audit/version.html
r240469 r245909 12 12 description: "Check that the audit system version is in sync with the frontend version.", 13 13 test() { 14 InspectorTest.expectEqual( AuditAgent.VERSION, WI.AuditTestBase.Version, "The audit system version should match the frontend version.");14 InspectorTest.expectEqual(InspectorBackend.domains.Audit.VERSION, WI.AuditTestBase.Version, "The audit system version should match the frontend version."); 15 15 return true; 16 16 }, -
trunk/Source/JavaScriptCore/ChangeLog
r245906 r245909 1 2019-05-30 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Audit: tests are unable to get the current Audit version 4 https://bugs.webkit.org/show_bug.cgi?id=198270 5 6 Reviewed by Timothy Hatcher. 7 8 Expose the Audit version number through the `WebInspectorObject` that's injected into tests 9 so that they can decide at runtime whether they're supported (e.g. the `unsupported` result). 10 11 * inspector/agents/InspectorAuditAgent.h: 12 * inspector/agents/InspectorAuditAgent.cpp: 13 (Inspector::InspectorAuditAgent::populateAuditObject): 14 1 15 2019-05-30 Tadeu Zagallo <tzagallo@apple.com> and Yusuke Suzuki <ysuzuki@apple.com> 2 16 -
trunk/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp
r239976 r245909 131 131 } 132 132 133 void InspectorAuditAgent::populateAuditObject(JSC::ExecState* execState, JSC::Strong<JSC::JSObject>& auditObject) 134 { 135 ASSERT(execState); 136 if (!execState) 137 return; 138 139 JSC::JSLockHolder lock(execState); 140 141 auditObject->putDirect(execState->vm(), JSC::Identifier::fromString(execState, "Version"), JSC::JSValue(Inspector::Protocol::Audit::VERSION)); 142 } 143 133 144 } // namespace Inspector -
trunk/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h
r239976 r245909 64 64 virtual InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) = 0; 65 65 66 virtual void populateAuditObject(JSC::ExecState*, JSC::Strong<JSC::JSObject>& /* auditObject */) { };66 virtual void populateAuditObject(JSC::ExecState*, JSC::Strong<JSC::JSObject>& auditObject); 67 67 68 68 virtual void muteConsole() { };
Note:
See TracChangeset
for help on using the changeset viewer.