WebKit Bugzilla
Attachment 358843 Details for
Bug 193149
: Web Inspector: Audit: create new IDL type for exposing special functionality in test context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193149-20190110162732.patch (text/plain), 134.48 KB, created by
Devin Rousso
on 2019-01-10 15:27:33 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-01-10 15:27:33 PST
Size:
134.48 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index d01619c953099ed90c313fe3758a04aa4fc0d22a..e3795316dad759ba4b506c06777f7d1b0de72167 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,67 @@ >+2019-01-10 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: create new IDL type for exposing special functionality in test context >+ https://bugs.webkit.org/show_bug.cgi?id=193149 >+ <rdar://problem/46801218> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Create a new `AuditAgent` (and various subclasses for different inspection targets) >+ >+ * inspector/protocol/Audit.json: Added. >+ Add a `run` command that is a simpler version of `Runtime.evaluate`, except that it expects >+ a function string instead of an arbitrary JavaScript expression. >+ Add `setup` and `teardown` commands that create a JavaScript object that will be passed in >+ to the test as an argument. Keep this object alive so that tests can add to the object and >+ have later tests use what was added. >+ >+ * inspector/agents/InspectorAuditAgent.h: Added. >+ * inspector/agents/InspectorAuditAgent.cpp: Added. >+ (Inspector::InspectorAuditAgent::InspectorAuditAgent): >+ (Inspector::InspectorAuditAgent::didCreateFrontendAndBackend): >+ (Inspector::InspectorAuditAgent::willDestroyFrontendAndBackend): >+ (Inspector::InspectorAuditAgent::setup): >+ (Inspector::InspectorAuditAgent::run): >+ (Inspector::InspectorAuditAgent::teardown): >+ (Inspector::InspectorAuditAgent::hasActiveAudit): >+ (Inspector::InspectorAuditAgent::runArguments): >+ >+ * inspector/agents/JSGlobalObjectAuditAgent.h: Added. >+ * inspector/agents/JSGlobalObjectAuditAgent.cpp: Added. >+ (Inspector::JSGlobalObjectAuditAgent::JSGlobalObjectAuditAgent): >+ (Inspector::JSGlobalObjectAuditAgent::injectedScriptForEval): >+ >+ * inspector/JSGlobalObjectInspectorController.h: >+ * inspector/JSGlobalObjectInspectorController.cpp: >+ (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController): >+ (Inspector::JSGlobalObjectInspectorController::connectFrontend): >+ (Inspector::JSGlobalObjectInspectorController::jsAgentContext): Added. >+ (Inspector::JSGlobalObjectInspectorController::createLazyAgents): Added. >+ >+ * inspector/InjectedScript.h: >+ * inspector/InjectedScript.cpp: >+ (Inspector::InjectedScript::execute): Added. >+ (Inspector::InjectedScript::arrayFromVector): Added. >+ Create a version of `evaluate` that accepts a list of values to be passed in as arguments >+ to the function that was created by the `eval` of the given `functionString`. >+ >+ * inspector/InjectedScriptSource.js: >+ (InjectedScript.prototype.execute): Added. >+ (InjectedScript.prototype.evaluate): >+ (InjectedScript.prototype.evaluateOnCallFrame): >+ (InjectedScript.prototype._evaluateAndWrap): >+ (InjectedScript.prototype._wrapAndSaveCall): Added. >+ (InjectedScript.prototype._wrapCall): Added. >+ (InjectedScript.prototype._evaluateOn): >+ Refactor the `eval` and `saveResult` logic to allow for more flexibility for other callers. >+ >+ * CMakeLists.txt: >+ * DerivedSources-input.xcfilelist: >+ * DerivedSources.make: >+ * JavaScriptCore.xcodeproj/project.pbxproj: >+ * Sources.txt: >+ * UnifiedSources-input.xcfilelist: >+ > 2019-01-09 Mark Lam <mark.lam@apple.com> > > Restore bytecode dumper's ability to dump jump target as offset#(->targetBytecodeIndex#). >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 91dffd13cebfba59723abc8f9632a8beb670df4c..c05068dc0038b18ba00e70fe7ee648ae6743bff9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,58 @@ >+2019-01-10 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: create new IDL type for exposing special functionality in test context >+ https://bugs.webkit.org/show_bug.cgi?id=193149 >+ <rdar://problem/46801218> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Tests: inspector/audit/run.html >+ inspector/audit/setup.html >+ inspector/audit/teardown.html >+ >+ Create a new `AuditAgent` (and various subclasses for different inspection targets), as well >+ as `InspectorAuditAccessibilityUtilities` and `InspectorAuditDOMUtilities` objects that will >+ be injected into the test function to allow for more advanced testing. >+ >+ * inspector/InspectorAuditAccessibilityUtilities.h: Added. >+ (WebCore::InspectorAuditAccessibilityUtilities::create): >+ * inspector/InspectorAuditAccessibilityUtilities.cpp: Added. >+ (WebCore::InspectorAuditAccessibilityUtilities::InspectorAuditAccessibilityUtilities): >+ * inspector/InspectorAuditAccessibilityUtilities.idl: Added. >+ >+ * inspector/InspectorAuditDOMUtilities.h: Added. >+ (WebCore::InspectorAuditDOMUtilities::create): >+ * inspector/InspectorAuditDOMUtilities.cpp: Added. >+ (WebCore::InspectorAuditDOMUtilities::InspectorAuditDOMUtilities): >+ * inspector/InspectorAuditDOMUtilities.idl: Added. >+ >+ * inspector/agents/page/PageAuditAgent.h: Added. >+ * inspector/agents/page/PageAuditAgent.cpp: Added. >+ (WebCore::PageAuditAgent::PageAuditAgent): >+ (WebCore::PageAuditAgent::injectedScriptForEval): >+ (WebCore::PageAuditAgent::runArguments): >+ (WebCore::PageAuditAgent::muteConsole): >+ (WebCore::PageAuditAgent::unmuteConsole): >+ >+ * inspector/agents/worker/WorkerAuditAgent.h: Added. >+ * inspector/agents/worker/WorkerAuditAgent.cpp: Added. >+ (WebCore::WorkerAuditAgent::WorkerAuditAgent): >+ (WebCore::WorkerAuditAgent::injectedScriptForEval): >+ >+ * inspector/InspectorController.cpp: >+ (WebCore::InspectorController::createLazyAgents): >+ >+ * inspector/WorkerInspectorController.cpp: >+ (WebCore::WorkerInspectorController::createLazyAgents): >+ >+ * CMakeLists.txt: >+ * DerivedSources-input.xcfilelist: >+ * DerivedSources-output.xcfilelist: >+ * DerivedSources.make: >+ * Sources.txt: >+ * UnifiedSources-input.xcfilelist: >+ * WebCore.xcodeproj/project.pbxproj: >+ > 2019-01-09 Alex Christensen <achristensen@webkit.org> > > REGRESSION(239737) iOS quicklook tests should not dereference null >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 1015bffbcced2e70707665e8d8df79b60ad5ce4b..8ca34ff7d602d62586a6265328e68efa1fdd98de 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,24 @@ >+2019-01-10 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: create new IDL type for exposing special functionality in test context >+ https://bugs.webkit.org/show_bug.cgi?id=193149 >+ <rdar://problem/46801218> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add `AuditAgent` getters and plumbing. >+ >+ * UserInterface/Protocol/Target.js: >+ (WI.Target.prototype.get AuditAgent): Added. >+ >+ * UserInterface/Models/AuditTestCase.js: >+ (WI.AuditTestCase.prototype.async run): >+ >+ * UserInterface/Controllers/AuditManager.js: >+ (WI.AuditManager.prototype.async start): >+ >+ * .eslintrc: >+ > 2019-01-09 Devin Rousso <drousso@apple.com> > > Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open >diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt >index 79cab0b978bb9c8ebcdcc64ce2c93b09c34953c5..555ac6cabf8f6ed202394ea58c24b03bd512885f 100644 >--- a/Source/JavaScriptCore/CMakeLists.txt >+++ b/Source/JavaScriptCore/CMakeLists.txt >@@ -634,6 +634,7 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS > inspector/ScriptDebugServer.h > > inspector/agents/InspectorAgent.h >+ inspector/agents/InspectorAuditAgent.h > inspector/agents/InspectorConsoleAgent.h > inspector/agents/InspectorDebuggerAgent.h > inspector/agents/InspectorHeapAgent.h >@@ -1063,6 +1064,7 @@ set(JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS > > set(JavaScriptCore_INSPECTOR_DOMAINS > ${JAVASCRIPTCORE_DIR}/inspector/protocol/ApplicationCache.json >+ ${JAVASCRIPTCORE_DIR}/inspector/protocol/Audit.json > ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json > ${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json > ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json >diff --git a/Source/JavaScriptCore/DerivedSources-input.xcfilelist b/Source/JavaScriptCore/DerivedSources-input.xcfilelist >index 583b1935c547e948e1b8ac78e23e4727af6dda79..20e86fdf50858e604e96e5099563cebb22388184 100644 >--- a/Source/JavaScriptCore/DerivedSources-input.xcfilelist >+++ b/Source/JavaScriptCore/DerivedSources-input.xcfilelist >@@ -76,6 +76,7 @@ $(PROJECT_DIR)/generator/Type.rb > $(PROJECT_DIR)/generator/main.rb > $(PROJECT_DIR)/inspector/InjectedScriptSource.js > $(PROJECT_DIR)/inspector/protocol/ApplicationCache.json >+$(PROJECT_DIR)/inspector/protocol/Audit.json > $(PROJECT_DIR)/inspector/protocol/CSS.json > $(PROJECT_DIR)/inspector/protocol/Canvas.json > $(PROJECT_DIR)/inspector/protocol/Console.json >diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make >index f8435aec78c28d2ce4dafc5ee241771aa6706af8..47d25172e8e5384503ed5c55a8a4d8a2868319b2 100644 >--- a/Source/JavaScriptCore/DerivedSources.make >+++ b/Source/JavaScriptCore/DerivedSources.make >@@ -227,6 +227,7 @@ $(BYTECODE_FILES_PATTERNS): $(wildcard $(JavaScriptCore)/generator/*.rb) $(JavaS > > INSPECTOR_DOMAINS := \ > $(JavaScriptCore)/inspector/protocol/ApplicationCache.json \ >+ $(JavaScriptCore)/inspector/protocol/Audit.json \ > $(JavaScriptCore)/inspector/protocol/CSS.json \ > $(JavaScriptCore)/inspector/protocol/Canvas.json \ > $(JavaScriptCore)/inspector/protocol/Console.json \ >diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >index 02c352f10a27082f58e338d96e5b2ec55e709f66..dec03082c48144177b66babf863971ad1e1e58e1 100644 >--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >@@ -1243,6 +1243,8 @@ > 8BC064961E1D845C00B2B8CA /* AsyncIteratorPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC064941E1D828B00B2B8CA /* AsyncIteratorPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = 90213E3C123A40C200D422F3 /* MemoryStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 9064337DD4B0402BAF34A592 /* JSScriptFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA93C9590484C5BAD9316EA /* JSScriptFetcher.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 91278D5521DEB82600B57184 /* InspectorAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D5321DEB82500B57184 /* InspectorAuditAgent.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 91278D5821DEDA9600B57184 /* JSGlobalObjectAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D5621DEDA9400B57184 /* JSGlobalObjectAuditAgent.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93052C350FB792190048FDC3 /* ParserArena.h in Headers */ = {isa = PBXBuildFile; fileRef = 93052C330FB792190048FDC3 /* ParserArena.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */; }; > 932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EC0705C86C9A00E6DF1B /* libobjc.dylib */; }; >@@ -3933,6 +3935,10 @@ > 8BC064951E1D838B00B2B8CA /* AsyncIteratorPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = AsyncIteratorPrototype.js; sourceTree = "<group>"; }; > 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryStatistics.cpp; sourceTree = "<group>"; }; > 90213E3C123A40C200D422F3 /* MemoryStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryStatistics.h; sourceTree = "<group>"; }; >+ 91278D5221DEB82400B57184 /* InspectorAuditAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAuditAgent.cpp; sourceTree = "<group>"; }; >+ 91278D5321DEB82500B57184 /* InspectorAuditAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAuditAgent.h; sourceTree = "<group>"; }; >+ 91278D5621DEDA9400B57184 /* JSGlobalObjectAuditAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectAuditAgent.h; sourceTree = "<group>"; }; >+ 91278D5721DEDA9500B57184 /* JSGlobalObjectAuditAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectAuditAgent.cpp; sourceTree = "<group>"; }; > 93052C320FB792190048FDC3 /* ParserArena.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParserArena.cpp; sourceTree = "<group>"; }; > 93052C330FB792190048FDC3 /* ParserArena.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserArena.h; sourceTree = "<group>"; }; > 930DAD030FB1EB1A0082D205 /* NodeConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeConstructors.h; sourceTree = "<group>"; }; >@@ -7939,6 +7945,8 @@ > children = ( > A5CEEE12187F3BAD00E55C99 /* InspectorAgent.cpp */, > A5CEEE13187F3BAD00E55C99 /* InspectorAgent.h */, >+ 91278D5221DEB82400B57184 /* InspectorAuditAgent.cpp */, >+ 91278D5321DEB82500B57184 /* InspectorAuditAgent.h */, > A5FD007F189B191A00633231 /* InspectorConsoleAgent.cpp */, > A5FD0080189B191A00633231 /* InspectorConsoleAgent.h */, > A57D23E31890CEBF0031C7FA /* InspectorDebuggerAgent.cpp */, >@@ -7951,6 +7959,8 @@ > A55165D11BDEFDBD003B75C1 /* InspectorScriptProfilerAgent.h */, > A555FF3C2159D41E00FCD826 /* InspectorTargetAgent.cpp */, > A555FF3D2159D41E00FCD826 /* InspectorTargetAgent.h */, >+ 91278D5721DEDA9500B57184 /* JSGlobalObjectAuditAgent.cpp */, >+ 91278D5621DEDA9400B57184 /* JSGlobalObjectAuditAgent.h */, > A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */, > A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */, > A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */, >@@ -9077,6 +9087,7 @@ > A593CF7F1840362C00BFCE27 /* InspectorAgentBase.h in Headers */, > A593CF87184038CA00BFCE27 /* InspectorAgentRegistry.h in Headers */, > A5EA710E19F6DF810098F5EC /* InspectorAlternateBackendDispatchers.h in Headers */, >+ 91278D5521DEB82600B57184 /* InspectorAuditAgent.h in Headers */, > 996231E918D1804200C03FDA /* InspectorBackendCommands.js in Headers */, > A593CF7D1840360300BFCE27 /* InspectorBackendDispatcher.h in Headers */, > A532438818568335002ED692 /* InspectorBackendDispatchers.h in Headers */, >@@ -9234,6 +9245,7 @@ > 797E07AA1B8FCFB9008400BA /* JSGlobalLexicalEnvironment.h in Headers */, > BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */, > 996B731D1BDA08EF00331B84 /* JSGlobalObject.lut.h in Headers */, >+ 91278D5821DEDA9600B57184 /* JSGlobalObjectAuditAgent.h in Headers */, > A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */, > A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */, > A57D23EA1891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h in Headers */, >diff --git a/Source/JavaScriptCore/Sources.txt b/Source/JavaScriptCore/Sources.txt >index cba4c4ba6004f930d5ca8563310a6243e36449e5..39c996a387fea91e0ef9580a819684629daf7f23 100644 >--- a/Source/JavaScriptCore/Sources.txt >+++ b/Source/JavaScriptCore/Sources.txt >@@ -577,12 +577,14 @@ inspector/InspectorFrontendDispatchers.cpp > inspector/InspectorProtocolObjects.cpp > > inspector/agents/InspectorAgent.cpp >+inspector/agents/InspectorAuditAgent.cpp > inspector/agents/InspectorConsoleAgent.cpp > inspector/agents/InspectorDebuggerAgent.cpp > inspector/agents/InspectorHeapAgent.cpp > inspector/agents/InspectorRuntimeAgent.cpp > inspector/agents/InspectorScriptProfilerAgent.cpp > inspector/agents/InspectorTargetAgent.cpp >+inspector/agents/JSGlobalObjectAuditAgent.cpp > inspector/agents/JSGlobalObjectDebuggerAgent.cpp > inspector/agents/JSGlobalObjectRuntimeAgent.cpp > >diff --git a/Source/JavaScriptCore/UnifiedSources-input.xcfilelist b/Source/JavaScriptCore/UnifiedSources-input.xcfilelist >index a5a88cb9b397b7baa3bd19609e473acd3d072baa..e630d63d320f73f1615a78d464f55af81cea56ed 100644 >--- a/Source/JavaScriptCore/UnifiedSources-input.xcfilelist >+++ b/Source/JavaScriptCore/UnifiedSources-input.xcfilelist >@@ -544,12 +544,14 @@ $(SRCROOT)/inspector/ScriptCallStack.cpp > $(SRCROOT)/inspector/ScriptCallStackFactory.cpp > $(SRCROOT)/inspector/ScriptDebugServer.cpp > $(SRCROOT)/inspector/agents/InspectorAgent.cpp >+$(SRCROOT)/inspector/agents/InspectorAuditAgent.cpp > $(SRCROOT)/inspector/agents/InspectorConsoleAgent.cpp > $(SRCROOT)/inspector/agents/InspectorDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/InspectorHeapAgent.cpp > $(SRCROOT)/inspector/agents/InspectorRuntimeAgent.cpp > $(SRCROOT)/inspector/agents/InspectorScriptProfilerAgent.cpp > $(SRCROOT)/inspector/agents/InspectorTargetAgent.cpp >+$(SRCROOT)/inspector/agents/JSGlobalObjectAuditAgent.cpp > $(SRCROOT)/inspector/agents/JSGlobalObjectDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/JSGlobalObjectRuntimeAgent.cpp > $(SRCROOT)/inspector/remote/RemoteAutomationTarget.cpp >diff --git a/Source/JavaScriptCore/inspector/InjectedScript.cpp b/Source/JavaScriptCore/inspector/InjectedScript.cpp >index 0a5a6d7648141f4a916fd5d68a801771401713a4..942333154022556f2e262e037379fe45063611df 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScript.cpp >+++ b/Source/JavaScriptCore/inspector/InjectedScript.cpp >@@ -33,9 +33,11 @@ > #include "InjectedScript.h" > > #include "JSCInlines.h" >+#include "JSLock.h" > #include "ScriptFunctionCall.h" > #include "ScriptObject.h" > #include <wtf/JSONValues.h> >+#include <wtf/Vector.h> > #include <wtf/text/WTFString.h> > > namespace Inspector { >@@ -54,6 +56,19 @@ InjectedScript::~InjectedScript() > { > } > >+void InjectedScript::execute(ErrorString& errorString, const String& functionString, ExecuteOptions&& options, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex) >+{ >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "execute"_s, inspectorEnvironment()->functionCallHandler()); >+ function.appendArgument(functionString); >+ function.appendArgument(options.objectGroup); >+ function.appendArgument(options.includeCommandLineAPI); >+ function.appendArgument(options.returnByValue); >+ function.appendArgument(options.generatePreview); >+ function.appendArgument(options.saveResult); >+ function.appendArgument(arrayFromVector(WTFMove(options.args))); >+ makeEvalCall(errorString, function, result, wasThrown, savedResultIndex); >+} >+ > void InjectedScript::evaluate(ErrorString& errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex) > { > Deprecated::ScriptFunctionCall function(injectedScriptObject(), "evaluate"_s, inspectorEnvironment()->functionCallHandler()); >@@ -386,5 +401,23 @@ void InjectedScript::releaseObjectGroup(const String& objectGroup) > ASSERT(!hadException); > } > >+JSC::JSValue InjectedScript::arrayFromVector(Vector<JSC::JSValue>&& vector) >+{ >+ JSC::ExecState* execState = scriptState(); >+ if (!execState) >+ return JSC::jsUndefined(); >+ >+ JSC::JSLockHolder lock(execState); >+ >+ JSC::JSArray* array = JSC::constructEmptyArray(execState, nullptr); >+ if (!array) >+ return JSC::jsUndefined(); >+ >+ for (auto& item : vector) >+ array->putDirectIndex(execState, array->length(), item); >+ >+ return array; >+} >+ > } // namespace Inspector > >diff --git a/Source/JavaScriptCore/inspector/InjectedScript.h b/Source/JavaScriptCore/inspector/InjectedScript.h >index f2ba84231d458b521ee842a3672eec0b2873e146..a8db2d2819101d9e5d4e2323182e4a9e93ae2286 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScript.h >+++ b/Source/JavaScriptCore/inspector/InjectedScript.h >@@ -51,6 +51,16 @@ public: > InjectedScript(Deprecated::ScriptObject, InspectorEnvironment*); > virtual ~InjectedScript(); > >+ struct ExecuteOptions { >+ String objectGroup; >+ bool includeCommandLineAPI { false }; >+ bool returnByValue { false }; >+ bool generatePreview { false }; >+ bool saveResult { false }; >+ Vector<JSC::JSValue> args; >+ }; >+ void execute(ErrorString&, const String& functionString, ExecuteOptions&&, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex); >+ > void evaluate(ErrorString&, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex); > void awaitPromise(const String& promiseObjectId, bool returnByValue, bool generatePreview, bool saveResult, AsyncCallCallback&&); > void evaluateOnCallFrame(ErrorString&, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex); >@@ -79,6 +89,8 @@ public: > void releaseObjectGroup(const String& objectGroup); > > private: >+ JSC::JSValue arrayFromVector(Vector<JSC::JSValue>&&); >+ > friend class InjectedScriptModule; > }; > >diff --git a/Source/JavaScriptCore/inspector/InjectedScriptSource.js b/Source/JavaScriptCore/inspector/InjectedScriptSource.js >index 01c1abeb3e540b91af5e3b3ddbf19b3d8e5acd9a..813e9dc8f5d32fa119087f25f8251656c1e87ae8 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScriptSource.js >+++ b/Source/JavaScriptCore/inspector/InjectedScriptSource.js >@@ -103,9 +103,18 @@ let InjectedScript = class InjectedScript > > // InjectedScript C++ API > >- evaluate(expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview, saveResult) >+ execute(functionString, objectGroup, includeCommandLineAPI, returnByValue, generatePreview, saveResult, args) > { >- return this._evaluateAndWrap(InjectedScriptHost.evaluateWithScopeExtension, InjectedScriptHost, expression, objectGroup, false, injectCommandLineAPI, returnByValue, generatePreview, saveResult); >+ return this._wrapAndSaveCall(objectGroup, returnByValue, generatePreview, saveResult, () => { >+ const isEvalOnCallFrame = false; >+ return this._evaluateOn(InjectedScriptHost.evaluateWithScopeExtension, InjectedScriptHost, functionString, isEvalOnCallFrame, includeCommandLineAPI).apply(undefined, args); >+ }); >+ } >+ >+ evaluate(expression, objectGroup, includeCommandLineAPI, returnByValue, generatePreview, saveResult) >+ { >+ const isEvalOnCallFrame = false; >+ return this._evaluateAndWrap(InjectedScriptHost.evaluateWithScopeExtension, InjectedScriptHost, expression, objectGroup, isEvalOnCallFrame, includeCommandLineAPI, returnByValue, generatePreview, saveResult); > } > > awaitPromise(promiseObjectId, returnByValue, generatePreview, saveResult, callback) >@@ -145,12 +154,13 @@ let InjectedScript = class InjectedScript > promiseObject.then(resolve, reject); > } > >- evaluateOnCallFrame(topCallFrame, callFrameId, expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview, saveResult) >+ evaluateOnCallFrame(topCallFrame, callFrameId, expression, objectGroup, includeCommandLineAPI, returnByValue, generatePreview, saveResult) > { > let callFrame = this._callFrameForId(topCallFrame, callFrameId); > if (!callFrame) > return "Could not find call frame with given id"; >- return this._evaluateAndWrap(callFrame.evaluateWithScopeExtension, callFrame, expression, objectGroup, true, injectCommandLineAPI, returnByValue, generatePreview, saveResult); >+ const isEvalOnCallFrame = true; >+ return this._evaluateAndWrap(callFrame.evaluateWithScopeExtension, callFrame, expression, objectGroup, isEvalOnCallFrame, includeCommandLineAPI, returnByValue, generatePreview, saveResult); > } > > callFunctionOn(objectId, expression, args, returnByValue, generatePreview) >@@ -501,14 +511,31 @@ let InjectedScript = class InjectedScript > }; > } > >- _evaluateAndWrap(evalFunction, object, expression, objectGroup, isEvalOnCallFrame, injectCommandLineAPI, returnByValue, generatePreview, saveResult) >+ _evaluateAndWrap(evalFunction, object, expression, objectGroup, isEvalOnCallFrame, includeCommandLineAPI, returnByValue, generatePreview, saveResult) >+ { >+ return this._wrapAndSaveCall(objectGroup, returnByValue, generatePreview, saveResult, () => { >+ return this._evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, includeCommandLineAPI); >+ }); >+ } >+ >+ _wrapAndSaveCall(objectGroup, returnByValue, generatePreview, saveResult, func) >+ { >+ return this._wrapCall(objectGroup, returnByValue, generatePreview, saveResult, () => { >+ let result = func(); >+ if (saveResult) >+ this._saveResult(result); >+ return result; >+ }); >+ } >+ >+ _wrapCall(objectGroup, returnByValue, generatePreview, saveResult, func) > { > try { > this._savedResultIndex = 0; > > let returnObject = { > wasThrown: false, >- result: RemoteObject.create(this._evaluateOn(evalFunction, object, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI, saveResult), objectGroup, returnByValue, generatePreview) >+ result: RemoteObject.create(func(), objectGroup, returnByValue, generatePreview) > }; > > if (saveResult && this._savedResultIndex) >@@ -520,20 +547,17 @@ let InjectedScript = class InjectedScript > } > } > >- _evaluateOn(evalFunction, object, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI, saveResult) >+ _evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, includeCommandLineAPI) > { > let commandLineAPI = null; >- if (injectCommandLineAPI) { >+ if (includeCommandLineAPI) { > if (this.CommandLineAPI) > commandLineAPI = new this.CommandLineAPI(this._commandLineAPIImpl, isEvalOnCallFrame ? object : null); > else > commandLineAPI = new BasicCommandLineAPI(isEvalOnCallFrame ? object : null); > } > >- let result = evalFunction.call(object, expression, commandLineAPI); >- if (saveResult) >- this._saveResult(result); >- return result; >+ return evalFunction.call(object, expression, commandLineAPI); > } > > _callFrameForId(topCallFrame, callFrameId) >diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >index ad45f6f5303ca8dc41ad776a9fc7c8457548d5a1..0e62aa40e8725bfcdb0f655ca87a5a4427a8dcf8 100644 >--- a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >+++ b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >@@ -42,6 +42,7 @@ > #include "InspectorScriptProfilerAgent.h" > #include "JSCInlines.h" > #include "JSGlobalObject.h" >+#include "JSGlobalObjectAuditAgent.h" > #include "JSGlobalObjectConsoleClient.h" > #include "JSGlobalObjectDebuggerAgent.h" > #include "JSGlobalObjectRuntimeAgent.h" >@@ -68,17 +69,7 @@ JSGlobalObjectInspectorController::JSGlobalObjectInspectorController(JSGlobalObj > , m_frontendRouter(FrontendRouter::create()) > , m_backendDispatcher(BackendDispatcher::create(m_frontendRouter.copyRef())) > { >- AgentContext baseContext = { >- *this, >- *m_injectedScriptManager, >- m_frontendRouter.get(), >- m_backendDispatcher.get() >- }; >- >- JSAgentContext context = { >- baseContext, >- globalObject >- }; >+ auto context = jsAgentContext(); > > auto inspectorAgent = std::make_unique<InspectorAgent>(context); > auto runtimeAgent = std::make_unique<JSGlobalObjectRuntimeAgent>(context); >@@ -124,6 +115,8 @@ void JSGlobalObjectInspectorController::connectFrontend(FrontendChannel& fronten > m_isAutomaticInspection = isAutomaticInspection; > m_pauseAfterInitialization = immediatelyPause; > >+ createLazyAgents(); >+ > bool connectedFirstFrontend = !m_frontendRouter->hasFrontends(); > m_frontendRouter->connectFrontend(frontendChannel); > >@@ -295,4 +288,33 @@ void JSGlobalObjectInspectorController::appendExtraAgent(std::unique_ptr<Inspect > } > #endif > >+JSAgentContext JSGlobalObjectInspectorController::jsAgentContext() >+{ >+ AgentContext baseContext = { >+ *this, >+ *m_injectedScriptManager, >+ m_frontendRouter.get(), >+ m_backendDispatcher.get() >+ }; >+ >+ JSAgentContext context = { >+ baseContext, >+ m_globalObject >+ }; >+ >+ return context; >+} >+ >+void JSGlobalObjectInspectorController::createLazyAgents() >+{ >+ if (m_didCreateLazyAgents) >+ return; >+ >+ m_didCreateLazyAgents = true; >+ >+ auto context = jsAgentContext(); >+ >+ m_agents.append(std::make_unique<JSGlobalObjectAuditAgent>(context)); >+} >+ > } // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h >index c2188d8bc47dee383c03f20c0c59317092f9fe05..1aa05b5d1863fd29a64b0f25309f373afb649786 100644 >--- a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h >+++ b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h >@@ -55,6 +55,7 @@ class InspectorDebuggerAgent; > class InspectorScriptProfilerAgent; > class JSGlobalObjectConsoleClient; > class ScriptCallStack; >+struct JSAgentContext; > > class JSGlobalObjectInspectorController final > : public InspectorEnvironment >@@ -103,6 +104,9 @@ public: > private: > void appendAPIBacktrace(ScriptCallStack&); > >+ JSAgentContext jsAgentContext(); >+ void createLazyAgents(); >+ > JSC::JSGlobalObject& m_globalObject; > std::unique_ptr<InjectedScriptManager> m_injectedScriptManager; > std::unique_ptr<JSGlobalObjectConsoleClient> m_consoleClient; >@@ -124,6 +128,7 @@ private: > bool m_includeNativeCallStackWithExceptions { true }; > bool m_isAutomaticInspection { false }; > bool m_pauseAfterInitialization { false }; >+ bool m_didCreateLazyAgents { false }; > > #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) > AugmentableInspectorControllerClient* m_augmentingClient { nullptr }; >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..308d45df4031f5fb5f53df0d70df30917655bebc >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp >@@ -0,0 +1,143 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "InspectorAuditAgent.h" >+ >+#include "InjectedScript.h" >+#include "InjectedScriptManager.h" >+#include "JSLock.h" >+#include "ObjectConstructor.h" >+#include "ScriptDebugServer.h" >+#include <wtf/RefPtr.h> >+#include <wtf/Vector.h> >+#include <wtf/text/StringBuilder.h> >+#include <wtf/text/WTFString.h> >+ >+namespace Inspector { >+ >+using namespace JSC; >+ >+InspectorAuditAgent::InspectorAuditAgent(AgentContext& context) >+ : InspectorAgentBase("Audit"_s) >+ , m_backendDispatcher(AuditBackendDispatcher::create(context.backendDispatcher, this)) >+ , m_injectedScriptManager(context.injectedScriptManager) >+ , m_scriptDebugServer(context.environment.scriptDebugServer()) >+{ >+} >+ >+void InspectorAuditAgent::didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*) >+{ >+} >+ >+void InspectorAuditAgent::willDestroyFrontendAndBackend(DisconnectReason) >+{ >+} >+ >+void InspectorAuditAgent::setup(ErrorString& errorString, const int* executionContextId) >+{ >+ if (hasActiveAudit()) { >+ errorString = "Must call teardown before calling setup again."_s; >+ return; >+ } >+ >+ InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId); >+ if (injectedScript.hasNoValue()) >+ return; >+ >+ JSC::ExecState* execState = injectedScript.scriptState(); >+ if (!execState) { >+ errorString = "Missing execution state for injected script."_s; >+ return; >+ } >+ >+ VM& vm = execState->vm(); >+ >+ JSC::JSLockHolder lock(execState); >+ >+ m_injectedAUDITValue.set(vm, constructEmptyObject(execState)); >+ if (!m_injectedAUDITValue) { >+ errorString = "Unable to construct injected AUDIT object."_s; >+ return; >+ } >+ >+ for (auto& argument : runArguments(executionContextId)) >+ m_injectedAUDITValue->putDirect(vm, Identifier::fromString(execState, argument.first), argument.second); >+} >+ >+void InspectorAuditAgent::run(ErrorString& errorString, const String& test, const int* executionContextId, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown) >+{ >+ InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId); >+ if (injectedScript.hasNoValue()) >+ return; >+ >+ StringBuilder functionString; >+ functionString.appendLiteral("(function("); >+ if (m_injectedAUDITValue) >+ functionString.appendLiteral("AUDIT"); >+ functionString.appendLiteral(") { \"use strict\"; return eval(`("); >+ functionString.append(test.isolatedCopy().replace('`', "\\`")); >+ functionString.appendLiteral(")`)(); })"); >+ >+ InjectedScript::ExecuteOptions options; >+ options.objectGroup = "audit"_s; >+ options.includeCommandLineAPI = true; >+ if (m_injectedAUDITValue) >+ options.args = { m_injectedAUDITValue.get() }; >+ >+ Optional<int> savedResultIndex; >+ >+ ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = m_scriptDebugServer.pauseOnExceptionsState(); >+ >+ m_scriptDebugServer.setPauseOnExceptionsState(ScriptDebugServer::DontPauseOnExceptions); >+ muteConsole(); >+ >+ injectedScript.execute(errorString, functionString.toString(), WTFMove(options), result, wasThrown, savedResultIndex); >+ >+ unmuteConsole(); >+ m_scriptDebugServer.setPauseOnExceptionsState(previousPauseOnExceptionsState); >+} >+ >+void InspectorAuditAgent::teardown(ErrorString& errorString) >+{ >+ if (!hasActiveAudit()) { >+ errorString = "Must call setup before calling teardown."_s; >+ return; >+ } >+ >+ m_injectedAUDITValue.clear(); >+} >+ >+bool InspectorAuditAgent::hasActiveAudit() const >+{ >+ return !!m_injectedAUDITValue; >+} >+ >+Vector<std::pair<String, JSC::JSValue>> InspectorAuditAgent::runArguments(const int* /* executionContextId */) >+{ >+ return { }; >+} >+ >+} // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..5dd4fa2b1d4d424103630344b3bbb552bbd7d087 >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h >@@ -0,0 +1,79 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "InspectorAgentBase.h" >+#include "InspectorBackendDispatchers.h" >+#include "JSCInlines.h" >+#include <wtf/FastMalloc.h> >+#include <wtf/Forward.h> >+#include <wtf/Noncopyable.h> >+ >+namespace Inspector { >+ >+class InjectedScript; >+class InjectedScriptManager; >+class ScriptDebugServer; >+typedef String ErrorString; >+ >+class JS_EXPORT_PRIVATE InspectorAuditAgent : public InspectorAgentBase, public AuditBackendDispatcherHandler { >+ WTF_MAKE_NONCOPYABLE(InspectorAuditAgent); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ virtual ~InspectorAuditAgent() = default; >+ >+ // InspectorAgentBase >+ void didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*) override; >+ void willDestroyFrontendAndBackend(DisconnectReason) override; >+ >+ // AuditBackendDispatcherHandler >+ void setup(ErrorString&, const int* executionContextId) final; >+ void run(ErrorString&, const String& test, const int* executionContextId, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown) final; >+ void teardown(ErrorString&) final; >+ >+ bool hasActiveAudit() const; >+ >+protected: >+ explicit InspectorAuditAgent(AgentContext&); >+ >+ InjectedScriptManager& injectedScriptManager() { return m_injectedScriptManager; } >+ >+ virtual InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) = 0; >+ >+ virtual Vector<std::pair<String, JSC::JSValue>> runArguments(const int* executionContextId); >+ >+ virtual void muteConsole() { }; >+ virtual void unmuteConsole() { }; >+ >+private: >+ RefPtr<AuditBackendDispatcher> m_backendDispatcher; >+ InjectedScriptManager& m_injectedScriptManager; >+ ScriptDebugServer& m_scriptDebugServer; >+ >+ JSC::Strong<JSC::JSObject> m_injectedAUDITValue; >+}; >+ >+} // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.cpp b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..86e767ba0daff17f532d075daf655c7dcd613d58 >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.cpp >@@ -0,0 +1,62 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "JSGlobalObjectAuditAgent.h" >+ >+#include "InjectedScript.h" >+#include "InjectedScriptManager.h" >+#include "JSCInlines.h" >+#include "JSGlobalObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefPtr.h> >+#include <wtf/text/WTFString.h> >+ >+using namespace JSC; >+ >+namespace Inspector { >+ >+JSGlobalObjectAuditAgent::JSGlobalObjectAuditAgent(JSAgentContext& context) >+ : InspectorAuditAgent(context) >+ , m_globalObject(context.inspectedGlobalObject) >+{ >+} >+ >+InjectedScript JSGlobalObjectAuditAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) >+{ >+ if (executionContextId) { >+ errorString = "Execution context id is not supported for JSContexts as there is only one execution context."_s; >+ return InjectedScript(); >+ } >+ >+ JSC::ExecState* scriptState = m_globalObject.globalExec(); >+ InjectedScript injectedScript = injectedScriptManager().injectedScriptFor(scriptState); >+ if (injectedScript.hasNoValue()) >+ errorString = "Internal error: main world execution context not found."_s; >+ >+ return injectedScript; >+} >+ >+} // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.h b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..c1cad323690d7bab6e2f56019b4eba8197b4481c >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.h >@@ -0,0 +1,48 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "InspectorAuditAgent.h" >+ >+namespace JSC { >+class JSGlobalObject; >+} >+ >+namespace Inspector { >+ >+class JSGlobalObjectAuditAgent final : public InspectorAuditAgent { >+ WTF_MAKE_NONCOPYABLE(JSGlobalObjectAuditAgent); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ explicit JSGlobalObjectAuditAgent(JSAgentContext&); >+ >+private: >+ InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) override; >+ >+ JSC::JSGlobalObject& m_globalObject; >+}; >+ >+} // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/protocol/Audit.json b/Source/JavaScriptCore/inspector/protocol/Audit.json >new file mode 100644 >index 0000000000000000000000000000000000000000..718fcada43e8375ef981ad9c8ace8ac62996664e >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/protocol/Audit.json >@@ -0,0 +1,29 @@ >+{ >+ "domain": "Audit", >+ "description": "", >+ "commands": [ >+ { >+ "name": "setup", >+ "description": "", >+ "parameters": [ >+ { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to run the test. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." } >+ ] >+ }, >+ { >+ "name": "run", >+ "description": "Parses and evaluates the given test string and sends back the result.", >+ "parameters": [ >+ { "name": "test", "type": "string", "description": "Test string to parse and evaluate." }, >+ { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to run the test. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." } >+ ], >+ "returns": [ >+ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }, >+ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } >+ ] >+ }, >+ { >+ "name": "teardown", >+ "description": "" >+ } >+ ] >+} >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index 9c51418af76624841ebbf5c6589f250df85f1d50..b0568bf151855b0f6dcc35e36dbcf823506ac274 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -884,6 +884,8 @@ set(WebCore_NON_SVG_IDL_FILES > html/canvas/WebMetalTextureDescriptor.idl > > inspector/CommandLineAPIHost.idl >+ inspector/InspectorAuditAccessibilityUtilities.idl >+ inspector/InspectorAuditDOMUtilities.idl > inspector/InspectorFrontendHost.idl > > loader/appcache/DOMApplicationCache.idl >diff --git a/Source/WebCore/DerivedSources-input.xcfilelist b/Source/WebCore/DerivedSources-input.xcfilelist >index 90b25fa1e53185a10d30ae5ef1d34f5ae8cc475f..0133240b30cbd00264944a8f69f03fbeb03b9eb5 100644 >--- a/Source/WebCore/DerivedSources-input.xcfilelist >+++ b/Source/WebCore/DerivedSources-input.xcfilelist >@@ -808,6 +808,8 @@ $(PROJECT_DIR)/html/track/VideoTrack.idl > $(PROJECT_DIR)/html/track/VideoTrackList.idl > $(PROJECT_DIR)/inspector/CommandLineAPIHost.idl > $(PROJECT_DIR)/inspector/CommandLineAPIModuleSource.js >+$(PROJECT_DIR)/inspector/InspectorAuditAccessibilityUtilities.idl >+$(PROJECT_DIR)/inspector/InspectorAuditDOMUtilities.idl > $(PROJECT_DIR)/inspector/InspectorFrontendHost.idl > $(PROJECT_DIR)/inspector/InspectorOverlayPage.css > $(PROJECT_DIR)/inspector/InspectorOverlayPage.html >diff --git a/Source/WebCore/DerivedSources-output.xcfilelist b/Source/WebCore/DerivedSources-output.xcfilelist >index dfbb88b0c675c70c10cc27ce8a26fa148ce67cc8..1c02a34164e86650c9f9024deb383e4f1818390f 100644 >--- a/Source/WebCore/DerivedSources-output.xcfilelist >+++ b/Source/WebCore/DerivedSources-output.xcfilelist >@@ -814,6 +814,10 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageSmoothingQuality.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageSmoothingQuality.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInputEvent.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInputEvent.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditAccessibilityUtilities.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditAccessibilityUtilities.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditDOMUtilities.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditDOMUtilities.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorFrontendHost.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorFrontendHost.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInternalSettings.cpp >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index e948b702f37a566e550a5ebe56e602fcb7922f8f..06c36f7cc1a895b1769b23661be218f1871d76d4 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -835,6 +835,8 @@ JS_BINDING_IDLS = \ > $(WebCore)/html/track/VideoTrack.idl \ > $(WebCore)/html/track/VideoTrackList.idl \ > $(WebCore)/inspector/CommandLineAPIHost.idl \ >+ $(WebCore)/inspector/InspectorAuditAccessibilityUtilities.idl \ >+ $(WebCore)/inspector/InspectorAuditDOMUtilities.idl \ > $(WebCore)/inspector/InspectorFrontendHost.idl \ > $(WebCore)/loader/appcache/DOMApplicationCache.idl \ > $(WebCore)/page/BarProp.idl \ >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 27b0b20dee7ed151c50397d782fd60411c1180d7..aff4d362c41919ab9dbcaa1fd732a73615139ad4 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -1220,6 +1220,8 @@ inspector/CommandLineAPIHost.cpp > inspector/CommandLineAPIModule.cpp > inspector/DOMEditor.cpp > inspector/DOMPatchSupport.cpp >+inspector/InspectorAuditAccessibilityUtilities.cpp >+inspector/InspectorAuditDOMUtilities.cpp > inspector/InspectorCanvas.cpp > inspector/InspectorClient.cpp > inspector/InspectorController.cpp >@@ -1260,6 +1262,7 @@ inspector/agents/WebConsoleAgent.cpp > inspector/agents/WebDebuggerAgent.cpp > inspector/agents/WebHeapAgent.cpp > >+inspector/agents/page/PageAuditAgent.cpp > inspector/agents/page/PageConsoleAgent.cpp > inspector/agents/page/PageDebuggerAgent.cpp > inspector/agents/page/PageHeapAgent.cpp >@@ -1267,6 +1270,7 @@ inspector/agents/page/PageNetworkAgent.cpp > inspector/agents/page/PageRuntimeAgent.cpp > > inspector/agents/worker/ServiceWorkerAgent.cpp >+inspector/agents/worker/WorkerAuditAgent.cpp > inspector/agents/worker/WorkerConsoleAgent.cpp > inspector/agents/worker/WorkerDebuggerAgent.cpp > inspector/agents/worker/WorkerNetworkAgent.cpp >@@ -2820,6 +2824,8 @@ JSImageBitmapRenderingContextSettings.cpp > JSImageData.cpp > JSImageSmoothingQuality.cpp > JSInputEvent.cpp >+JSInspectorAuditAccessibilityUtilities.cpp >+JSInspectorAuditDOMUtilities.cpp > JSInspectorFrontendHost.cpp > JSIntersectionObserver.cpp > JSIntersectionObserverCallback.cpp >diff --git a/Source/WebCore/UnifiedSources-input.xcfilelist b/Source/WebCore/UnifiedSources-input.xcfilelist >index dfc2a3c29529a4146448ec8c3b5bcee081411730..69831ee7104e9a4fc2ed3652f645dde11ec584da 100644 >--- a/Source/WebCore/UnifiedSources-input.xcfilelist >+++ b/Source/WebCore/UnifiedSources-input.xcfilelist >@@ -391,6 +391,8 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageBitmapRenderingContextSettin > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageData.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageSmoothingQuality.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInputEvent.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditAccessibilityUtilities.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditDOMUtilities.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorFrontendHost.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSIntersectionObserver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSIntersectionObserverCallback.cpp >@@ -2173,6 +2175,8 @@ $(SRCROOT)/inspector/CommandLineAPIHost.cpp > $(SRCROOT)/inspector/CommandLineAPIModule.cpp > $(SRCROOT)/inspector/DOMEditor.cpp > $(SRCROOT)/inspector/DOMPatchSupport.cpp >+$(SRCROOT)/inspector/InspectorAuditAccessibilityUtilities.cpp >+$(SRCROOT)/inspector/InspectorAuditDOMUtilities.cpp > $(SRCROOT)/inspector/InspectorCanvas.cpp > $(SRCROOT)/inspector/InspectorClient.cpp > $(SRCROOT)/inspector/InspectorController.cpp >@@ -2211,12 +2215,14 @@ $(SRCROOT)/inspector/agents/InspectorWorkerAgent.cpp > $(SRCROOT)/inspector/agents/WebConsoleAgent.cpp > $(SRCROOT)/inspector/agents/WebDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/WebHeapAgent.cpp >+$(SRCROOT)/inspector/agents/page/PageAuditAgent.cpp > $(SRCROOT)/inspector/agents/page/PageConsoleAgent.cpp > $(SRCROOT)/inspector/agents/page/PageDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/page/PageHeapAgent.cpp > $(SRCROOT)/inspector/agents/page/PageNetworkAgent.cpp > $(SRCROOT)/inspector/agents/page/PageRuntimeAgent.cpp > $(SRCROOT)/inspector/agents/worker/ServiceWorkerAgent.cpp >+$(SRCROOT)/inspector/agents/worker/WorkerAuditAgent.cpp > $(SRCROOT)/inspector/agents/worker/WorkerConsoleAgent.cpp > $(SRCROOT)/inspector/agents/worker/WorkerDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/worker/WorkerNetworkAgent.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 3ec66782454401ef99f140eb997c306e70edcc50..14e2b4f69abc24b12804bd1b6fc9b54198cf9929 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -2580,6 +2580,12 @@ > 9001774012E0347800648462 /* OESStandardDerivatives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9001773D12E0347800648462 /* OESStandardDerivatives.cpp */; }; > 9001774112E0347800648462 /* OESStandardDerivatives.h in Headers */ = {isa = PBXBuildFile; fileRef = 9001773E12E0347800648462 /* OESStandardDerivatives.h */; }; > 9001788112E0370700648462 /* JSOESStandardDerivatives.h in Headers */ = {isa = PBXBuildFile; fileRef = 9001787F12E0370700648462 /* JSOESStandardDerivatives.h */; }; >+ 91278D5E21DEDAD600B57184 /* PageAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D5C21DEDAD500B57184 /* PageAuditAgent.h */; }; >+ 91278D6221DEDAF000B57184 /* WorkerAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D6021DEDAF000B57184 /* WorkerAuditAgent.h */; }; >+ 9175CE5C21E281ED00DF2C27 /* InspectorAuditDOMUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 9175CE5821E281EC00DF2C27 /* InspectorAuditDOMUtilities.h */; }; >+ 9175CE5C21E281ED00DF2C28 /* JSInspectorAuditDOMUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 9175CE5821E281EC00DF2C28 /* InspectorAuditDOMUtilities.h */; }; >+ 9175CE5E21E281ED00DF2C27 /* InspectorAuditAccessibilityUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 9175CE5A21E281ED00DF2C27 /* InspectorAuditAccessibilityUtilities.h */; }; >+ 9175CE5E21E281ED00DF2C28 /* JSInspectorAuditAccessibilityUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 9175CE5A21E281ED00DF2C28 /* InspectorAuditAccessibilityUtilities.h */; }; > 91B8F0B521953D65000C2B00 /* CertificateInfoBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 91B8F0B321953D65000C2B00 /* CertificateInfoBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 91B952241F58A58F00931DC2 /* RecordingSwizzleTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 91B952221F58A58000931DC2 /* RecordingSwizzleTypes.h */; }; > 91C9F2F91AE3BEB00095B61C /* AXTextStateChangeIntent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91C9F2F81AE3BE240095B61C /* AXTextStateChangeIntent.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -10357,6 +10363,18 @@ > 9001773F12E0347800648462 /* OESStandardDerivatives.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OESStandardDerivatives.idl; sourceTree = "<group>"; }; > 9001787E12E0370700648462 /* JSOESStandardDerivatives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESStandardDerivatives.cpp; sourceTree = "<group>"; }; > 9001787F12E0370700648462 /* JSOESStandardDerivatives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESStandardDerivatives.h; sourceTree = "<group>"; }; >+ 91278D5A21DEDAD500B57184 /* PageAuditAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageAuditAgent.cpp; sourceTree = "<group>"; }; >+ 91278D5C21DEDAD500B57184 /* PageAuditAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageAuditAgent.h; sourceTree = "<group>"; }; >+ 91278D5F21DEDAEF00B57184 /* WorkerAuditAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerAuditAgent.cpp; sourceTree = "<group>"; }; >+ 91278D6021DEDAF000B57184 /* WorkerAuditAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerAuditAgent.h; sourceTree = "<group>"; }; >+ 9175CE5721E281EB00DF2C27 /* InspectorAuditDOMUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAuditDOMUtilities.cpp; sourceTree = "<group>"; }; >+ 9175CE5721E281EB00DF2C28 /* JSInspectorAuditDOMUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAuditDOMUtilities.cpp; sourceTree = "<group>"; }; >+ 9175CE5821E281EC00DF2C27 /* InspectorAuditDOMUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAuditDOMUtilities.h; sourceTree = "<group>"; }; >+ 9175CE5821E281EC00DF2C28 /* JSInspectorAuditDOMUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAuditDOMUtilities.h; sourceTree = "<group>"; }; >+ 9175CE5921E281EC00DF2C27 /* InspectorAuditAccessibilityUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAuditAccessibilityUtilities.cpp; sourceTree = "<group>"; }; >+ 9175CE5921E281EC00DF2C28 /* JSInspectorAuditAccessibilityUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAuditAccessibilityUtilities.cpp; sourceTree = "<group>"; }; >+ 9175CE5A21E281ED00DF2C27 /* InspectorAuditAccessibilityUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAuditAccessibilityUtilities.h; sourceTree = "<group>"; }; >+ 9175CE5A21E281ED00DF2C28 /* JSInspectorAuditAccessibilityUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAuditAccessibilityUtilities.h; sourceTree = "<group>"; }; > 91B8F0B321953D65000C2B00 /* CertificateInfoBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CertificateInfoBase.h; sourceTree = "<group>"; }; > 91B952221F58A58000931DC2 /* RecordingSwizzleTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RecordingSwizzleTypes.h; sourceTree = "<group>"; }; > 91C9F2F81AE3BE240095B61C /* AXTextStateChangeIntent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AXTextStateChangeIntent.h; sourceTree = "<group>"; }; >@@ -16777,6 +16795,10 @@ > A584FE2518637DAB00843B10 /* CommandLineAPIModuleSource.h */, > A584FE391864E2D800843B10 /* JSCommandLineAPIHost.cpp */, > A584FE3A1864E2D800843B10 /* JSCommandLineAPIHost.h */, >+ 9175CE5921E281EC00DF2C28 /* JSInspectorAuditAccessibilityUtilities.cpp */, >+ 9175CE5A21E281ED00DF2C28 /* JSInspectorAuditAccessibilityUtilities.h */, >+ 9175CE5721E281EB00DF2C28 /* JSInspectorAuditDOMUtilities.cpp */, >+ 9175CE5821E281EC00DF2C28 /* JSInspectorAuditDOMUtilities.h */, > 7A0E771C10C00DB100A0276E /* JSInspectorFrontendHost.cpp */, > 7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */, > ); >@@ -16797,6 +16819,10 @@ > 7AABA25814BC613300AA9A11 /* DOMEditor.h */, > 7A54881614E432A1006AE05A /* DOMPatchSupport.cpp */, > 7A54881514E432A1006AE05A /* DOMPatchSupport.h */, >+ 9175CE5921E281EC00DF2C27 /* InspectorAuditAccessibilityUtilities.cpp */, >+ 9175CE5A21E281ED00DF2C27 /* InspectorAuditAccessibilityUtilities.h */, >+ 9175CE5721E281EB00DF2C27 /* InspectorAuditDOMUtilities.cpp */, >+ 9175CE5821E281EC00DF2C27 /* InspectorAuditDOMUtilities.h */, > 6A22E8721F1042C400F546C3 /* InspectorCanvas.cpp */, > 6A22E86F1F10418600F546C3 /* InspectorCanvas.h */, > 7A1F2B51126C61B20006A7E6 /* InspectorClient.cpp */, >@@ -22190,6 +22216,8 @@ > A5B81CB91FAA44820037D1E6 /* page */ = { > isa = PBXGroup; > children = ( >+ 91278D5A21DEDAD500B57184 /* PageAuditAgent.cpp */, >+ 91278D5C21DEDAD500B57184 /* PageAuditAgent.h */, > A5B81CC01FAA44B70037D1E6 /* PageConsoleAgent.cpp */, > A5B81CBB1FAA44B70037D1E6 /* PageConsoleAgent.h */, > A5B81CBD1FAA44B70037D1E6 /* PageDebuggerAgent.cpp */, >@@ -22209,6 +22237,8 @@ > children = ( > A581ED121FB288C900CED4EC /* ServiceWorkerAgent.cpp */, > A581ED101FB288C800CED4EC /* ServiceWorkerAgent.h */, >+ 91278D5F21DEDAEF00B57184 /* WorkerAuditAgent.cpp */, >+ 91278D6021DEDAF000B57184 /* WorkerAuditAgent.h */, > A5B81CCB1FAA44DA0037D1E6 /* WorkerConsoleAgent.cpp */, > A5B81CCA1FAA44DA0037D1E6 /* WorkerConsoleAgent.h */, > A5B81CC81FAA44DA0037D1E6 /* WorkerDebuggerAgent.cpp */, >@@ -29228,6 +29258,8 @@ > 93309DF0099E64920056E581 /* InsertParagraphSeparatorCommand.h in Headers */, > 93309DF2099E64920056E581 /* InsertTextCommand.h in Headers */, > A5B81CA71FAA44620037D1E6 /* InspectorApplicationCacheAgent.h in Headers */, >+ 9175CE5E21E281ED00DF2C27 /* InspectorAuditAccessibilityUtilities.h in Headers */, >+ 9175CE5C21E281ED00DF2C27 /* InspectorAuditDOMUtilities.h in Headers */, > 6A22E8701F10418600F546C3 /* InspectorCanvas.h in Headers */, > A5B81CA81FAA44620037D1E6 /* InspectorCanvasAgent.h in Headers */, > 1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */, >@@ -29660,6 +29692,8 @@ > A77979290D6B9E64003851B9 /* JSImageData.h in Headers */, > 7C193C011F5E11050088F3E6 /* JSImageSmoothingQuality.h in Headers */, > A86629D309DA2B48009633A6 /* JSInputEvent.h in Headers */, >+ 9175CE5E21E281ED00DF2C28 /* JSInspectorAuditAccessibilityUtilities.h in Headers */, >+ 9175CE5C21E281ED00DF2C28 /* JSInspectorAuditDOMUtilities.h in Headers */, > 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */, > 0F4710E61DB700C7002DCEC3 /* JSIntersectionObserver.h in Headers */, > 0F8B45761DC41DBA00443C3F /* JSIntersectionObserverCallback.h in Headers */, >@@ -30480,6 +30514,7 @@ > 1A0D57370A5C77FE007EDD4C /* OverflowEvent.h in Headers */, > 3774ABA50FA21EB400AD7DE9 /* OverlapTestRequestClient.h in Headers */, > 65A21468097A329100B9050A /* Page.h in Headers */, >+ 91278D5E21DEDAD600B57184 /* PageAuditAgent.h in Headers */, > 1477E7770BF4134A00152872 /* PageCache.h in Headers */, > CD5E5B5F1A15CE54000C609E /* PageConfiguration.h in Headers */, > A5B81CC21FAA44BC0037D1E6 /* PageConsoleAgent.h in Headers */, >@@ -31904,6 +31939,7 @@ > A14832C6187F668F00DA63A6 /* WKViewPrivate.h in Headers */, > 379919971200DDF400EA041C /* WOFFFileFormat.h in Headers */, > 2E4346460F546A8200B0F1BA /* Worker.h in Headers */, >+ 91278D6221DEDAF000B57184 /* WorkerAuditAgent.h in Headers */, > 41A7D3531F438D16008988DE /* WorkerCacheStorageConnection.h in Headers */, > A5B81CCD1FAA44DE0037D1E6 /* WorkerConsoleAgent.h in Headers */, > A55639D11C6F09E300806D8E /* WorkerConsoleClient.h in Headers */, >diff --git a/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp b/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..3c84fc3b9cae6b53d3fa2b729f7f9ca6f1730210 >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+ >+#include "config.h" >+#include "InspectorAuditAccessibilityUtilities.h" >+ >+namespace WebCore { >+ >+using namespace Inspector; >+ >+InspectorAuditAccessibilityUtilities::InspectorAuditAccessibilityUtilities() >+{ >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.h b/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.h >new file mode 100644 >index 0000000000000000000000000000000000000000..37c67bb1f254ba595cbdb78de8d95b3c57b8ed99 >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.h >@@ -0,0 +1,44 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> >+ >+namespace WebCore { >+ >+class InspectorAuditAccessibilityUtilities : public RefCounted<InspectorAuditAccessibilityUtilities> { >+public: >+ static Ref<InspectorAuditAccessibilityUtilities> create() >+ { >+ return adoptRef(*new InspectorAuditAccessibilityUtilities()); >+ } >+ >+private: >+ explicit InspectorAuditAccessibilityUtilities(); >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.idl b/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..7ccd72bb09365dc5848e244028784fd22e44df7c >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.idl >@@ -0,0 +1,31 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+[ >+ ImplementationLacksVTable, >+ JSGenerateToJSObject, >+ NoInterfaceObject, >+] interface InspectorAuditAccessibilityUtilities { >+}; >diff --git a/Source/WebCore/inspector/InspectorAuditDOMUtilities.cpp b/Source/WebCore/inspector/InspectorAuditDOMUtilities.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..200947a4dab8edd63f6cba894d0d18fb7a9222c4 >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditDOMUtilities.cpp >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+ >+#include "config.h" >+#include "InspectorAuditDOMUtilities.h" >+ >+namespace WebCore { >+ >+using namespace Inspector; >+ >+InspectorAuditDOMUtilities::InspectorAuditDOMUtilities() >+{ >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/InspectorAuditDOMUtilities.h b/Source/WebCore/inspector/InspectorAuditDOMUtilities.h >new file mode 100644 >index 0000000000000000000000000000000000000000..3a4af637eff2e4ff808e0733b0299892e4368075 >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditDOMUtilities.h >@@ -0,0 +1,44 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> >+ >+namespace WebCore { >+ >+class InspectorAuditDOMUtilities : public RefCounted<InspectorAuditDOMUtilities> { >+public: >+ static Ref<InspectorAuditDOMUtilities> create() >+ { >+ return adoptRef(*new InspectorAuditDOMUtilities()); >+ } >+ >+private: >+ explicit InspectorAuditDOMUtilities(); >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/InspectorAuditDOMUtilities.idl b/Source/WebCore/inspector/InspectorAuditDOMUtilities.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..11588325917a5c3b5fdbeab7a722eb068bbb0e32 >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditDOMUtilities.idl >@@ -0,0 +1,31 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+[ >+ ImplementationLacksVTable, >+ JSGenerateToJSObject, >+ NoInterfaceObject, >+] interface InspectorAuditDOMUtilities { >+}; >diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp >index 44aa81b2a9bace32f4d871740bd103d1a888e7c4..866210cdb139be888b097dade6a586c2950beca8 100644 >--- a/Source/WebCore/inspector/InspectorController.cpp >+++ b/Source/WebCore/inspector/InspectorController.cpp >@@ -60,6 +60,7 @@ > #include "JSDOMWindowCustom.h" > #include "JSExecState.h" > #include "Page.h" >+#include "PageAuditAgent.h" > #include "PageConsoleAgent.h" > #include "PageDebuggerAgent.h" > #include "PageHeapAgent.h" >@@ -206,6 +207,7 @@ void InspectorController::createLazyAgents() > #if ENABLE(RESOURCE_USAGE) > m_agents.append(std::make_unique<InspectorMemoryAgent>(pageContext)); > #endif >+ m_agents.append(std::make_unique<PageAuditAgent>(pageContext)); > } > > void InspectorController::inspectedPageDestroyed() >diff --git a/Source/WebCore/inspector/WorkerInspectorController.cpp b/Source/WebCore/inspector/WorkerInspectorController.cpp >index d2c023fccc00b0e25a2ad4bd2630dc73c1a5f64f..3597e1b152b944db407a38a4b08f74a542c50ff5 100644 >--- a/Source/WebCore/inspector/WorkerInspectorController.cpp >+++ b/Source/WebCore/inspector/WorkerInspectorController.cpp >@@ -32,6 +32,7 @@ > #include "WebHeapAgent.h" > #include "WebInjectedScriptHost.h" > #include "WebInjectedScriptManager.h" >+#include "WorkerAuditAgent.h" > #include "WorkerConsoleAgent.h" > #include "WorkerDebuggerAgent.h" > #include "WorkerGlobalScope.h" >@@ -168,13 +169,16 @@ void WorkerInspectorController::createLazyAgents() > > m_didCreateLazyAgents = true; > >-#if ENABLE(SERVICE_WORKER) > auto workerContext = workerAgentContext(); >+ >+#if ENABLE(SERVICE_WORKER) > if (is<ServiceWorkerGlobalScope>(m_workerGlobalScope)) { > m_agents.append(std::make_unique<ServiceWorkerAgent>(workerContext)); > m_agents.append(std::make_unique<WorkerNetworkAgent>(workerContext)); > } > #endif >+ >+ m_agents.append(std::make_unique<WorkerAuditAgent>(workerContext)); > } > > InspectorFunctionCallHandler WorkerInspectorController::functionCallHandler() const >diff --git a/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp b/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..dbe1d36f2877114c4afcf16f412f22dbf62c920c >--- /dev/null >+++ b/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp >@@ -0,0 +1,113 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "PageAuditAgent.h" >+ >+#include "JSInspectorAuditAccessibilityUtilities.h" >+#include "JSInspectorAuditDOMUtilities.h" >+#include "Page.h" >+#include "PageConsoleClient.h" >+#include <JavaScriptCore/CallFrame.h> >+#include <JavaScriptCore/InjectedScript.h> >+#include <JavaScriptCore/InjectedScriptManager.h> >+#include <JavaScriptCore/JSLock.h> >+#include <wtf/Ref.h> >+#include <wtf/RefPtr.h> >+#include <wtf/Vector.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+using namespace Inspector; >+ >+PageAuditAgent::PageAuditAgent(PageAgentContext& context) >+ : InspectorAuditAgent(context) >+ , m_inspectedPage(context.inspectedPage) >+{ >+} >+ >+InjectedScript PageAuditAgent::injectedScriptForEval(const int* executionContextId) >+{ >+ if (executionContextId) >+ return injectedScriptManager().injectedScriptForId(*executionContextId); >+ >+ JSC::ExecState* scriptState = mainWorldExecState(&m_inspectedPage.mainFrame()); >+ return injectedScriptManager().injectedScriptFor(scriptState); >+} >+ >+InjectedScript PageAuditAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) >+{ >+ InjectedScript injectedScript = injectedScriptForEval(executionContextId); >+ if (injectedScript.hasNoValue()) { >+ if (executionContextId) >+ errorString = "Internal error: main world execution context not found."_s; >+ else >+ errorString = "Execution context with given id not found."_s; >+ } >+ return injectedScript; >+} >+ >+Vector<std::pair<String, JSC::JSValue>> PageAuditAgent::runArguments(const int* executionContextId) >+{ >+ auto arguments = InspectorAuditAgent::runArguments(executionContextId); >+ >+ InjectedScript injectedScript = injectedScriptForEval(executionContextId); >+ if (!injectedScript.hasNoValue()) { >+ if (JSC::ExecState* execState = injectedScript.scriptState()) { >+ if (auto* globalObject = JSC::jsCast<JSDOMGlobalObject*>(execState->lexicalGlobalObject())) { >+ JSC::JSLockHolder lock(execState); >+ >+#define ADD_AUDIT_UTILITIES(name) \ >+ if (!m_audit##name##Utilities) \ >+ m_audit##name##Utilities = InspectorAudit##name##Utilities::create(); \ >+ if (JSC::JSValue inspectorAudit##name##Utilities = toJS(execState, globalObject, *m_audit##name##Utilities)) \ >+ arguments.append(std::make_pair("" #name ""_s, WTFMove(inspectorAudit##name##Utilities))); >+ >+ ADD_AUDIT_UTILITIES(Accessibility); >+ ADD_AUDIT_UTILITIES(DOM); >+#undef ADD_AUDIT_UTILITIES >+ } >+ } >+ } >+ >+ return arguments; >+} >+ >+void PageAuditAgent::muteConsole() >+{ >+ InspectorAuditAgent::muteConsole(); >+ >+ PageConsoleClient::mute(); >+} >+ >+void PageAuditAgent::unmuteConsole() >+{ >+ PageConsoleClient::unmute(); >+ >+ InspectorAuditAgent::unmuteConsole(); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/agents/page/PageAuditAgent.h b/Source/WebCore/inspector/agents/page/PageAuditAgent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..bd00688671e26f42b6abd77dac630c15813801ef >--- /dev/null >+++ b/Source/WebCore/inspector/agents/page/PageAuditAgent.h >@@ -0,0 +1,57 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "InspectorAuditAccessibilityUtilities.h" >+#include "InspectorAuditDOMUtilities.h" >+#include "InspectorWebAgentBase.h" >+#include <JavaScriptCore/InspectorAuditAgent.h> >+ >+namespace WebCore { >+ >+class Page; >+ >+class PageAuditAgent final : public Inspector::InspectorAuditAgent { >+ WTF_MAKE_NONCOPYABLE(PageAuditAgent); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ explicit PageAuditAgent(PageAgentContext&); >+ >+private: >+ Inspector::InjectedScript injectedScriptForEval(const int* executionContextId); >+ Inspector::InjectedScript injectedScriptForEval(Inspector::ErrorString&, const int* executionContextId) override; >+ >+ Vector<std::pair<String, JSC::JSValue>> runArguments(const int* executionContextId) override; >+ >+ void muteConsole() override; >+ void unmuteConsole() override; >+ >+ Page& m_inspectedPage; >+ RefPtr<InspectorAuditAccessibilityUtilities> m_auditAccessibilityUtilities; >+ RefPtr<InspectorAuditDOMUtilities> m_auditDOMUtilities; >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.cpp b/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..854c24553ba991b32fd7a82308d0b56456911a92 >--- /dev/null >+++ b/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.cpp >@@ -0,0 +1,59 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "WorkerAuditAgent.h" >+ >+#include "WorkerGlobalScope.h" >+#include <JavaScriptCore/InjectedScript.h> >+#include <JavaScriptCore/InjectedScriptManager.h> >+#include <JavaScriptCore/JSCInlines.h> >+#include <wtf/Ref.h> >+#include <wtf/RefPtr.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+using namespace Inspector; >+ >+WorkerAuditAgent::WorkerAuditAgent(WorkerAgentContext& context) >+ : InspectorAuditAgent(context) >+ , m_workerGlobalScope(context.workerGlobalScope) >+{ >+ ASSERT(context.workerGlobalScope.isContextThread()); >+} >+ >+InjectedScript WorkerAuditAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) >+{ >+ if (executionContextId) { >+ errorString = "Execution context id is not supported for workers as there is only one execution context."_s; >+ return InjectedScript(); >+ } >+ >+ JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(m_workerGlobalScope); >+ return injectedScriptManager().injectedScriptFor(scriptState); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.h b/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..1b8d9ff7594154e6cc94c63c42e39288da3e27e3 >--- /dev/null >+++ b/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.h >@@ -0,0 +1,47 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "InspectorWebAgentBase.h" >+#include <JavaScriptCore/InspectorAuditAgent.h> >+ >+namespace WebCore { >+ >+class WorkerGlobalScope; >+ >+class WorkerAuditAgent final : public Inspector::InspectorAuditAgent { >+ WTF_MAKE_NONCOPYABLE(WorkerAuditAgent); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ explicit WorkerAuditAgent(WorkerAgentContext&); >+ >+private: >+ Inspector::InjectedScript injectedScriptForEval(Inspector::ErrorString&, const int* executionContextId) override; >+ >+ WorkerGlobalScope& m_workerGlobalScope; >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebInspectorUI/.eslintrc b/Source/WebInspectorUI/.eslintrc >index 75ea80baeb61d40064d9db5bea7e91c4f4dec0dd..a8c04ddc0627ac05842fd2b00d83fd5631bda40a 100644 >--- a/Source/WebInspectorUI/.eslintrc >+++ b/Source/WebInspectorUI/.eslintrc >@@ -35,6 +35,7 @@ > }, > "globals": { > // Agents >+ "AuditAgent": true, > "ApplicationCacheAgent": true, > "CSSAgent": true, > "CanvasAgent": true, >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js b/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >index 7684b4d9601f445b1397f326b824a15a24b42ef0..b99fa399fd62df0ef05b95da57c3d72a885618b5 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js >@@ -63,6 +63,7 @@ WI.AuditManager = class AuditManager extends WI.Object > else > tests = this._tests; > >+ console.assert(tests.length); > if (!tests.length) > return; > >@@ -75,7 +76,18 @@ WI.AuditManager = class AuditManager extends WI.Object > > this.dispatchEventToListeners(WI.AuditManager.Event.TestScheduled); > >- await Promise.chain(this._runningTests.map((test) => () => this._runningState === WI.AuditManager.RunningState.Active ? test.start() : null)); >+ await Promise.chain(this._runningTests.map((test) => async () => { >+ if (this._runningState !== WI.AuditManager.RunningState.Active) >+ return; >+ >+ if (InspectorBackend.domains.Audit) >+ await AuditAgent.setup(); >+ >+ await test.start(); >+ >+ if (InspectorBackend.domains.Audit) >+ await AuditAgent.teardown(); >+ })); > > let result = this._runningTests.map((test) => test.result).filter((result) => !!result); > >diff --git a/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js b/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js >index a6daef2582bc4e9463c2eb453b15f93a3c7048c8..faaf3332c41a35b4195e6eadc5af7379d1f05eda 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js >+++ b/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js >@@ -106,12 +106,6 @@ WI.AuditTestCase = class AuditTestCase extends WI.AuditTestBase > data.errors.push(value); > } > >- let evaluateArguments = { >- expression: `(function() { "use strict"; return eval(${this._test})(); })()`, >- objectGroup: "audit", >- doNotPauseOnExceptionsAndMuteConsole: true, >- }; >- > async function parseResponse(response) { > let remoteObject = WI.RemoteObject.fromPayload(response.result, WI.mainTarget); > if (response.wasThrown || (remoteObject.type === "object" && remoteObject.subtype === "error")) >@@ -232,9 +226,21 @@ WI.AuditTestCase = class AuditTestCase extends WI.AuditTestBase > addError(WI.UIString("Return value is not an object, string, or boolean")); > } > >+ let agentCommandFunction = null; >+ let agentCommandArguments = {}; >+ if (InspectorBackend.domains.Audit) { >+ agentCommandFunction = AuditAgent.run; >+ agentCommandArguments.test = this._test; >+ } else { >+ agentCommandFunction = RuntimeAgent.evaluate; >+ agentCommandArguments.expression = `(function() { "use strict"; return eval(\`(${this._test.replace(/`/g, "\\`")})\`)(); })()`; >+ agentCommandArguments.objectGroup = "audit"; >+ agentCommandArguments.doNotPauseOnExceptionsAndMuteConsole = true; >+ } >+ > try { > metadata.startTimestamp = new Date; >- let response = await RuntimeAgent.evaluate.invoke(evaluateArguments); >+ let response = await agentCommandFunction.invoke(agentCommandArguments); > metadata.endTimestamp = new Date; > > if (response.result.type === "object" && response.result.className === "Promise") { >diff --git a/Source/WebInspectorUI/UserInterface/Protocol/Target.js b/Source/WebInspectorUI/UserInterface/Protocol/Target.js >index dc7995267621b2a6856921c7544ba80c3e88fc22..b0ea5eae2efac2fd48f950014f398db5f52f61cb 100644 >--- a/Source/WebInspectorUI/UserInterface/Protocol/Target.js >+++ b/Source/WebInspectorUI/UserInterface/Protocol/Target.js >@@ -109,6 +109,7 @@ WI.Target = class Target extends WI.Object > > // Agents > >+ get AuditAgent() { return this._agents.Audit; } > get ApplicationCacheAgent() { return this._agents.ApplicationCache; } > get CSSAgent() { return this._agents.CSS; } > get CanvasAgent() { return this._agents.Canvas; } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 9c1c3ba62de4622d5de7e41ef7af961e7de5e138..53e2c656faa043f36fc8b6fdfaf4e1d349af8af3 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,33 @@ >+2019-01-10 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: create new IDL type for exposing special functionality in test context >+ https://bugs.webkit.org/show_bug.cgi?id=193149 >+ <rdar://problem/46801218> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/audit/resources/audit-utilities.js: >+ (TestPage.registerInitializer.InspectorTest.Audit.setupAudit): Added. >+ (TestPage.registerInitializer.InspectorTest.Audit.teardownAudit): Added. >+ >+ * inspector/audit/run.html: Added. >+ * inspector/audit/run-expected.txt: Added. >+ * inspector/audit/setup.html: Added. >+ * inspector/audit/setup-expected.txt: Added. >+ * inspector/audit/teardown.html: Added. >+ * inspector/audit/teardown-expected.txt: Added. >+ >+ * inspector/canvas/create-context-2d-expected.txt: >+ * inspector/canvas/create-context-bitmaprenderer-expected.txt: >+ * inspector/canvas/create-context-webgl-expected.txt: >+ * inspector/canvas/create-context-webgl2-expected.txt: >+ * inspector/canvas/create-context-webmetal-expected.txt: >+ * inspector/canvas/recording-2d-expected.txt: >+ * inspector/canvas/recording-webgl-expected.txt: >+ * inspector/canvas/recording-webgl-snapshots-expected.txt: >+ * inspector/model/remote-object-expected.txt: >+ * inspector/model/stack-trace-expected.txt: >+ > 2019-01-09 Zalan Bujtas <zalan@apple.com> > > [Datalist] Crash when input with datalist is dynamically added. >diff --git a/LayoutTests/inspector/audit/resources/audit-utilities.js b/LayoutTests/inspector/audit/resources/audit-utilities.js >index 8279464ef511057f0ef3eb0c773b0b21eb342b15..5cf3a2b2098a597bcc126b8daba5dedd640fef6a 100644 >--- a/LayoutTests/inspector/audit/resources/audit-utilities.js >+++ b/LayoutTests/inspector/audit/resources/audit-utilities.js >@@ -24,7 +24,17 @@ TestPage.registerInitializer(() => { > InspectorTest.Audit.createSuite = function(name) { > suite = InspectorTest.createAsyncSuite(name); > return suite; >- } >+ }; >+ >+ InspectorTest.Audit.setupAudit = async function() { >+ InspectorTest.log("Audit setup..."); >+ await AuditAgent.setup(); >+ }; >+ >+ InspectorTest.Audit.teardownAudit = async function() { >+ InspectorTest.log("Audit teardown..."); >+ await AuditAgent.teardown(); >+ }; > > InspectorTest.Audit.addTest = function(name, test, level, logs = {}) { > suite.addTestCase({ >diff --git a/LayoutTests/inspector/audit/run-expected.txt b/LayoutTests/inspector/audit/run-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..f1220d82284f034cbaefa17e0cfeab8f0576ed4d >--- /dev/null >+++ b/LayoutTests/inspector/audit/run-expected.txt >@@ -0,0 +1,43 @@ >+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 AUDIT; }"... >+PASS: The injected AUDIT should be an object. >+PASS: The injected AUDIT should be a basic object. >+Audit teardown... >+ >+-- Running test case: Audit.run.Valid.InjectedObject.Persistence >+Audit setup... >+Audit run "function() { AUDIT.foo = 42; return 10; }"... >+PASS: Run should send back 10. >+Audit run "function() { return AUDIT.foo; }"... >+PASS: Run should send back 42. >+Audit teardown... >+Triggering GC... >+Audit setup... >+Audit run "function() { return AUDIT.foo; }"... >+PASS: Run should send back undefined. >+Audit teardown... >+ >+-- Running test case: Audit.run.Valid.InjectedObject.Accessibility >+Audit setup... >+Audit run "function() { return AUDIT.Accessibility; }"... >+PASS: The injected AUDIT should hold an instance of InspectorAuditAccessibilityUtilities. >+Audit teardown... >+ >+-- Running test case: Audit.run.Valid.InjectedObject.DOM >+Audit setup... >+Audit run "function() { return AUDIT.DOM; }"... >+PASS: The injected AUDIT should hold an instance of InspectorAuditDOMUtilities. >+Audit teardown... >+ >+-- Running test case: Audit.run.Invalid >+TypeError: eval(`(42)`) is not a function. (In 'eval(`(42)`)()', 'eval(`(42)`)' is 42) >+ >diff --git a/LayoutTests/inspector/audit/run.html b/LayoutTests/inspector/audit/run.html >new file mode 100644 >index 0000000000000000000000000000000000000000..950f100227cdd0246c887ff7bdd9ecac7cf44403 >--- /dev/null >+++ b/LayoutTests/inspector/audit/run.html >@@ -0,0 +1,114 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+ >+function test() >+{ >+ async function auditRun(functionString, check) { >+ InspectorTest.log(`Audit run "${functionString}"...`); >+ >+ let {result, wasThrown} = await AuditAgent.run(functionString); >+ InspectorTest.assert(!wasThrown, "Should not throw an exception."); >+ if (!wasThrown) >+ check(result); >+ else >+ InspectorTest.log(result.description); >+ } >+ >+ let suite = InspectorTest.Audit.createSuite("Audit.run"); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Valid", >+ description: "Check that Audit.run is able to respond with a RemoteObject.", >+ async test() { >+ await auditRun(`function() { return 42; }`, (result) => { >+ InspectorTest.expectEqual(result.value, 42, "Run should send back 42."); >+ }); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Valid.InjectedObject", >+ description: "Check that an object is injected into the function that is executed.", >+ async test() { >+ await InspectorTest.Audit.setupAudit(); >+ await auditRun(`function() { return AUDIT; }`, (result) => { >+ InspectorTest.expectEqual(result.type, "object", "The injected AUDIT should be an object."); >+ InspectorTest.expectFalse(result.subtype, "The injected AUDIT should be a basic object."); >+ }); >+ await InspectorTest.Audit.teardownAudit(); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Valid.InjectedObject.Persistence", >+ description: "Check that the injected object is preserved between test runs.", >+ async test() { >+ await InspectorTest.Audit.setupAudit(); >+ await auditRun(`function() { AUDIT.foo = 42; return 10; }`, (result) => { >+ InspectorTest.expectEqual(result.value, 10, "Run should send back 10."); >+ }); >+ await auditRun(`function() { return AUDIT.foo; }`, (result) => { >+ InspectorTest.expectEqual(result.value, 42, "Run should send back 42."); >+ }); >+ await InspectorTest.Audit.teardownAudit(); >+ >+ InspectorTest.log("Triggering GC..."); >+ await HeapAgent.gc(); >+ >+ await InspectorTest.Audit.setupAudit(); >+ await auditRun(`function() { return AUDIT.foo; }`, (result) => { >+ InspectorTest.expectEqual(result.value, undefined, "Run should send back undefined."); >+ }); >+ await InspectorTest.Audit.teardownAudit(); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Valid.InjectedObject.Accessibility", >+ description: "Check that the injected object holds an instance of InspectorAuditAccessibilityUtilities.", >+ async test() { >+ await InspectorTest.Audit.setupAudit(); >+ await auditRun(`function() { return AUDIT.Accessibility; }`, (result) => { >+ InspectorTest.expectEqual(result.description, "InspectorAuditAccessibilityUtilities", "The injected AUDIT should hold an instance of InspectorAuditAccessibilityUtilities."); >+ }); >+ await InspectorTest.Audit.teardownAudit(); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Valid.InjectedObject.DOM", >+ description: "Check that the injected object holds an instance of InspectorAuditDOMUtilities.", >+ async test() { >+ await InspectorTest.Audit.setupAudit(); >+ await auditRun(`function() { return AUDIT.DOM; }`, (result) => { >+ InspectorTest.expectEqual(result.description, "InspectorAuditDOMUtilities", "The injected AUDIT should hold an instance of InspectorAuditDOMUtilities."); >+ }); >+ await InspectorTest.Audit.teardownAudit(); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Invalid", >+ description: "Check that an error is thrown when trying to execute a non-function.", >+ async test() { >+ let {result, wasThrown} = await AuditAgent.run(`42`); >+ InspectorTest.assert(wasThrown, "Should throw an exception."); >+ if (wasThrown) >+ InspectorTest.log(result.description); >+ else >+ InspectorTest.log(result); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Tests for the Audit.run command.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/setup-expected.txt b/LayoutTests/inspector/audit/setup-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..d7258a9b8db2fa111ef2aaefa73899f806647c99 >--- /dev/null >+++ b/LayoutTests/inspector/audit/setup-expected.txt >@@ -0,0 +1,11 @@ >+Tests for the Audit.setup command. >+ >+ >+== Running test suite: Audit.setup >+-- Running test case: Audit.setup.Invalid.SequentialCalls >+Audit setup... >+Audit setup... >+PASS: Should produce an exception. >+Error: Must call teardown before calling setup again. >+Audit teardown... >+ >diff --git a/LayoutTests/inspector/audit/setup.html b/LayoutTests/inspector/audit/setup.html >new file mode 100644 >index 0000000000000000000000000000000000000000..cb7491389e0d62047407eb08426145cdf386cf76 >--- /dev/null >+++ b/LayoutTests/inspector/audit/setup.html >@@ -0,0 +1,31 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+ >+function test() >+{ >+ let suite = InspectorTest.Audit.createSuite("Audit.setup"); >+ >+ suite.addTestCase({ >+ name: "Audit.setup.Invalid.SequentialCalls", >+ description: "Check that additional calls to Audit.setup fail.", >+ async test() { >+ await InspectorTest.Audit.setupAudit(); >+ await InspectorTest.expectException(async () => { >+ await InspectorTest.Audit.setupAudit(); >+ }); >+ await InspectorTest.Audit.teardownAudit(); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Tests for the Audit.setup command.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/audit/teardown-expected.txt b/LayoutTests/inspector/audit/teardown-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..f910249b3087dc6fe0a06f3290d88fb40031e12c >--- /dev/null >+++ b/LayoutTests/inspector/audit/teardown-expected.txt >@@ -0,0 +1,16 @@ >+Tests for the Audit.teardown command. >+ >+ >+== Running test suite: Audit.teardown >+-- Running test case: Audit.teardown.Invalid.WithoutSetup >+Audit teardown... >+PASS: Should produce an exception. >+Error: Must call setup before calling teardown. >+ >+-- Running test case: Audit.teardown.Invalid.SequentialCalls >+Audit setup... >+Audit teardown... >+Audit teardown... >+PASS: Should produce an exception. >+Error: Must call setup before calling teardown. >+ >diff --git a/LayoutTests/inspector/audit/teardown.html b/LayoutTests/inspector/audit/teardown.html >new file mode 100644 >index 0000000000000000000000000000000000000000..7e4122224c4a21ae99dccc44f7a93a85d772c581 >--- /dev/null >+++ b/LayoutTests/inspector/audit/teardown.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/audit-utilities.js"></script> >+<script> >+ >+function test() >+{ >+ let suite = InspectorTest.Audit.createSuite("Audit.teardown"); >+ >+ suite.addTestCase({ >+ name: "Audit.teardown.Invalid.WithoutSetup", >+ description: "Check that Audit.teardown fails if called before Audit.setup.", >+ async test() { >+ await InspectorTest.expectException(async () => { >+ await InspectorTest.Audit.teardownAudit(); >+ }); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.teardown.Invalid.SequentialCalls", >+ description: "Check that additional calls to Audit.teardown fail.", >+ async test() { >+ await InspectorTest.Audit.setupAudit(); >+ await InspectorTest.Audit.teardownAudit(); >+ await InspectorTest.expectException(async () => { >+ await InspectorTest.Audit.teardownAudit(); >+ }); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Tests for the Audit.teardown command.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/create-context-2d-expected.txt b/LayoutTests/inspector/canvas/create-context-2d-expected.txt >index f3c8b75eb5675e329c3b2f24689002813ac616b0..0e8c224cee578f49a07e3f1b847b1eea62e394e7 100644 >--- a/LayoutTests/inspector/canvas/create-context-2d-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-2d-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be 2D. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be 2D. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -34,8 +34,8 @@ PASS: Canvas context should be 2D. > 1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Canvas name should equal the identifier passed to -webkit-canvas. > >diff --git a/LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt b/LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt >index 8adada03ceeb93b6251f3850469a3ec1fa90eb8d..33d8a86953b6c5a6b792f557a5ce3c490ef1d2fc 100644 >--- a/LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be Bitmap Renderer. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be Bitmap Renderer. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >diff --git a/LayoutTests/inspector/canvas/create-context-webgl-expected.txt b/LayoutTests/inspector/canvas/create-context-webgl-expected.txt >index 4fa944002740e5bedccdcf855978e0d566cfe1da..b84c3114557b17d6b62fa2e3289a29f0ae95f04e 100644 >--- a/LayoutTests/inspector/canvas/create-context-webgl-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-webgl-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be WebGL. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be WebGL. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -34,8 +34,8 @@ PASS: Canvas context should be WebGL. > 1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Canvas name should equal the identifier passed to -webkit-canvas. > >diff --git a/LayoutTests/inspector/canvas/create-context-webgl2-expected.txt b/LayoutTests/inspector/canvas/create-context-webgl2-expected.txt >index e02d886ac35af4d41804e6e42a364326c116df8e..a3d700b1a52a8599e7ac80f7c7c267e2faac51a0 100644 >--- a/LayoutTests/inspector/canvas/create-context-webgl2-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-webgl2-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be WebGL2. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be WebGL2. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -34,8 +34,8 @@ PASS: Canvas context should be WebGL2. > 1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Canvas name should equal the identifier passed to -webkit-canvas. > >diff --git a/LayoutTests/inspector/canvas/create-context-webmetal-expected.txt b/LayoutTests/inspector/canvas/create-context-webmetal-expected.txt >index 4534719c296f90051bc0f48d3b046d35b96e089f..54e675a7d2a8ee0e151f599f36a00588d16cd020 100644 >--- a/LayoutTests/inspector/canvas/create-context-webmetal-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-webmetal-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be WebMetal. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be WebMetal. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -34,8 +34,8 @@ PASS: Canvas context should be WebMetal. > 1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Canvas name should equal the identifier passed to -webkit-canvas. > >diff --git a/LayoutTests/inspector/canvas/recording-2d-expected.txt b/LayoutTests/inspector/canvas/recording-2d-expected.txt >index 082f21d184a5bd50b5f5a0946a6926d373a83a6e..ce92ca7999d3cca291ebe2906a438c711998aedf 100644 >--- a/LayoutTests/inspector/canvas/recording-2d-expected.txt >+++ b/LayoutTests/inspector/canvas/recording-2d-expected.txt >@@ -45,8 +45,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > 1: arc(6, 7, 8, 9, 10, true) > swizzleTypes: [Number, Number, Number, Number, Number, Boolean] > trace: >@@ -58,8 +58,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > > -- Running test case: Canvas.recording2D.multipleFrames > initialState: >@@ -104,8 +104,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > 1: arc(6, 7, 8, 9, 10, true) > swizzleTypes: [Number, Number, Number, Number, Number, Boolean] > trace: >@@ -117,8 +117,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > 1: (duration) > 0: arcTo(1, 2, 3, 4, 5) > swizzleTypes: [Number, Number, Number, Number, Number] >@@ -1131,8 +1131,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > > -- Running test case: Canvas.recording2D.Console > PASS: The recording should have the name "TEST". >diff --git a/LayoutTests/inspector/canvas/recording-webgl-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-expected.txt >index d8bc49cee10c874f995989e04c4537bb1398b5b2..8821e93dab7d52307cd21af78c2924227c792ab0 100644 >--- a/LayoutTests/inspector/canvas/recording-webgl-expected.txt >+++ b/LayoutTests/inspector/canvas/recording-webgl-expected.txt >@@ -21,8 +21,8 @@ frames: > 3: performActions > 4: Global Code > 5: evaluateWithScopeExtension >- 6: _evaluateOn >- 7: _evaluateAndWrap >+ 6: (anonymous function) >+ 7: _wrapCall > > -- Running test case: Canvas.recordingWebGL.multipleFrames > initialState: >@@ -43,8 +43,8 @@ frames: > 3: performActions > 4: Global Code > 5: evaluateWithScopeExtension >- 6: _evaluateOn >- 7: _evaluateAndWrap >+ 6: (anonymous function) >+ 7: _wrapCall > 1: (duration) > 0: attachShader(0, 0) > swizzleTypes: [WebGLProgram, WebGLShader] >@@ -1046,8 +1046,8 @@ frames: > 3: performActions > 4: Global Code > 5: evaluateWithScopeExtension >- 6: _evaluateOn >- 7: _evaluateAndWrap >+ 6: (anonymous function) >+ 7: _wrapCall > > -- Running test case: Canvas.recordingWebGL.Console > PASS: The recording should have the name "TEST". >diff --git a/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt >index 51cfda8add05fa785041a676f1a61aabc603e52b..7fe4dc6d02da5da150b4e2ec1d85a4160c16fad1 100644 >--- a/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt >+++ b/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt >@@ -19,8 +19,8 @@ frames: > 1: performActions > 2: Global Code > 3: evaluateWithScopeExtension >- 4: _evaluateOn >- 5: _evaluateAndWrap >+ 4: (anonymous function) >+ 5: _wrapCall > 1: clearColor(0, 0, 0, 1) > swizzleTypes: [Number, Number, Number, Number] > trace: >@@ -29,8 +29,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > 2: clear(16384) > swizzleTypes: [Number] > trace: >@@ -39,8 +39,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > snapshot: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABGxJREFUeAHt1MEJwDAMBEHF/fec5OEitDAG/485cc/MvP/3CBAgsF7grE8oIAECBK6AwXIKBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIfSAwCK2+QFXIAAAAASUVORK5CYII=" > 3: bufferData(34962, 0, 35044) > swizzleTypes: [Number, TypedArray, Number] >@@ -50,8 +50,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > 4: drawArrays(4, 0, 3) > swizzleTypes: [Number, Number, Number] > trace: >@@ -60,8 +60,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > snapshot: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAAB4lJREFUeAHt3GtSG1kMgFEnlYV5a14Z7IyYFDeAXy01bVvqPlSlGoxMLkd3vpo/M792u93b8Y8PAgQIlBf4Xf6EDkiAAIEPAcFyFQgQaCMgWG1W5aAECAiWO0CAQBsBwWqzKgclQECw3AECBNoICFabVTkoAQKC5Q4QINBGQLDarMpBCRAQLHeAAIE2AoLVZlUOSoCAYLkDBAi0ERCsNqtyUAIEBMsdIECgjYBgtVmVgxIgIFjuAAECbQQEq82qHJQAAcFyBwgQaCMgWG1W5aAECAiWO0CAQBsBwWqzKgclQECw3AECBNoICFabVTkoAQKC5Q4QINBGQLDarMpBCRAQLHeAAIE2AoLVZlUOSoCAYLkDBAi0ERCsNqtyUAIEBMsdIECgjYBgtVmVgxIgIFjuAAECbQQEq82qHJQAAcFyBwgQaCMgWG1W5aAECAiWO0CAQBsBwUqsar/fJ6aNEiCwtIBgJURfXl5273+EK4FmlMDCAm/Hn+dPwODty8cxXG/HcHELuLlf/vla8A7AjGJ+6dX/T4XL/YneH3OL3JVFfsgm/k3jf6UufCJc7pEgPeQOPOQvWUXQLnTq7CXhcp+E66534K4/fBWhGhfwrE43XhAu92rcG89F78KiP2xVgTq9aDf6dPVbwuV+nd4jX//oTvzozasO1OnFulqlwDeEyz07vU++nnUnZr1pU6EaFyvQpckR4XLfxn3ynHUXZr1JsCbTdHtAuNw7wZp1B2a9SbBu9yj8XeFy/4QrdQdSw5sM1bhQ4QrNGBQu93DcM8+bd+HmNzcdqNOLM6ND6bcIl/t4eu98/e1OfPtCoG78t3Hp+vzgDcLlXgrV+R349YFyfPiYEjj2Z2pk8e+/vr7uDofD7v3pg8DWBQQrcQOeEaxxPOEaEp5bFhCsxPafGaxxTOEaEp5bFBCsxNYrBGscV7iGhOeWBAQrse1KwRrHFq4h4bkFAcFKbLlisMbxhWtIeK5ZQLAS260crPFrCNeQ8FyjgGAlttohWOPXEa4h4bkmAcFKbLNTsMavJVxDwnMNAoKV2GLHYI1fT7iGhGdnAcFKbK9zsMavKVxDwrOjgGAltraGYI1fV7iGhGcnAcFKbGtNwRq/tnANCc8OAoKV2NIagzV+feEaEp6VBQQrsZ01B2swCNeQ8KwoIFiJrWwhWINDuIaEZyUBwUpsY0vBGizCNSQ8KwgIVmILWwzW4BGuIeH5TAHBSuhvOViDSbiGhOczBAQroS5Yn1jC9Wnhs8cJCFbCWrDOsYTr3MQr9xMQrIStYF3HEq7rNr6znIBgJSwFaxpLuKaNTMwXEKyEnWDFsYQrbmUyLiBYcaudYCWwPkaFK2/mHdcFBOu6zdl3BOuMJPyCcIWpDN4QEKwbOKffEqxTkfzXwpU3845PAcH6tJj8TLAmicIDwhWmMvhFQLC+YEx9KlhTQvnvC1febMvvEKzE9gUrgZUcFa4k2EbHBSuxeMFKYM0cFa6ZcBt5m2AlFi1YCawfjgrXDwFX+nbBSixWsBJYC40K10KQK/kxgpVYpGAlsBYeFa6FQZv+OMFKLE6wElh3GhWuO8E2+bGClViUYCWw7jwqXHcGLvrjBSuxGMFKYD1oVLgeBF3krxGsxCIEK4H14FHhejD4k/46wUrAC1YC60mjwvUk+Af9tYKVgBasBNaTR4XryQu4018vWAlYwUpgFRkVriKLWOgYgpWAFKwEVrFR4Sq2kJnHEawEnGAlsIqOClfRxQSPJVhBqPcxwUpgFR8VruILunI8wboCc+llwbqk0vs14eq1P8FK7EuwEljNRoWrx8IEK7EnwUpgNR0VrtqLE6zEfgQrgdV8VLhqLlCwEnsRrATWSkaFq9YiBSuxD8FKYK1sVLhqLFSwEnsQrATWSkeF67mLFayEv2AlsFY+KlzPWbBgJdwFK4G1kVHheuyiBSvhLVgJrI2NCtdjFi5YCWfBSmBtdFS47rt4wUr4ClYCa+OjwnWfCyBYCVfBSmAZ/ScgXMteBMFKeApWAsvoNwHh+sYx+wvBStAJVgLL6EUB4brIEn5RsMJU/n9YCSqjEwLCNQF05dt/rrzu5QsCh8PhwqteIjBPYL/f/3vje7x8xAT8G1bMyRQBAgUEfhc4gyMQIEAgJCBYISZDBAhUEBCsCltwBgIEQgKCFWIyRIBABQHBqrAFZyBAICQgWCEmQwQIVBAQrApbcAYCBEICghViMkSAQAUBwaqwBWcgQCAkIFghJkMECFQQEKwKW3AGAgRCAoIVYjJEgEAFAcGqsAVnIEAgJCBYISZDBAhUEBCsCltwBgIEQgKCFWIyRIBABQHBqrAFZyBAICQgWCEmQwQIVBAQrApbcAYCBEICghViMkSAQAUBwaqwBWcgQCAkIFghJkMECFQQEKwKW3AGAgRCAoIVYjJEgEAFAcGqsAVnIEAgJCBYISZDBAhUEBCsCltwBgIEQgKCFWIyRIBABQHBqrAFZyBAICQgWCEmQwQIVBAQrApbcAYCBEICghViMkSAQAUBwaqwBWcgQCAkIFghJkMECFQQEKwKW3AGAgRCAoIVYjJEgEAFgb/VewCWguWlCQAAAABJRU5ErkJggg==" > 5: clearColor(0, 0, 0, 1) > swizzleTypes: [Number, Number, Number, Number] >@@ -71,8 +71,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > 6: clear(16384) > swizzleTypes: [Number] > trace: >@@ -81,8 +81,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > snapshot: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABGxJREFUeAHt1MEJwDAMBEHF/fec5OEitDAG/485cc/MvP/3CBAgsF7grE8oIAECBK6AwXIKBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIfSAwCK2+QFXIAAAAASUVORK5CYII=" > 7: bufferData(34962, 0, 35044) > swizzleTypes: [Number, TypedArray, Number] >@@ -92,8 +92,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > 8: bufferData(34963, 0, 35044) > swizzleTypes: [Number, TypedArray, Number] > trace: >@@ -102,8 +102,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > 9: drawElements(4, 3, 5123, 0) > swizzleTypes: [Number, Number, Number, Number] > trace: >@@ -112,8 +112,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > snapshot: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABodJREFUeAHt1I1OG0kQhVGI9r2BJyesEhQCJhhXT3XfnhNptcG4f+bU5Lu/u7t7fvnPHwIECCwv8GP5G7ogAQIEfgsIlleBAIEYAcGKGZWLEiAgWN4BAgRiBAQrZlQuSoCAYHkHCBCIERCsmFG5KAECguUdIEAgRkCwYkblogQICJZ3gACBGAHBihmVixIgIFjeAQIEYgQEK2ZULkqAgGB5BwgQiBEQrJhRuSgBAoLlHSBAIEZAsGJG5aIECAiWd4AAgRgBwYoZlYsSICBY3gECBGIEBCtmVC5KgIBgeQcIEIgREKyYUbkoAQKC5R0gQCBGQLBiRuWiBAgIlneAAIEYAcGKGZWLEiAgWN4BAgRiBAQrZlQuSoCAYHkHCBCIERCsmFG5KAECguUdIEAgRkCwYkblogQICJZ3gACBGAHBihmVixIgIFjeAQIEYgQEK2ZULrqjwOPj446Pddgz3b/s/HzY7jYmQOCiwGuoHh4e7u7v//9n6M81Av9d8yXfIUBgjMDbUI3Z8Vy7CNa55u1pJwkI1Rh4wRrjaBcCFwWE6iLLzR8K1s10FhL4XECoPrep/EawKnrWEngnIFTvQAb/KFiDQW13TgGh6pm7YPU4O2VTAaHqHaxg9Xo7bRMBoZozSMGa4+7UUAGhmjs4wZrr7/QQAaFaY1CCtcYc3GJRAaFaazCCtdY83GYRAaFaZBDvriFY70D8eG4BoVp7/oK19nzcrklAqJqgi8cIVhHQ8mwBocqan2BlzcttBwkI1SDI5m0EqxnccXMFhGquf/V0waoKWh8hIFQRY/rykoL1JZEvJAsIVfL0Pt5dsD6a+GQDAaHaYIgXHkGwLqD4KFdAqHJnd83NBesaJd9ZXkColh/RkAsK1hBGm8wSEKpZ8nPOFaw57k4tCghVETB0uWCFDu6s1xaqs07+13ML1rnnH/P0QhUzqkMvKliH8tq8KiBUVcG91gvWXvPc5mmEaptRDn0QwRrKabOqgFBVBfdeL1h7zzfm6YQqZlRTLypYU/kdLlTege8ICNZ3tHx3mIBQDaM81UaCdapxz39YoZo/g+QbCFby9ILuLlRBw1r4qoK18HB2uJpQ7TDFdZ5BsNaZxVY3EaqtxrnMwwjWMqPY4yJCtcccV30KwVp1MmH3EqqwgYVeV7BCB7fKtYVqlUmc4x6CdY45D39KoRpOasMrBATrCiRf+SMgVH8s/K1fQLD6zSNPFKrIsW13acHabqRjH0ioxnrarSYgWDW/bVcL1bajjX4wwYoe3/jLC9V4UzuOExCscZbROwlV9PhOc3nBOs2oLz+oUF128emaAoK15lwOv5VQHU7sgAMEBOsA1JW3FKqVp+NuXwkI1ldCm/xeqDYZ5MkfQ7A2fwGEavMBn+zxBGvTgQvVpoM9+WMJ1mYvgFBtNlCP85eAYP3FkfuDUOXOzs2vFxCs662W/KZQLTkWlzpIQLAOgj16W6E6Wtj+KwoI1opT+cedhOofOH61vYBghYxYqEIG5ZqHCgjWobz1zYWqbmiHfQQEa9FZCtWig3GtqQKCNZX/4+FC9dHEJwReBQTrVWLy/4Vq8gAcHyEgWJPHJFSTB+D4KAHBmjQuoZoE79hoAcFqHp9QNYM7bisBwWoap1A1QTtmawHBOni8QnUwsO1PJSBYB41bqA6Cte2pBQRr8PiFajCo7Qi8ERCsNxiVvwpVRc9aAtcJCNZ1Tp9+S6g+pfELAsMFBOtGUqG6Ec4yAgUBwfomnlB9E8zXCQwUEKwbMZ+enm5caRkBArcK3L8sfL51sXUECBDoFPjReZizCBAgUBEQrIqetQQItAoIViu3wwgQqAgIVkXPWgIEWgUEq5XbYQQIVAQEq6JnLQECrQKC1crtMAIEKgKCVdGzlgCBVgHBauV2GAECFQHBquhZS4BAq4BgtXI7jACBioBgVfSsJUCgVUCwWrkdRoBARUCwKnrWEiDQKiBYrdwOI0CgIiBYFT1rCRBoFRCsVm6HESBQERCsip61BAi0CghWK7fDCBCoCAhWRc9aAgRaBQSrldthBAhUBASromctAQKtAoLVyu0wAgQqAoJV0bOWAIFWAcFq5XYYAQIVAcGq6FlLgECrgGC1cjuMAIGKgGBV9KwlQKBVQLBauR1GgEBFQLAqetYSINAqIFit3A4jQKAiIFgVPWsJEGgVEKxWbocRIFAREKyKnrUECLQKCFYrt8MIEKgICFZFz1oCBFoFfgJUguTj1eIlHgAAAABJRU5ErkJggg==" > 10: clearColor(0, 0, 0, 1) > swizzleTypes: [Number, Number, Number, Number] >@@ -123,8 +123,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > 11: clear(16384) > swizzleTypes: [Number] > trace: >@@ -133,7 +133,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > snapshot: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABGxJREFUeAHt1MEJwDAMBEHF/fec5OEitDAG/485cc/MvP/3CBAgsF7grE8oIAECBK6AwXIKBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIfSAwCK2+QFXIAAAAASUVORK5CYII=" > >diff --git a/LayoutTests/inspector/model/remote-object-expected.txt b/LayoutTests/inspector/model/remote-object-expected.txt >index 37de7f92814e5e7d38c8018c0f2347261de4217e..9a1bc253871bc05a676feb5980b739702c3b15e8 100644 >--- a/LayoutTests/inspector/model/remote-object-expected.txt >+++ b/LayoutTests/inspector/model/remote-object-expected.txt >@@ -1656,7 +1656,7 @@ EXPRESSION: error = null; try { [].x.x; } catch (e) { error = e; }; error > { > "_name": "stack", > "_type": "string", >- "_value": "global code\nevaluateWithScopeExtension@[native code]\n_evaluateOn\n_evaluateAndWrap" >+ "_value": "global code\nevaluateWithScopeExtension@[native code]\n\n_wrapCall" > } > ], > "_entries": null >@@ -1695,7 +1695,7 @@ EXPRESSION: error = null; try { eval("if()"); } catch (e) { error = e; }; error > { > "_name": "stack", > "_type": "string", >- "_value": "eval@[native code]\nglobal code\nevaluateWithScopeExtension@[native code]\n_evaluateOn\n_evaluateAndWrap" >+ "_value": "eval@[native code]\nglobal code\nevaluateWithScopeExtension@[native code]\n\n_wrapCall" > } > ], > "_entries": null >@@ -1729,7 +1729,7 @@ EXPRESSION: error = null; try { document.createTextNode("").splitText(100); } ca > { > "_name": "stack", > "_type": "string", >- "_value": "splitText@[native code]\nglobal code\nevaluateWithScâ¦ension@[native code]\n_evaluateOn\n_evaluateAndWrap" >+ "_value": "splitText@[native code]\nglobal code\nevaluateWithScâ¦ension@[native code]\n\n_wrapCall" > }, > { > "_name": "code", >diff --git a/LayoutTests/inspector/model/stack-trace-expected.txt b/LayoutTests/inspector/model/stack-trace-expected.txt >index 28de476b37f97f1ec6a8f0fe9097ca8e357fe248..7f98eb454f624cea9595d168e219c4cdee4952ee 100644 >--- a/LayoutTests/inspector/model/stack-trace-expected.txt >+++ b/LayoutTests/inspector/model/stack-trace-expected.txt >@@ -17,6 +17,6 @@ StackTrace: 10 > 6: triggerConsoleMessage (stack-trace.html:9) - nativeCode (false) programCode (false) > 7: Global Code (Anonymous Script 2 (line 1)) - nativeCode (false) programCode (true) > 8: evaluateWithScopeExtension - nativeCode (true) programCode (false) >- 9: _evaluateOn - nativeCode (true) programCode (false) >- 10: _evaluateAndWrap - nativeCode (true) programCode (false) >+ 9: - nativeCode (true) programCode (false) >+ 10: _wrapCall - nativeCode (true) programCode (false) >
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 193149
:
358347
|
358357
|
358359
|
358375
|
358380
|
358394
|
358400
|
358409
|
358422
|
358462
|
358467
|
358843
|
359007
|
359118
|
359120
|
359124
|
359132
|
359139