WebKit Bugzilla
Attachment 370677 Details for
Bug 198270
: Web Inspector: Audit: tests are unable to get the current Audit version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198270-20190527012110.patch (text/plain), 6.96 KB, created by
Devin Rousso
on 2019-05-27 01:21:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-05-27 01:21:11 PDT
Size:
6.96 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index df5adc4cc725fa461b2ac8974f772558f11a5455..0d79f3bb870d25e32967757fab63974f39e4aa52 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-05-27 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: tests are unable to get the current Audit version >+ https://bugs.webkit.org/show_bug.cgi?id=198270 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Expose the Audit version number through the `WebInspectorObject` that's injected into tests >+ so that they can decide at runtime whether they're supported (e.g. the `unsupported` result). >+ >+ * inspector/agents/InspectorAuditAgent.h: >+ * inspector/agents/InspectorAuditAgent.cpp: >+ (Inspector::InspectorAuditAgent::populateAuditObject): >+ > 2019-05-25 Tadeu Zagallo <tzagallo@apple.com> > > JITOperations getByVal should mark negative array indices as out-of-bounds >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp >index 86d6731447ac94e3193dfa297df7bfb51a7c19df..bb47b8edb20a0ebe70e2b0abfeb144e4f0186e97 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp >@@ -130,4 +130,15 @@ bool InspectorAuditAgent::hasActiveAudit() const > return !!m_injectedWebInspectorAuditValue; > } > >+void InspectorAuditAgent::populateAuditObject(JSC::ExecState* execState, JSC::Strong<JSC::JSObject>& auditObject) >+{ >+ ASSERT(execState); >+ if (!execState) >+ return; >+ >+ JSC::JSLockHolder lock(execState); >+ >+ auditObject->putDirect(execState->vm(), JSC::Identifier::fromString(execState, "Version"), JSValue(Inspector::Protocol::Audit::VERSION)); >+} >+ > } // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h >index 44a8ff926449f2de275de721fcab2893cc7436c6..abaef8621495aed6d4e559b289133c2f9ce7c35c 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h >+++ b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h >@@ -63,7 +63,7 @@ protected: > > virtual InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) = 0; > >- virtual void populateAuditObject(JSC::ExecState*, JSC::Strong<JSC::JSObject>& /* auditObject */) { }; >+ virtual void populateAuditObject(JSC::ExecState*, JSC::Strong<JSC::JSObject>& auditObject); > > virtual void muteConsole() { }; > virtual void unmuteConsole() { }; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 939ec2c512bb47ff62abdbb7d5b660f4c8538bdf..666ddee244fbec4ccdec73cc6f7f7ee95f40ba70 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-27 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: tests are unable to get the current Audit version >+ https://bugs.webkit.org/show_bug.cgi?id=198270 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/audit/run.html: >+ * inspector/audit/run-expected.txt: >+ * inspector/audit/version.html: >+ > 2019-05-25 Youenn Fablet <youenn@apple.com> > > media/video-remote-control-playpause.html is timing out after r245712 >diff --git a/LayoutTests/inspector/audit/run-expected.txt b/LayoutTests/inspector/audit/run-expected.txt >index b1fd72d36606bb0cfc97de5ca5383fc335c82f17..33362f91043807d3a7defdc5aa0f68e3a7a70825 100644 >--- a/LayoutTests/inspector/audit/run-expected.txt >+++ b/LayoutTests/inspector/audit/run-expected.txt >@@ -38,6 +38,18 @@ 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 InspectorAuditDOMObject. >+Audit teardown... >+ >+-- Running test case: Audit.run.Valid.InjectedObject.Version >+Audit setup... >+Audit run "function() { return WebInspectorAudit.Version; }"... >+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) > >diff --git a/LayoutTests/inspector/audit/run.html b/LayoutTests/inspector/audit/run.html >index d15b718dc70c125d307a8e82d3fa9f0bf829c2ce..dc0cc0b85d4fa419d7407e6d8ad0a8235936e23e 100644 >--- a/LayoutTests/inspector/audit/run.html >+++ b/LayoutTests/inspector/audit/run.html >@@ -91,6 +91,30 @@ function test() > }, > }); > >+ suite.addTestCase({ >+ name: "Audit.run.Valid.InjectedObject.Resources", >+ description: "Check that the injected object holds an instance of InspectorAuditResourcesObject.", >+ async test() { >+ await InspectorTest.Audit.setupAudit(); >+ await auditRun(`function() { return WebInspectorAudit.Resources; }`, (result) => { >+ InspectorTest.expectEqual(result.description, "InspectorAuditDOMObject", "The injected WebInspectorAudit should hold an instance of InspectorAuditResourcesObject."); >+ }); >+ await InspectorTest.Audit.teardownAudit(); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Valid.InjectedObject.Version", >+ description: "Check that the injected object holds the current Audit::VERSION value.", >+ async test() { >+ await InspectorTest.Audit.setupAudit(); >+ await auditRun(`function() { return WebInspectorAudit.Version; }`, (result) => { >+ InspectorTest.expectEqual(result.description, InspectorBackend.domains.Audit.VERSION, "The injected WebInspectorAudit should hold the current Audit::Version."); >+ }); >+ await InspectorTest.Audit.teardownAudit(); >+ }, >+ }); >+ > suite.addTestCase({ > name: "Audit.run.Invalid", > description: "Check that an error is thrown when trying to execute a non-function.", >diff --git a/LayoutTests/inspector/audit/version.html b/LayoutTests/inspector/audit/version.html >index 1ba10538d8d40ecbade62fad73ffcc0a567d98e0..57de58b175d9c349f145e8bf17b753cd39a0210a 100644 >--- a/LayoutTests/inspector/audit/version.html >+++ b/LayoutTests/inspector/audit/version.html >@@ -11,7 +11,7 @@ function test() > name: "Audit.VERSION.MatchesFrontend", > description: "Check that the audit system version is in sync with the frontend version.", > test() { >- InspectorTest.expectEqual(AuditAgent.VERSION, WI.AuditTestBase.Version, "The audit system version should match the frontend version."); >+ InspectorTest.expectEqual(InspectorBackend.domains.Audit.VERSION, WI.AuditTestBase.Version, "The audit system version should match the frontend version."); > return true; > }, > });
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198270
:
370675
|
370676
|
370677
|
370678
|
370682
|
370684
|
370686
|
370700