<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[210308] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210308">210308</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2017-01-04 17:17:07 -0800 (Wed, 04 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: teach the protocol generator about platform-specific types, events, and commands
https://bugs.webkit.org/show_bug.cgi?id=166003
<rdar://problem/28718990>
Reviewed by Joseph Pecoraro.
Source/JavaScriptCore:
Make it possible to test inspector protocol generator output for different platforms.
Move existing tests to the generic/ subdirectory, as they are to be generated
without any specific platform. Later, platform-specific generator behavior will be
tested by cloning the same test to multiple platform directories.
* inspector/scripts/tests{/ => /generic/}commands-with-async-attribute.json
* inspector/scripts/tests{/ => /generic/}commands-with-optional-call-return-parameters.json
* inspector/scripts/tests{/ => /generic/}domains-with-varying-command-sizes.json
* inspector/scripts/tests{/ => /generic/}enum-values.json
* inspector/scripts/tests{/ => /generic/}events-with-optional-parameters.json
* inspector/scripts/tests{/ => /generic/}expected/commands-with-async-attribute.json-result
* inspector/scripts/tests{/ => /generic/}expected/commands-with-optional-call-return-parameters.json-result
* inspector/scripts/tests{/ => /generic/}expected/domains-with-varying-command-sizes.json-result
* inspector/scripts/tests{/ => /generic/}expected/enum-values.json-result
* inspector/scripts/tests{/ => /generic/}expected/events-with-optional-parameters.json-result
* inspector/scripts/tests{/ => /generic/}expected/fail-on-domain-availability.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-command-call-parameter-names.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-command-return-parameter-names.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-event-parameter-names.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-type-declarations.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-type-member-names.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-enum-with-no-values.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-number-typed-optional-parameter-flag.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-number-typed-optional-type-member.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-string-typed-optional-parameter-flag.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-string-typed-optional-type-member.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-type-declaration-using-type-reference.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-type-reference-as-primitive-type.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-type-with-lowercase-name.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-unknown-type-reference-in-type-declaration.json-error
* inspector/scripts/tests{/ => /generic/}expected/fail-on-unknown-type-reference-in-type-member.json-error
* inspector/scripts/tests{/ => /generic/}expected/generate-domains-with-feature-guards.json-result
* inspector/scripts/tests{/ => /generic/}expected/same-type-id-different-domain.json-result
* inspector/scripts/tests{/ => /generic/}expected/shadowed-optional-type-setters.json-result
* inspector/scripts/tests{/ => /generic/}expected/type-declaration-aliased-primitive-type.json-result
* inspector/scripts/tests{/ => /generic/}expected/type-declaration-array-type.json-result
* inspector/scripts/tests{/ => /generic/}expected/type-declaration-enum-type.json-result
* inspector/scripts/tests{/ => /generic/}expected/type-declaration-object-type.json-result
* inspector/scripts/tests{/ => /generic/}expected/type-requiring-runtime-casts.json-result
* inspector/scripts/tests{/ => /generic/}fail-on-domain-availability.json
* inspector/scripts/tests{/ => /generic/}fail-on-duplicate-command-call-parameter-names.json
* inspector/scripts/tests{/ => /generic/}fail-on-duplicate-command-return-parameter-names.json
* inspector/scripts/tests{/ => /generic/}fail-on-duplicate-event-parameter-names.json
* inspector/scripts/tests{/ => /generic/}fail-on-duplicate-type-declarations.json
* inspector/scripts/tests{/ => /generic/}fail-on-duplicate-type-member-names.json
* inspector/scripts/tests{/ => /generic/}fail-on-enum-with-no-values.json
* inspector/scripts/tests{/ => /generic/}fail-on-number-typed-optional-parameter-flag.json
* inspector/scripts/tests{/ => /generic/}fail-on-number-typed-optional-type-member.json
* inspector/scripts/tests{/ => /generic/}fail-on-string-typed-optional-parameter-flag.json
* inspector/scripts/tests{/ => /generic/}fail-on-string-typed-optional-type-member.json
* inspector/scripts/tests{/ => /generic/}fail-on-type-declaration-using-type-reference.json
* inspector/scripts/tests{/ => /generic/}fail-on-type-reference-as-primitive-type.json
* inspector/scripts/tests{/ => /generic/}fail-on-type-with-lowercase-name.json
* inspector/scripts/tests{/ => /generic/}fail-on-unknown-type-reference-in-type-declaration.json
* inspector/scripts/tests{/ => /generic/}fail-on-unknown-type-reference-in-type-member.json
* inspector/scripts/tests{/ => /generic/}generate-domains-with-feature-guards.json
* inspector/scripts/tests{/ => /generic/}same-type-id-different-domain.json
* inspector/scripts/tests{/ => /generic/}shadowed-optional-type-setters.json
* inspector/scripts/tests{/ => /generic/}type-declaration-aliased-primitive-type.json
* inspector/scripts/tests{/ => /generic/}type-declaration-array-type.json
* inspector/scripts/tests{/ => /generic/}type-declaration-enum-type.json
* inspector/scripts/tests{/ => /generic/}type-declaration-object-type.json
* inspector/scripts/tests{/ => /generic/}type-requiring-runtime-casts.json
Tools:
Teach run-inspector-generator-tests to generate test output using the platform name
derived from the directory that the test is in. For example, tests in the /generic/
subdirectory will pass `--platform generic` to generate-inspector-protocol-bindings.py.
* Scripts/webkitpy/inspector/main.py:
(InspectorGeneratorTests.generate_from_json):
(InspectorGeneratorTests.run_tests):
(InspectorGeneratorTests.main):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpyinspectormainpy">trunk/Tools/Scripts/webkitpy/inspector/main.py</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/</li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericcommandswithasyncattributejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-async-attribute.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericcommandswithoptionalcallreturnparametersjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-optional-call-return-parameters.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericdomainswithvaryingcommandsizesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/domains-with-varying-command-sizes.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericenumvaluesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/enum-values.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericeventswithoptionalparametersjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/events-with-optional-parameters.json</a></li>
<li>trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/</li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedcommandswithasyncattributejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedcommandswithoptionalcallreturnparametersjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddomainswithvaryingcommandsizesjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedenumvaluesjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedeventswithoptionalparametersjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailondomainavailabilityjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-availability.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicatecommandcallparameternamesjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-call-parameter-names.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicatecommandreturnparameternamesjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-return-parameter-names.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicateeventparameternamesjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-event-parameter-names.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicatetypedeclarationsjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-declarations.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicatetypemembernamesjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-member-names.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonenumwithnovaluesjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-enum-with-no-values.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonnumbertypedoptionalparameterflagjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-parameter-flag.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonnumbertypedoptionaltypememberjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-type-member.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonstringtypedoptionalparameterflagjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-parameter-flag.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonstringtypedoptionaltypememberjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-type-member.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailontypedeclarationusingtypereferencejsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-declaration-using-type-reference.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailontypereferenceasprimitivetypejsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-reference-as-primitive-type.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailontypewithlowercasenamejsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-with-lowercase-name.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonunknowntypereferenceintypedeclarationjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-declaration.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonunknowntypereferenceintypememberjsonerror">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-member.json-error</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedgeneratedomainswithfeatureguardsjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedsametypeiddifferentdomainjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedshadowedoptionaltypesettersjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationaliasedprimitivetypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationarraytypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationenumtypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationobjecttypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtyperequiringruntimecastsjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailondomainavailabilityjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-availability.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicatecommandcallparameternamesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-call-parameter-names.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicatecommandreturnparameternamesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-return-parameter-names.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicateeventparameternamesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-event-parameter-names.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicatetypedeclarationsjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-declarations.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicatetypemembernamesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-member-names.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonenumwithnovaluesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-enum-with-no-values.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonnumbertypedoptionalparameterflagjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-parameter-flag.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonnumbertypedoptionaltypememberjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-type-member.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonstringtypedoptionalparameterflagjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-parameter-flag.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonstringtypedoptionaltypememberjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-type-member.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailontypedeclarationusingtypereferencejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-declaration-using-type-reference.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailontypereferenceasprimitivetypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-reference-as-primitive-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailontypewithlowercasenamejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-with-lowercase-name.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonunknowntypereferenceintypedeclarationjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-declaration.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonunknowntypereferenceintypememberjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-member.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericgeneratedomainswithfeatureguardsjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/generate-domains-with-feature-guards.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericsametypeiddifferentdomainjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/same-type-id-different-domain.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericshadowedoptionaltypesettersjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/shadowed-optional-type-setters.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenerictypedeclarationaliasedprimitivetypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-aliased-primitive-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenerictypedeclarationarraytypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-array-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenerictypedeclarationenumtypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-enum-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenerictypedeclarationobjecttypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-object-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenerictyperequiringruntimecastsjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-requiring-runtime-casts.json</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestscommandswithasyncattributejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-async-attribute.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestscommandswithoptionalcallreturnparametersjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-optional-call-return-parameters.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsdomainswithvaryingcommandsizesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/domains-with-varying-command-sizes.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsenumvaluesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/enum-values.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestseventswithoptionalparametersjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/events-with-optional-parameters.json</a></li>
<li>trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/</li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailondomainavailabilityjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-domain-availability.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatecommandcallparameternamesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-call-parameter-names.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatecommandreturnparameternamesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-return-parameter-names.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicateeventparameternamesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-event-parameter-names.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatetypedeclarationsjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-declarations.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatetypemembernamesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-member-names.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonenumwithnovaluesjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-enum-with-no-values.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonnumbertypedoptionalparameterflagjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-parameter-flag.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonnumbertypedoptionaltypememberjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-type-member.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonstringtypedoptionalparameterflagjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-parameter-flag.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonstringtypedoptionaltypememberjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-type-member.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailontypedeclarationusingtypereferencejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-declaration-using-type-reference.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailontypereferenceasprimitivetypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-reference-as-primitive-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailontypewithlowercasenamejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-with-lowercase-name.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonunknowntypereferenceintypedeclarationjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-declaration.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsfailonunknowntypereferenceintypememberjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-member.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgeneratedomainswithfeatureguardsjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generate-domains-with-feature-guards.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestssametypeiddifferentdomainjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/same-type-id-different-domain.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsshadowedoptionaltypesettersjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/shadowed-optional-type-setters.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationaliasedprimitivetypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-aliased-primitive-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationarraytypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-array-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationenumtypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-enum-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationobjecttypejson">trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-object-type.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptsteststyperequiringruntimecastsjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/type-requiring-runtime-casts.json</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -6,6 +6,79 @@
</span><span class="cx">
</span><span class="cx"> Reviewed by Joseph Pecoraro.
</span><span class="cx">
</span><ins>+ Make it possible to test inspector protocol generator output for different platforms.
+
+ Move existing tests to the generic/ subdirectory, as they are to be generated
+ without any specific platform. Later, platform-specific generator behavior will be
+ tested by cloning the same test to multiple platform directories.
+
+ * inspector/scripts/tests{/ => /generic/}commands-with-async-attribute.json
+ * inspector/scripts/tests{/ => /generic/}commands-with-optional-call-return-parameters.json
+ * inspector/scripts/tests{/ => /generic/}domains-with-varying-command-sizes.json
+ * inspector/scripts/tests{/ => /generic/}enum-values.json
+ * inspector/scripts/tests{/ => /generic/}events-with-optional-parameters.json
+ * inspector/scripts/tests{/ => /generic/}expected/commands-with-async-attribute.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/commands-with-optional-call-return-parameters.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/domains-with-varying-command-sizes.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/enum-values.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/events-with-optional-parameters.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-domain-availability.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-command-call-parameter-names.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-command-return-parameter-names.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-event-parameter-names.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-type-declarations.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-duplicate-type-member-names.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-enum-with-no-values.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-number-typed-optional-parameter-flag.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-number-typed-optional-type-member.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-string-typed-optional-parameter-flag.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-string-typed-optional-type-member.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-type-declaration-using-type-reference.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-type-reference-as-primitive-type.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-type-with-lowercase-name.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-unknown-type-reference-in-type-declaration.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/fail-on-unknown-type-reference-in-type-member.json-error
+ * inspector/scripts/tests{/ => /generic/}expected/generate-domains-with-feature-guards.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/same-type-id-different-domain.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/shadowed-optional-type-setters.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/type-declaration-aliased-primitive-type.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/type-declaration-array-type.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/type-declaration-enum-type.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/type-declaration-object-type.json-result
+ * inspector/scripts/tests{/ => /generic/}expected/type-requiring-runtime-casts.json-result
+ * inspector/scripts/tests{/ => /generic/}fail-on-domain-availability.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-duplicate-command-call-parameter-names.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-duplicate-command-return-parameter-names.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-duplicate-event-parameter-names.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-duplicate-type-declarations.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-duplicate-type-member-names.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-enum-with-no-values.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-number-typed-optional-parameter-flag.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-number-typed-optional-type-member.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-string-typed-optional-parameter-flag.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-string-typed-optional-type-member.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-type-declaration-using-type-reference.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-type-reference-as-primitive-type.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-type-with-lowercase-name.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-unknown-type-reference-in-type-declaration.json
+ * inspector/scripts/tests{/ => /generic/}fail-on-unknown-type-reference-in-type-member.json
+ * inspector/scripts/tests{/ => /generic/}generate-domains-with-feature-guards.json
+ * inspector/scripts/tests{/ => /generic/}same-type-id-different-domain.json
+ * inspector/scripts/tests{/ => /generic/}shadowed-optional-type-setters.json
+ * inspector/scripts/tests{/ => /generic/}type-declaration-aliased-primitive-type.json
+ * inspector/scripts/tests{/ => /generic/}type-declaration-array-type.json
+ * inspector/scripts/tests{/ => /generic/}type-declaration-enum-type.json
+ * inspector/scripts/tests{/ => /generic/}type-declaration-object-type.json
+ * inspector/scripts/tests{/ => /generic/}type-requiring-runtime-casts.json
+
+2017-01-03 Brian Burg <bburg@apple.com>
+
+ Web Inspector: teach the protocol generator about platform-specific types, events, and commands
+ https://bugs.webkit.org/show_bug.cgi?id=166003
+ <rdar://problem/28718990>
+
+ Reviewed by Joseph Pecoraro.
+
</ins><span class="cx"> Add a --platform argument to generate-inspector-protocol-bindings.py and propagate
</span><span class="cx"> the specified platform to each generator. This will be used in the next few patches
</span><span class="cx"> to exclude types, events, and commands that are unsupported by the backend platform.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestscommandswithasyncattributejson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-async-attribute.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-async-attribute.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-async-attribute.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,109 +0,0 @@
</span><del>-{
- "domain": "Database",
- "types": [
- {
- "id": "DatabaseId",
- "type": "integer",
- "description": "Unique identifier of Database object."
- },
- {
- "id": "PrimaryColors",
- "type": "string",
- "enum": ["red", "green", "blue"]
- },
- {
- "id": "ColorList",
- "type": "array",
- "items": { "$ref": "PrimaryColors" }
- },
- {
- "id": "Error",
- "type": "object",
- "description": "Database error.",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code." }
- ]
- }
- ],
- "commands": [
- {
- "name": "executeSQLSyncOptionalReturnValues",
- "parameters": [
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "query", "type": "string" }
- ],
- "returns": [
- { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
- { "name": "notes", "type": "string", "optional": true },
- { "name": "timestamp", "type": "number", "optional": true },
- { "name": "values", "type": "object", "optional": true },
- { "name": "payload", "type": "any", "optional": true },
- { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
- { "name": "sqlError", "$ref": "Error", "optional": true },
- { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
- { "name": "alternateColors", "$ref": "ColorList", "optional": true },
- { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
- ]
- },
- {
- "name": "executeSQLAsyncOptionalReturnValues",
- "async": true,
- "parameters": [
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "query", "type": "string" }
- ],
- "returns": [
- { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
- { "name": "notes", "type": "string", "optional": true },
- { "name": "timestamp", "type": "number", "optional": true },
- { "name": "values", "type": "object", "optional": true },
- { "name": "payload", "type": "any", "optional": true },
- { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
- { "name": "sqlError", "$ref": "Error", "optional": true },
- { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
- { "name": "alternateColors", "$ref": "ColorList", "optional": true },
- { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
- ]
- },
- {
- "name": "executeSQLSync",
- "parameters": [
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "query", "type": "string" }
- ],
- "returns": [
- { "name": "columnNames", "type": "array", "items": { "type": "string" } },
- { "name": "notes", "type": "string" },
- { "name": "timestamp", "type": "number" },
- { "name": "values", "type": "object" },
- { "name": "payload", "type": "any" },
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "sqlError", "$ref": "Error" },
- { "name": "alternateColors", "$ref": "ColorList" },
- { "name": "screenColor", "$ref": "PrimaryColors" },
- { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
- ]
- },
- {
- "name": "executeSQLAsync",
- "async": true,
- "parameters": [
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "query", "type": "string" }
- ],
- "returns": [
- { "name": "columnNames", "type": "array", "items": { "type": "string" } },
- { "name": "notes", "type": "string" },
- { "name": "timestamp", "type": "number" },
- { "name": "values", "type": "object" },
- { "name": "payload", "type": "any" },
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "sqlError", "$ref": "Error" },
- { "name": "screenColor", "$ref": "PrimaryColors" },
- { "name": "alternateColors", "$ref": "ColorList" },
- { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestscommandswithoptionalcallreturnparametersjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-optional-call-return-parameters.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-optional-call-return-parameters.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-optional-call-return-parameters.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,85 +0,0 @@
</span><del>-{
- "domain": "Database",
- "types": [
- {
- "id": "DatabaseId",
- "type": "integer",
- "description": "Unique identifier of Database object."
- },
- {
- "id": "PrimaryColors",
- "type": "string",
- "enum": ["red", "green", "blue"]
- },
- {
- "id": "ColorList",
- "type": "array",
- "items": { "$ref": "PrimaryColors" }
- },
- {
- "id": "Error",
- "type": "object",
- "description": "Database error.",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code." }
- ]
- }
- ],
- "commands": [
- {
- "name": "executeAllOptionalParameters",
- "parameters": [
- { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
- { "name": "notes", "type": "string", "optional": true },
- { "name": "timestamp", "type": "number", "optional": true },
- { "name": "values", "type": "object", "optional": true },
- { "name": "payload", "type": "any", "optional": true },
- { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
- { "name": "sqlError", "$ref": "Error", "optional": true },
- { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
- { "name": "alternateColors", "$ref": "ColorList", "optional": true },
- { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
- ],
- "returns": [
- { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
- { "name": "notes", "type": "string", "optional": true },
- { "name": "timestamp", "type": "number", "optional": true },
- { "name": "values", "type": "object", "optional": true },
- { "name": "payload", "type": "any", "optional": true },
- { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
- { "name": "sqlError", "$ref": "Error", "optional": true },
- { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
- { "name": "alternateColors", "$ref": "ColorList", "optional": true },
- { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
- ]
- },
- {
- "name": "executeNoOptionalParameters",
- "parameters": [
- { "name": "columnNames", "type": "array", "items": { "type": "string" } },
- { "name": "notes", "type": "string" },
- { "name": "timestamp", "type": "number" },
- { "name": "values", "type": "object" },
- { "name": "payload", "type": "any" },
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "sqlError", "$ref": "Error" },
- { "name": "screenColor", "$ref": "PrimaryColors" },
- { "name": "alternateColors", "$ref": "ColorList" },
- { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
- ],
- "returns": [
- { "name": "columnNames", "type": "array", "items": { "type": "string" } },
- { "name": "notes", "type": "string" },
- { "name": "timestamp", "type": "number" },
- { "name": "values", "type": "object" },
- { "name": "payload", "type": "any" },
- { "name": "databaseId", "$ref": "DatabaseId" },
- { "name": "sqlError", "$ref": "Error" },
- { "name": "screenColor", "$ref": "PrimaryColors" },
- { "name": "alternateColors", "$ref": "ColorList" },
- { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsdomainswithvaryingcommandsizesjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/domains-with-varying-command-sizes.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/domains-with-varying-command-sizes.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/domains-with-varying-command-sizes.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,54 +0,0 @@
</span><del>-[
-{
- "domain": "Network1",
- "commands": [
- {
- "name": "loadResource1",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- }
- ]
-},
-{
- "domain": "Network2",
- "types": [
- {
- "id": "LoaderId",
- "type": "string",
- "description": "Unique loader identifier."
- }
- ]
-},
-{
- "domain": "Network3",
- "commands": [
- {
- "name": "loadResource1",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- },
- {
- "name": "loadResource2",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- },
- {
- "name": "loadResource3",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- },
- {
- "name": "loadResource4",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- },
- {
- "name": "loadResource5",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- },
- {
- "name": "loadResource6",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- },
- {
- "name": "loadResource7",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsenumvaluesjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/enum-values.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/enum-values.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/enum-values.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-{"domains":[
-{
- "domain": "TypeDomain",
- "types": [
- {
- "id": "TypeDomainEnum",
- "type": "string",
- "enum": ["shared", "red", "green", "blue"]
- }
- ]
-},
-{
- "domain": "CommandDomain",
- "commands": [
- {
- "name": "commandWithEnumReturnValue",
- "parameters": [],
- "returns": [
- { "name": "returnValue", "type": "string", "enum": ["shared", "cyan", "magenta", "yellow"] }
- ]
- }
- ]
-},
-{
- "domain": "EventDomain",
- "events": [
- {
- "name": "eventWithEnumParameter",
- "parameters": [
- { "name": "parameter", "type": "string", "enum": ["shared", "black", "white"] }
- ]
- }
- ]
-}
-]}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestseventswithoptionalparametersjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/events-with-optional-parameters.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/events-with-optional-parameters.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/events-with-optional-parameters.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,59 +0,0 @@
</span><del>-{
- "domain": "Database",
- "types": [
- {
- "id": "DatabaseId",
- "type": "string",
- "description": "Unique identifier of Database object."
- },
- {
- "id": "PrimaryColors",
- "type": "string",
- "values": ["red", "green", "blue"]
- },
- {
- "id": "ColorList",
- "type": "array",
- "items": { "$ref": "PrimaryColors" }
- },
- {
- "id": "Error",
- "type": "object",
- "description": "Database error.",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code." }
- ]
- }
- ],
- "events": [
- {
- "name": "didExecuteOptionalParameters",
- "parameters": [
- { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
- { "name": "notes", "type": "string", "optional": true },
- { "name": "timestamp", "type": "number", "optional": true },
- { "name": "values", "type": "object", "optional": true },
- { "name": "payload", "type": "any", "optional": true },
- { "name": "sqlError", "$ref": "Error", "optional": true },
- { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
- { "name": "alternateColors", "$ref": "ColorList", "optional": true },
- { "name": "printColor", "type": "string", "values": ["cyan", "magenta", "yellow", "black"], "optional": true }
- ]
- },
- {
- "name": "didExecuteNoOptionalParameters",
- "parameters": [
- { "name": "columnNames", "type": "array", "items": { "type": "string" } },
- { "name": "notes", "type": "string" },
- { "name": "timestamp", "type": "number" },
- { "name": "values", "type": "object" },
- { "name": "payload", "type": "any" },
- { "name": "sqlError", "$ref": "Error" },
- { "name": "screenColor", "$ref": "PrimaryColors" },
- { "name": "alternateColors", "$ref": "ColorList" },
- { "name": "printColor", "type": "string", "values": ["cyan", "magenta", "yellow", "black"] }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailondomainavailabilityjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-domain-availability.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-domain-availability.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-domain-availability.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-{
- "domain": "WebOnly",
- "availability": "webb",
- "commands": [
- {
- "name": "enable"
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatecommandcallparameternamesjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-call-parameter-names.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-call-parameter-names.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-call-parameter-names.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>-{
- "domain": "Overlay",
- "commands": [
- {
- "name": "processPoints",
- "parameters": [
- { "name": "point", "type": "number" },
- { "name": "point", "type": "number" }
- ],
- "returns": [
- { "name": "result1", "type": "string" },
- { "name": "result2", "type": "string" }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatecommandreturnparameternamesjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-return-parameter-names.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-return-parameter-names.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-return-parameter-names.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>-{
- "domain": "Overlay",
- "commands": [
- {
- "name": "processPoints",
- "parameters": [
- { "name": "point1", "type": "number" },
- { "name": "point2", "type": "number" }
- ],
- "returns": [
- { "name": "result", "type": "string" },
- { "name": "result", "type": "string" }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicateeventparameternamesjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-event-parameter-names.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-event-parameter-names.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-event-parameter-names.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,12 +0,0 @@
</span><del>-{
- "domain": "Overlay",
- "events": [
- {
- "name": "processedPoints",
- "parameters": [
- { "name": "point", "type": "number" },
- { "name": "point", "type": "number" }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatetypedeclarationsjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-declarations.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-declarations.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-declarations.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-{
- "domain": "Runtime",
- "types": [
- {
- "id": "RemoteObjectId",
- "type": "string",
- "description": "Unique object identifier."
- },
- {
- "id": "RemoteObjectId",
- "type": "string",
- "description": "Unique object identifier."
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatetypemembernamesjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-member-names.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-member-names.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-member-names.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-[
-{
- "domain": "OverlayTypes",
- "types": [
- {
- "id": "Point",
- "type": "object",
- "properties": [
- { "name": "x", "type": "integer" },
- { "name": "x", "type": "integer" }
- ]
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonenumwithnovaluesjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-enum-with-no-values.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-enum-with-no-values.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-enum-with-no-values.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-{
- "domain": "Database",
- "types": [
- {
- "id": "PrimaryColors",
- "type": "string",
- "enum": []
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonnumbertypedoptionalparameterflagjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-parameter-flag.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-parameter-flag.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-parameter-flag.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-{
- "domain": "Database",
- "types": [
- {
- "id": "DatabaseId",
- "type": "string",
- "description": "Unique identifier of Database object."
- }
- ],
- "events": [
- {
- "name": "didExecuteOptionalParameters",
- "parameters": [
- { "name": "columnNames", "type": "string", "optional": 0 }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonnumbertypedoptionaltypememberjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-type-member.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-type-member.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-type-member.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>-[
-{
- "domain": "Database",
- "types": [
- {
- "id": "Error",
- "type": "object",
- "description": "Database error.",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code.", "optional": 0 }
- ]
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonstringtypedoptionalparameterflagjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-parameter-flag.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-parameter-flag.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-parameter-flag.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-{
- "domain": "Database",
- "types": [
- {
- "id": "DatabaseId",
- "type": "string",
- "description": "Unique identifier of Database object."
- }
- ],
- "events": [
- {
- "name": "didExecuteOptionalParameters",
- "parameters": [
- { "name": "columnNames", "type": "string", "optional": "true" }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonstringtypedoptionaltypememberjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-type-member.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-type-member.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-type-member.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>-[
-{
- "domain": "Database",
- "types": [
- {
- "id": "Error",
- "type": "object",
- "description": "Database error.",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code.", "optional": "false" }
- ]
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailontypedeclarationusingtypereferencejson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-declaration-using-type-reference.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-declaration-using-type-reference.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-declaration-using-type-reference.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-[
-{
- "domain": "Runtime",
- "types": [
- {
- "id": "RemoteObjectId",
- "type": "object",
- "$ref": "SomeType",
- "description": "Unique object identifier."
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailontypereferenceasprimitivetypejson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-reference-as-primitive-type.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-reference-as-primitive-type.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-reference-as-primitive-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-{
- "domain": "Database",
- "types": [
- {
- "id": "DatabaseId",
- "type": "string",
- "description": "Unique identifier of Database object."
- }
- ],
- "events": [
- {
- "name": "didExecuteOptionalParameters",
- "parameters": [
- { "name": "columnNames", "type": "DatabaseId" }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailontypewithlowercasenamejson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-with-lowercase-name.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-with-lowercase-name.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-with-lowercase-name.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-{
- "domain": "Database",
- "types": [
- {
- "id": "databaseId",
- "type": "integer",
- "description": "Unique identifier of Database object."
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonunknowntypereferenceintypedeclarationjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-declaration.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-declaration.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-declaration.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,12 +0,0 @@
</span><del>-[
-{
- "domain": "Runtime",
- "types": [
- {
- "id": "RemoteObjectId",
- "type": "dragon",
- "description": "Unique object identifier."
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsfailonunknowntypereferenceintypememberjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-member.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-member.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-member.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-[
-{
- "domain": "Fantasy",
- "types": [
- {
- "id": "DragonEgg",
- "type": "object",
- "description": "A dragon egg.",
- "properties": [
- { "name": "color", "$ref": "Color" }
- ]
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgeneratedomainswithfeatureguardsjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/generate-domains-with-feature-guards.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generate-domains-with-feature-guards.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generate-domains-with-feature-guards.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-[
-{
- "domain": "Network1",
- "featureGuard": "PLATFORM(WEB_COMMANDS)",
- "commands": [
- {
- "name": "loadResource",
- "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
- }
- ]
-},
-{
- "domain": "Network2",
- "featureGuard": "PLATFORM(WEB_TYPES)",
- "types": [
- {
- "id": "NetworkError",
- "type": "object",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code." }
- ]
- }
- ]
-},
-{
- "domain": "Network3",
- "featureGuard": "PLATFORM(WEB_EVENTS)",
- "events": [
- {
- "name": "resourceLoaded",
- "description": "A resource was loaded."
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericcommandswithasyncattributejsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestscommandswithasyncattributejson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-async-attribute.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-async-attribute.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-async-attribute.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-async-attribute.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,109 @@
</span><ins>+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "DatabaseId",
+ "type": "integer",
+ "description": "Unique identifier of Database object."
+ },
+ {
+ "id": "PrimaryColors",
+ "type": "string",
+ "enum": ["red", "green", "blue"]
+ },
+ {
+ "id": "ColorList",
+ "type": "array",
+ "items": { "$ref": "PrimaryColors" }
+ },
+ {
+ "id": "Error",
+ "type": "object",
+ "description": "Database error.",
+ "properties": [
+ { "name": "message", "type": "string", "description": "Error message." },
+ { "name": "code", "type": "integer", "description": "Error code." }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "executeSQLSyncOptionalReturnValues",
+ "parameters": [
+ { "name": "databaseId", "$ref": "DatabaseId" },
+ { "name": "query", "type": "string" }
+ ],
+ "returns": [
+ { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
+ { "name": "notes", "type": "string", "optional": true },
+ { "name": "timestamp", "type": "number", "optional": true },
+ { "name": "values", "type": "object", "optional": true },
+ { "name": "payload", "type": "any", "optional": true },
+ { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
+ { "name": "sqlError", "$ref": "Error", "optional": true },
+ { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
+ { "name": "alternateColors", "$ref": "ColorList", "optional": true },
+ { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
+ ]
+ },
+ {
+ "name": "executeSQLAsyncOptionalReturnValues",
+ "async": true,
+ "parameters": [
+ { "name": "databaseId", "$ref": "DatabaseId" },
+ { "name": "query", "type": "string" }
+ ],
+ "returns": [
+ { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
+ { "name": "notes", "type": "string", "optional": true },
+ { "name": "timestamp", "type": "number", "optional": true },
+ { "name": "values", "type": "object", "optional": true },
+ { "name": "payload", "type": "any", "optional": true },
+ { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
+ { "name": "sqlError", "$ref": "Error", "optional": true },
+ { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
+ { "name": "alternateColors", "$ref": "ColorList", "optional": true },
+ { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
+ ]
+ },
+ {
+ "name": "executeSQLSync",
+ "parameters": [
+ { "name": "databaseId", "$ref": "DatabaseId" },
+ { "name": "query", "type": "string" }
+ ],
+ "returns": [
+ { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+ { "name": "notes", "type": "string" },
+ { "name": "timestamp", "type": "number" },
+ { "name": "values", "type": "object" },
+ { "name": "payload", "type": "any" },
+ { "name": "databaseId", "$ref": "DatabaseId" },
+ { "name": "sqlError", "$ref": "Error" },
+ { "name": "alternateColors", "$ref": "ColorList" },
+ { "name": "screenColor", "$ref": "PrimaryColors" },
+ { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
+ ]
+ },
+ {
+ "name": "executeSQLAsync",
+ "async": true,
+ "parameters": [
+ { "name": "databaseId", "$ref": "DatabaseId" },
+ { "name": "query", "type": "string" }
+ ],
+ "returns": [
+ { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+ { "name": "notes", "type": "string" },
+ { "name": "timestamp", "type": "number" },
+ { "name": "values", "type": "object" },
+ { "name": "payload", "type": "any" },
+ { "name": "databaseId", "$ref": "DatabaseId" },
+ { "name": "sqlError", "$ref": "Error" },
+ { "name": "screenColor", "$ref": "PrimaryColors" },
+ { "name": "alternateColors", "$ref": "ColorList" },
+ { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericcommandswithoptionalcallreturnparametersjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestscommandswithoptionalcallreturnparametersjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-optional-call-return-parameters.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/commands-with-optional-call-return-parameters.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-optional-call-return-parameters.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-optional-call-return-parameters.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "DatabaseId",
+ "type": "integer",
+ "description": "Unique identifier of Database object."
+ },
+ {
+ "id": "PrimaryColors",
+ "type": "string",
+ "enum": ["red", "green", "blue"]
+ },
+ {
+ "id": "ColorList",
+ "type": "array",
+ "items": { "$ref": "PrimaryColors" }
+ },
+ {
+ "id": "Error",
+ "type": "object",
+ "description": "Database error.",
+ "properties": [
+ { "name": "message", "type": "string", "description": "Error message." },
+ { "name": "code", "type": "integer", "description": "Error code." }
+ ]
+ }
+ ],
+ "commands": [
+ {
+ "name": "executeAllOptionalParameters",
+ "parameters": [
+ { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
+ { "name": "notes", "type": "string", "optional": true },
+ { "name": "timestamp", "type": "number", "optional": true },
+ { "name": "values", "type": "object", "optional": true },
+ { "name": "payload", "type": "any", "optional": true },
+ { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
+ { "name": "sqlError", "$ref": "Error", "optional": true },
+ { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
+ { "name": "alternateColors", "$ref": "ColorList", "optional": true },
+ { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
+ ],
+ "returns": [
+ { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
+ { "name": "notes", "type": "string", "optional": true },
+ { "name": "timestamp", "type": "number", "optional": true },
+ { "name": "values", "type": "object", "optional": true },
+ { "name": "payload", "type": "any", "optional": true },
+ { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
+ { "name": "sqlError", "$ref": "Error", "optional": true },
+ { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
+ { "name": "alternateColors", "$ref": "ColorList", "optional": true },
+ { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
+ ]
+ },
+ {
+ "name": "executeNoOptionalParameters",
+ "parameters": [
+ { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+ { "name": "notes", "type": "string" },
+ { "name": "timestamp", "type": "number" },
+ { "name": "values", "type": "object" },
+ { "name": "payload", "type": "any" },
+ { "name": "databaseId", "$ref": "DatabaseId" },
+ { "name": "sqlError", "$ref": "Error" },
+ { "name": "screenColor", "$ref": "PrimaryColors" },
+ { "name": "alternateColors", "$ref": "ColorList" },
+ { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
+ ],
+ "returns": [
+ { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+ { "name": "notes", "type": "string" },
+ { "name": "timestamp", "type": "number" },
+ { "name": "values", "type": "object" },
+ { "name": "payload", "type": "any" },
+ { "name": "databaseId", "$ref": "DatabaseId" },
+ { "name": "sqlError", "$ref": "Error" },
+ { "name": "screenColor", "$ref": "PrimaryColors" },
+ { "name": "alternateColors", "$ref": "ColorList" },
+ { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericdomainswithvaryingcommandsizesjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsdomainswithvaryingcommandsizesjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/domains-with-varying-command-sizes.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/domains-with-varying-command-sizes.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/domains-with-varying-command-sizes.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/domains-with-varying-command-sizes.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+[
+{
+ "domain": "Network1",
+ "commands": [
+ {
+ "name": "loadResource1",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ }
+ ]
+},
+{
+ "domain": "Network2",
+ "types": [
+ {
+ "id": "LoaderId",
+ "type": "string",
+ "description": "Unique loader identifier."
+ }
+ ]
+},
+{
+ "domain": "Network3",
+ "commands": [
+ {
+ "name": "loadResource1",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ },
+ {
+ "name": "loadResource2",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ },
+ {
+ "name": "loadResource3",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ },
+ {
+ "name": "loadResource4",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ },
+ {
+ "name": "loadResource5",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ },
+ {
+ "name": "loadResource6",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ },
+ {
+ "name": "loadResource7",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericenumvaluesjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsenumvaluesjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/enum-values.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/enum-values.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/enum-values.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/enum-values.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+{"domains":[
+{
+ "domain": "TypeDomain",
+ "types": [
+ {
+ "id": "TypeDomainEnum",
+ "type": "string",
+ "enum": ["shared", "red", "green", "blue"]
+ }
+ ]
+},
+{
+ "domain": "CommandDomain",
+ "commands": [
+ {
+ "name": "commandWithEnumReturnValue",
+ "parameters": [],
+ "returns": [
+ { "name": "returnValue", "type": "string", "enum": ["shared", "cyan", "magenta", "yellow"] }
+ ]
+ }
+ ]
+},
+{
+ "domain": "EventDomain",
+ "events": [
+ {
+ "name": "eventWithEnumParameter",
+ "parameters": [
+ { "name": "parameter", "type": "string", "enum": ["shared", "black", "white"] }
+ ]
+ }
+ ]
+}
+]}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericeventswithoptionalparametersjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestseventswithoptionalparametersjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/events-with-optional-parameters.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/events-with-optional-parameters.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/events-with-optional-parameters.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/events-with-optional-parameters.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "DatabaseId",
+ "type": "string",
+ "description": "Unique identifier of Database object."
+ },
+ {
+ "id": "PrimaryColors",
+ "type": "string",
+ "values": ["red", "green", "blue"]
+ },
+ {
+ "id": "ColorList",
+ "type": "array",
+ "items": { "$ref": "PrimaryColors" }
+ },
+ {
+ "id": "Error",
+ "type": "object",
+ "description": "Database error.",
+ "properties": [
+ { "name": "message", "type": "string", "description": "Error message." },
+ { "name": "code", "type": "integer", "description": "Error code." }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "didExecuteOptionalParameters",
+ "parameters": [
+ { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
+ { "name": "notes", "type": "string", "optional": true },
+ { "name": "timestamp", "type": "number", "optional": true },
+ { "name": "values", "type": "object", "optional": true },
+ { "name": "payload", "type": "any", "optional": true },
+ { "name": "sqlError", "$ref": "Error", "optional": true },
+ { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
+ { "name": "alternateColors", "$ref": "ColorList", "optional": true },
+ { "name": "printColor", "type": "string", "values": ["cyan", "magenta", "yellow", "black"], "optional": true }
+ ]
+ },
+ {
+ "name": "didExecuteNoOptionalParameters",
+ "parameters": [
+ { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+ { "name": "notes", "type": "string" },
+ { "name": "timestamp", "type": "number" },
+ { "name": "values", "type": "object" },
+ { "name": "payload", "type": "any" },
+ { "name": "sqlError", "$ref": "Error" },
+ { "name": "screenColor", "$ref": "PrimaryColors" },
+ { "name": "alternateColors", "$ref": "ColorList" },
+ { "name": "printColor", "type": "string", "values": ["cyan", "magenta", "yellow", "black"] }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedcommandswithasyncattributejsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedcommandswithasyncattributejsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1754 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// Database.
+InspectorBackend.registerDatabaseDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Database");
+InspectorBackend.registerEnum("Database.PrimaryColors", {Red: "red", Green: "green", Blue: "blue"});
+InspectorBackend.registerCommand("Database.executeSQLSyncOptionalReturnValues", [{"name": "databaseId", "type": "number", "optional": false}, {"name": "query", "type": "string", "optional": false}], ["columnNames", "notes", "timestamp", "values", "payload", "databaseId", "sqlError", "screenColor", "alternateColors", "printColor"]);
+InspectorBackend.registerCommand("Database.executeSQLAsyncOptionalReturnValues", [{"name": "databaseId", "type": "number", "optional": false}, {"name": "query", "type": "string", "optional": false}], ["columnNames", "notes", "timestamp", "values", "payload", "databaseId", "sqlError", "screenColor", "alternateColors", "printColor"]);
+InspectorBackend.registerCommand("Database.executeSQLSync", [{"name": "databaseId", "type": "number", "optional": false}, {"name": "query", "type": "string", "optional": false}], ["columnNames", "notes", "timestamp", "values", "payload", "databaseId", "sqlError", "alternateColors", "screenColor", "printColor"]);
+InspectorBackend.registerCommand("Database.executeSQLAsync", [{"name": "databaseId", "type": "number", "optional": false}, {"name": "query", "type": "string", "optional": false}], ["columnNames", "notes", "timestamp", "values", "payload", "databaseId", "sqlError", "screenColor", "alternateColors", "printColor"]);
+InspectorBackend.activateDomain("Database");
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+class AlternateDatabaseBackendDispatcher : public AlternateBackendDispatcher {
+public:
+ virtual ~AlternateDatabaseBackendDispatcher() { }
+ virtual void executeSQLSyncOptionalReturnValues(long callId, int in_databaseId, const String& in_query) = 0;
+ virtual void executeSQLAsyncOptionalReturnValues(long callId, int in_databaseId, const String& in_query) = 0;
+ virtual void executeSQLSync(long callId, int in_databaseId, const String& in_query) = 0;
+ virtual void executeSQLAsync(long callId, int in_databaseId, const String& in_query) = 0;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+class AlternateDatabaseBackendDispatcher;
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+class DatabaseBackendDispatcherHandler {
+public:
+ // Named after parameter 'printColor' while generating command/event executeSQLSyncOptionalReturnValues.
+ enum class PrintColor {
+ Cyan = 3,
+ Magenta = 4,
+ Yellow = 5,
+ Black = 6,
+ }; // enum class PrintColor
+ virtual void executeSQLSyncOptionalReturnValues(ErrorString&, int in_databaseId, const String& in_query, RefPtr<Inspector::Protocol::Array<String>>& opt_out_columnNames, Inspector::Protocol::OptOutput<String>* opt_out_notes, Inspector::Protocol::OptOutput<double>* opt_out_timestamp, Inspector::Protocol::OptOutput<Inspector::InspectorObject>* opt_out_values, Inspector::Protocol::OptOutput<Inspector::InspectorValue>* opt_out_payload, Inspector::Protocol::OptOutput<int>* opt_out_databaseId, RefPtr<Inspector::Protocol::Database::Error>& opt_out_sqlError, Inspector::Protocol::Database::PrimaryColors* opt_out_screenColor, RefPtr<Inspector::Protocol::Database::ColorList>& opt_out_alternateColors, DatabaseBackendDispatcherHandler::PrintColor* opt_out_printColor) = 0;
+ class ExecuteSQLAsyncOptionalReturnValuesCallback : public BackendDispatcher::CallbackBase {
+ public:
+ ExecuteSQLAsyncOptionalReturnValuesCallback(Ref<BackendDispatcher>&&, int id);
+ void sendSuccess(RefPtr<Inspector::Protocol::Array<String>>&& columnNames, Inspector::Protocol::OptOutput<String>* notes, Inspector::Protocol::OptOutput<double>* timestamp, Inspector::Protocol::OptOutput<Inspector::InspectorObject>* values, Inspector::Protocol::OptOutput<Inspector::InspectorValue>* payload, Inspector::Protocol::OptOutput<int>* databaseId, RefPtr<Inspector::Protocol::Database::Error>&& sqlError, Inspector::Protocol::OptOutput<String>* screenColor, RefPtr<Inspector::Protocol::Database::ColorList>&& alternateColors, Inspector::Protocol::OptOutput<String>* printColor);
+ };
+ virtual void executeSQLAsyncOptionalReturnValues(ErrorString&, int in_databaseId, const String& in_query, Ref<ExecuteSQLAsyncOptionalReturnValuesCallback>&& callback) = 0;
+ virtual void executeSQLSync(ErrorString&, int in_databaseId, const String& in_query, RefPtr<Inspector::Protocol::Array<String>>& out_columnNames, String* out_notes, double* out_timestamp, Inspector::InspectorObject* out_values, Inspector::InspectorValue* out_payload, int* out_databaseId, RefPtr<Inspector::Protocol::Database::Error>& out_sqlError, RefPtr<Inspector::Protocol::Database::ColorList>& out_alternateColors, Inspector::Protocol::Database::PrimaryColors* out_screenColor, DatabaseBackendDispatcherHandler::PrintColor* out_printColor) = 0;
+ class ExecuteSQLAsyncCallback : public BackendDispatcher::CallbackBase {
+ public:
+ ExecuteSQLAsyncCallback(Ref<BackendDispatcher>&&, int id);
+ void sendSuccess(RefPtr<Inspector::Protocol::Array<String>>&& columnNames, const String& notes, double timestamp, Inspector::InspectorObject values, Inspector::InspectorValue payload, int databaseId, RefPtr<Inspector::Protocol::Database::Error>&& sqlError, const String& screenColor, RefPtr<Inspector::Protocol::Database::ColorList>&& alternateColors, const String& printColor);
+ };
+ virtual void executeSQLAsync(ErrorString&, int in_databaseId, const String& in_query, Ref<ExecuteSQLAsyncCallback>&& callback) = 0;
+protected:
+ virtual ~DatabaseBackendDispatcherHandler();
+};
+
+class DatabaseBackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+ static Ref<DatabaseBackendDispatcher> create(BackendDispatcher&, DatabaseBackendDispatcherHandler*);
+ void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override;
+private:
+ void executeSQLSyncOptionalReturnValues(long requestId, RefPtr<InspectorObject>&& parameters);
+ void executeSQLAsyncOptionalReturnValues(long requestId, RefPtr<InspectorObject>&& parameters);
+ void executeSQLSync(long requestId, RefPtr<InspectorObject>&& parameters);
+ void executeSQLAsync(long requestId, RefPtr<InspectorObject>&& parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+ void setAlternateDispatcher(AlternateDatabaseBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+ AlternateDatabaseBackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+ DatabaseBackendDispatcher(BackendDispatcher&, DatabaseBackendDispatcherHandler*);
+ DatabaseBackendDispatcherHandler* m_agent { nullptr };
+};
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+DatabaseBackendDispatcherHandler::~DatabaseBackendDispatcherHandler() { }
+
+Ref<DatabaseBackendDispatcher> DatabaseBackendDispatcher::create(BackendDispatcher& backendDispatcher, DatabaseBackendDispatcherHandler* agent)
+{
+ return adoptRef(*new DatabaseBackendDispatcher(backendDispatcher, agent));
+}
+
+DatabaseBackendDispatcher::DatabaseBackendDispatcher(BackendDispatcher& backendDispatcher, DatabaseBackendDispatcherHandler* agent)
+ : SupplementalBackendDispatcher(backendDispatcher)
+ , m_agent(agent)
+{
+ m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Database"), this);
+}
+
+void DatabaseBackendDispatcher::dispatch(long requestId, const String& method, Ref<InspectorObject>&& message)
+{
+ Ref<DatabaseBackendDispatcher> protect(*this);
+
+ RefPtr<InspectorObject> parameters;
+ message->getObject(ASCIILiteral("params"), parameters);
+
+ if (method == "executeSQLSyncOptionalReturnValues")
+ executeSQLSyncOptionalReturnValues(requestId, WTFMove(parameters));
+ else if (method == "executeSQLAsyncOptionalReturnValues")
+ executeSQLAsyncOptionalReturnValues(requestId, WTFMove(parameters));
+ else if (method == "executeSQLSync")
+ executeSQLSync(requestId, WTFMove(parameters));
+ else if (method == "executeSQLAsync")
+ executeSQLAsync(requestId, WTFMove(parameters));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', "Database", '.', method, "' was not found"));
+}
+
+void DatabaseBackendDispatcher::executeSQLSyncOptionalReturnValues(long requestId, RefPtr<InspectorObject>&& parameters)
+{
+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr);
+ String in_query = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("query"), nullptr);
+ if (m_backendDispatcher->hasProtocolErrors()) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLSyncOptionalReturnValues"));
+ return;
+ }
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->executeSQLSyncOptionalReturnValues(requestId, in_databaseId, in_query);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ RefPtr<Inspector::Protocol::Array<String>> out_columnNames;
+ Inspector::Protocol::OptOutput<String> out_notes;
+ Inspector::Protocol::OptOutput<double> out_timestamp;
+ Inspector::Protocol::OptOutput<Inspector::InspectorObject> out_values;
+ Inspector::Protocol::OptOutput<Inspector::InspectorValue> out_payload;
+ Inspector::Protocol::OptOutput<Inspector::Protocol::Database::DatabaseId> out_databaseId;
+ RefPtr<Inspector::Protocol::Database::Error> out_sqlError;
+ Inspector::Protocol::Database::PrimaryColors out_screenColor;
+ RefPtr<Inspector::Protocol::Database::ColorList> out_alternateColors;
+ DatabaseBackendDispatcherHandler::PrintColor out_printColor;
+ m_agent->executeSQLSyncOptionalReturnValues(error, in_databaseId, in_query, out_columnNames, &out_notes, &out_timestamp, out_values, &out_payload, &out_databaseId, out_sqlError, &out_screenColor, out_alternateColors, &out_printColor);
+
+ if (!error.length()) {
+ if (out_columnNames)
+ result->setArray(ASCIILiteral("columnNames"), out_columnNames);
+ if (out_notes.isAssigned())
+ result->setString(ASCIILiteral("notes"), out_notes.getValue());
+ if (out_timestamp.isAssigned())
+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp.getValue());
+ if (out_values.isAssigned())
+ result->setObject(ASCIILiteral("values"), out_values.getValue());
+ if (out_payload.isAssigned())
+ result->setValue(ASCIILiteral("payload"), out_payload.getValue());
+ if (out_databaseId.isAssigned())
+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId.getValue());
+ if (out_sqlError)
+ result->setObject(ASCIILiteral("sqlError"), out_sqlError);
+ if (out_screenColor.isAssigned())
+ result->setString(ASCIILiteral("screenColor"), out_screenColor.getValue());
+ if (out_alternateColors)
+ result->setArray(ASCIILiteral("alternateColors"), out_alternateColors);
+ if (out_printColor.isAssigned())
+ result->setString(ASCIILiteral("printColor"), out_printColor.getValue());
+ }
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+DatabaseBackendDispatcherHandler::ExecuteSQLAsyncOptionalReturnValuesCallback::ExecuteSQLAsyncOptionalReturnValuesCallback(Ref<BackendDispatcher>&& backendDispatcher, int id) : BackendDispatcher::CallbackBase(WTFMove(backendDispatcher), id) { }
+
+void DatabaseBackendDispatcherHandler::ExecuteSQLAsyncOptionalReturnValuesCallback::sendSuccess(RefPtr<Inspector::Protocol::Array<String>>&& columnNames, Inspector::Protocol::OptOutput<String>* notes, Inspector::Protocol::OptOutput<double>* timestamp, Inspector::Protocol::OptOutput<Inspector::InspectorObject>* values, Inspector::Protocol::OptOutput<Inspector::InspectorValue>* payload, Inspector::Protocol::OptOutput<int>* databaseId, RefPtr<Inspector::Protocol::Database::Error>&& sqlError, Inspector::Protocol::OptOutput<String>* screenColor, RefPtr<Inspector::Protocol::Database::ColorList>&& alternateColors, Inspector::Protocol::OptOutput<String>* printColor)
+{
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ if (columnNames)
+ jsonMessage->setArray(ASCIILiteral("columnNames"), columnNames);
+ if (notes.isAssigned())
+ jsonMessage->setString(ASCIILiteral("notes"), notes.getValue());
+ if (timestamp.isAssigned())
+ jsonMessage->setDouble(ASCIILiteral("timestamp"), timestamp.getValue());
+ if (values.isAssigned())
+ jsonMessage->setObject(ASCIILiteral("values"), values.getValue());
+ if (payload.isAssigned())
+ jsonMessage->setValue(ASCIILiteral("payload"), payload.getValue());
+ if (databaseId.isAssigned())
+ jsonMessage->setInteger(ASCIILiteral("databaseId"), databaseId.getValue());
+ if (sqlError)
+ jsonMessage->setObject(ASCIILiteral("sqlError"), sqlError);
+ if (screenColor.isAssigned())
+ jsonMessage->setString(ASCIILiteral("screenColor"), screenColor.getValue());
+ if (alternateColors)
+ jsonMessage->setArray(ASCIILiteral("alternateColors"), alternateColors);
+ if (printColor.isAssigned())
+ jsonMessage->setString(ASCIILiteral("printColor"), printColor.getValue());
+ CallbackBase::sendSuccess(WTFMove(jsonMessage));
+}
+
+void DatabaseBackendDispatcher::executeSQLAsyncOptionalReturnValues(long requestId, RefPtr<InspectorObject>&& parameters)
+{
+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr);
+ String in_query = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("query"), nullptr);
+ if (m_backendDispatcher->hasProtocolErrors()) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLAsyncOptionalReturnValues"));
+ return;
+ }
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->executeSQLAsyncOptionalReturnValues(requestId, in_databaseId, in_query);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ Ref<DatabaseBackendDispatcherHandler::ExecuteSQLAsyncOptionalReturnValuesCallback> callback = adoptRef(*new DatabaseBackendDispatcherHandler::ExecuteSQLAsyncOptionalReturnValuesCallback(m_backendDispatcher.copyRef(), requestId));
+ m_agent->executeSQLAsyncOptionalReturnValues(error, in_databaseId, in_query, callback.copyRef());
+
+ if (error.length()) {
+ callback->disable();
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, error);
+ return;
+ }
+}
+
+void DatabaseBackendDispatcher::executeSQLSync(long requestId, RefPtr<InspectorObject>&& parameters)
+{
+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr);
+ String in_query = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("query"), nullptr);
+ if (m_backendDispatcher->hasProtocolErrors()) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLSync"));
+ return;
+ }
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->executeSQLSync(requestId, in_databaseId, in_query);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ RefPtr<Inspector::Protocol::Array<String>> out_columnNames;
+ String out_notes;
+ double out_timestamp;
+ Inspector::InspectorObject out_values;
+ Inspector::InspectorValue out_payload;
+ Inspector::Protocol::Database::DatabaseId out_databaseId;
+ RefPtr<Inspector::Protocol::Database::Error> out_sqlError;
+ RefPtr<Inspector::Protocol::Database::ColorList> out_alternateColors;
+ Inspector::Protocol::Database::PrimaryColors out_screenColor;
+ DatabaseBackendDispatcherHandler::PrintColor out_printColor;
+ m_agent->executeSQLSync(error, in_databaseId, in_query, out_columnNames, &out_notes, &out_timestamp, out_values, &out_payload, &out_databaseId, out_sqlError, out_alternateColors, &out_screenColor, &out_printColor);
+
+ if (!error.length()) {
+ result->setArray(ASCIILiteral("columnNames"), out_columnNames);
+ result->setString(ASCIILiteral("notes"), out_notes);
+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp);
+ result->setObject(ASCIILiteral("values"), out_values);
+ result->setValue(ASCIILiteral("payload"), out_payload);
+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId);
+ result->setObject(ASCIILiteral("sqlError"), out_sqlError);
+ result->setArray(ASCIILiteral("alternateColors"), out_alternateColors);
+ result->setString(ASCIILiteral("screenColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_screenColor));
+ result->setString(ASCIILiteral("printColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_printColor));
+ }
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+DatabaseBackendDispatcherHandler::ExecuteSQLAsyncCallback::ExecuteSQLAsyncCallback(Ref<BackendDispatcher>&& backendDispatcher, int id) : BackendDispatcher::CallbackBase(WTFMove(backendDispatcher), id) { }
+
+void DatabaseBackendDispatcherHandler::ExecuteSQLAsyncCallback::sendSuccess(RefPtr<Inspector::Protocol::Array<String>>&& columnNames, const String& notes, double timestamp, Inspector::InspectorObject values, Inspector::InspectorValue payload, int databaseId, RefPtr<Inspector::Protocol::Database::Error>&& sqlError, const String& screenColor, RefPtr<Inspector::Protocol::Database::ColorList>&& alternateColors, const String& printColor)
+{
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setArray(ASCIILiteral("columnNames"), columnNames);
+ jsonMessage->setString(ASCIILiteral("notes"), notes);
+ jsonMessage->setDouble(ASCIILiteral("timestamp"), timestamp);
+ jsonMessage->setObject(ASCIILiteral("values"), values);
+ jsonMessage->setValue(ASCIILiteral("payload"), payload);
+ jsonMessage->setInteger(ASCIILiteral("databaseId"), databaseId);
+ jsonMessage->setObject(ASCIILiteral("sqlError"), sqlError);
+ jsonMessage->setString(ASCIILiteral("screenColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(screenColor));
+ jsonMessage->setArray(ASCIILiteral("alternateColors"), alternateColors);
+ jsonMessage->setString(ASCIILiteral("printColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(printColor));
+ CallbackBase::sendSuccess(WTFMove(jsonMessage));
+}
+
+void DatabaseBackendDispatcher::executeSQLAsync(long requestId, RefPtr<InspectorObject>&& parameters)
+{
+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr);
+ String in_query = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("query"), nullptr);
+ if (m_backendDispatcher->hasProtocolErrors()) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Some arguments of method '%s' can't be processed", "Database.executeSQLAsync"));
+ return;
+ }
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->executeSQLAsync(requestId, in_databaseId, in_query);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ Ref<DatabaseBackendDispatcherHandler::ExecuteSQLAsyncCallback> callback = adoptRef(*new DatabaseBackendDispatcherHandler::ExecuteSQLAsyncCallback(m_backendDispatcher.copyRef(), requestId));
+ m_agent->executeSQLAsync(error, in_databaseId, in_query, callback.copyRef());
+
+ if (error.length()) {
+ callback->disable();
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, error);
+ return;
+ }
+}
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace Database {
+class Error;
+enum class PrimaryColors;
+} // Database
+// End of forward declarations.
+
+
+// Typedefs.
+namespace Database {
+/* Unique identifier of Database object. */
+typedef int DatabaseId;
+typedef Inspector::Protocol::Array<Inspector::Protocol::Database::PrimaryColors> ColorList;
+} // Database
+// End of typedefs.
+
+namespace TestHelpers {
+
+String getEnumConstantValue(int code);
+
+template<typename T> String getEnumConstantValue(T enumValue)
+{
+ return getEnumConstantValue(static_cast<int>(enumValue));
+}
+
+} // namespace TestHelpers
+
+namespace Database {
+/* */
+enum class PrimaryColors {
+ Red = 0,
+ Green = 1,
+ Blue = 2,
+}; // enum class PrimaryColors
+/* Database error. */
+class Error : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ MessageSet = 1 << 0,
+ CodeSet = 1 << 1,
+ AllFieldsSet = (MessageSet | CodeSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*Error*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class Error;
+ public:
+
+ Builder<STATE | MessageSet>& setMessage(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set);
+ m_result->setString(ASCIILiteral("message"), value);
+ return castState<MessageSet>();
+ }
+
+ Builder<STATE | CodeSet>& setCode(int value)
+ {
+ COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
+ m_result->setInteger(ASCIILiteral("code"), value);
+ return castState<CodeSet>();
+ }
+
+ Ref<Error> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(Error) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<Error>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<Error> result = Error::create()
+ * .setMessage(...)
+ * .setCode(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+} // Database
+
+
+
+namespace TestHelpers {
+
+template<typename ProtocolEnumType>
+std::optional<ProtocolEnumType> parseEnumValueFromString(const String&);
+
+// Enums in the 'Database' Domain
+template<>
+std::optional<Inspector::Protocol::Database::PrimaryColors> parseEnumValueFromString<Inspector::Protocol::Database::PrimaryColors>(const String&);
+
+} // namespace TestHelpers
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+namespace TestHelpers {
+
+static const char* const enum_constant_values[] = {
+ "red",
+ "green",
+ "blue",
+ "cyan",
+ "magenta",
+ "yellow",
+ "black",
+};
+
+String getEnumConstantValue(int code) {
+ return enum_constant_values[code];
+}
+
+// Enums in the 'Database' Domain
+template<>
+std::optional<Inspector::Protocol::Database::PrimaryColors> parseEnumValueFromString<Inspector::Protocol::Database::PrimaryColors>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::Database::PrimaryColors::Red,
+ (size_t)Inspector::Protocol::Database::PrimaryColors::Green,
+ (size_t)Inspector::Protocol::Database::PrimaryColors::Blue,
+ };
+ for (size_t i = 0; i < 3; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::Database::PrimaryColors)constantValues[i];
+
+ return std::nullopt;
+}
+
+
+} // namespace TestHelpers
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+@protocol TestProtocolDatabaseDomainHandler;
+
+namespace Inspector {
+
+
+class ObjCInspectorDatabaseBackendDispatcher final : public AlternateDatabaseBackendDispatcher {
+public:
+ ObjCInspectorDatabaseBackendDispatcher(id<TestProtocolDatabaseDomainHandler> handler) { m_delegate = handler; }
+ virtual void executeSQLSyncOptionalReturnValues(long requestId, int in_databaseId, const String& in_query) override;
+ virtual void executeSQLAsyncOptionalReturnValues(long requestId, int in_databaseId, const String& in_query) override;
+ virtual void executeSQLSync(long requestId, int in_databaseId, const String& in_query) override;
+ virtual void executeSQLAsync(long requestId, int in_databaseId, const String& in_query) override;
+private:
+ RetainPtr<id<TestProtocolDatabaseDomainHandler>> m_delegate;
+};
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+ id<TestProtocolDatabaseDomainHandler> _databaseHandler;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [_databaseHandler release];
+ [super dealloc];
+}
+
+- (void)setDatabaseHandler:(id<TestProtocolDatabaseDomainHandler>)handler
+{
+ if (handler == _databaseHandler)
+ return;
+
+ [_databaseHandler release];
+ _databaseHandler = [handler retain];
+
+ auto alternateDispatcher = std::make_unique<ObjCInspectorDatabaseBackendDispatcher>(handler);
+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>(ASCIILiteral("Database"), *_controller, WTFMove(alternateDispatcher));
+ _controller->appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id<TestProtocolDatabaseDomainHandler>)databaseHandler
+{
+ return _databaseHandler;
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@property (nonatomic, retain, setter=setDatabaseHandler:) id<TestProtocolDatabaseDomainHandler> databaseHandler;
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+void ObjCInspectorDatabaseBackendDispatcher::executeSQLSyncOptionalReturnValues(long requestId, int in_databaseId, const String& in_query)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^(NSArray/*<NSString>*/ **columnNames, NSString **notes, double *timestamp, RWIProtocolJSONObject **values, RWIProtocolJSONObject **payload, int *databaseId, TestProtocolDatabaseError **sqlError, TestProtocolDatabasePrimaryColors *screenColor, NSArray/*<NSString>*/ **alternateColors, TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColor *printColor) {
+ Ref<InspectorObject> resultObject = InspectorObject::create();
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(notes, @"notes");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(values, @"values");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(payload, @"payload");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
+ if (columnNames)
+ resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+ if (notes)
+ resultObject->setString(ASCIILiteral("notes"), *notes);
+ if (timestamp)
+ resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
+ if (values)
+ resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+ if (payload)
+ resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+ if (databaseId)
+ resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
+ if (sqlError)
+ resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+ if (screenColor)
+ resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
+ if (alternateColors)
+ resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+ if (printColor)
+ resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
+ backendDispatcher()->sendResponse(requestId, WTFMove(resultObject));
+ };
+
+ int o_in_databaseId = in_databaseId;
+ NSString *o_in_query = in_query;
+
+ [m_delegate executeSQLSyncOptionalReturnValuesWithErrorCallback:errorCallback successCallback:successCallback databaseId:o_in_databaseId query:o_in_query];
+}
+
+void ObjCInspectorDatabaseBackendDispatcher::executeSQLAsyncOptionalReturnValues(long requestId, int in_databaseId, const String& in_query)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^(NSArray/*<NSString>*/ **columnNames, NSString **notes, double *timestamp, RWIProtocolJSONObject **values, RWIProtocolJSONObject **payload, int *databaseId, TestProtocolDatabaseError **sqlError, TestProtocolDatabasePrimaryColors *screenColor, NSArray/*<NSString>*/ **alternateColors, TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColor *printColor) {
+ Ref<InspectorObject> resultObject = InspectorObject::create();
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(notes, @"notes");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(values, @"values");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(payload, @"payload");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
+ if (columnNames)
+ resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+ if (notes)
+ resultObject->setString(ASCIILiteral("notes"), *notes);
+ if (timestamp)
+ resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
+ if (values)
+ resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+ if (payload)
+ resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+ if (databaseId)
+ resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
+ if (sqlError)
+ resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+ if (screenColor)
+ resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
+ if (alternateColors)
+ resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+ if (printColor)
+ resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
+ backendDispatcher()->sendResponse(requestId, WTFMove(resultObject));
+ };
+
+ int o_in_databaseId = in_databaseId;
+ NSString *o_in_query = in_query;
+
+ [m_delegate executeSQLAsyncOptionalReturnValuesWithErrorCallback:errorCallback successCallback:successCallback databaseId:o_in_databaseId query:o_in_query];
+}
+
+void ObjCInspectorDatabaseBackendDispatcher::executeSQLSync(long requestId, int in_databaseId, const String& in_query)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^(NSArray/*<NSString>*/ *columnNames, NSString *notes, double timestamp, RWIProtocolJSONObject *values, RWIProtocolJSONObject *payload, int databaseId, TestProtocolDatabaseError *sqlError, NSArray/*<NSString>*/ *alternateColors, TestProtocolDatabasePrimaryColors screenColor, TestProtocolDatabaseExecuteSQLSyncPrintColor printColor) {
+ Ref<InspectorObject> resultObject = InspectorObject::create();
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(notes, @"notes");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(values, @"values");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
+ resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+ resultObject->setString(ASCIILiteral("notes"), notes);
+ resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
+ resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+ resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
+ resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+ resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+ resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
+ resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
+ backendDispatcher()->sendResponse(requestId, WTFMove(resultObject));
+ };
+
+ int o_in_databaseId = in_databaseId;
+ NSString *o_in_query = in_query;
+
+ [m_delegate executeSQLSyncWithErrorCallback:errorCallback successCallback:successCallback databaseId:o_in_databaseId query:o_in_query];
+}
+
+void ObjCInspectorDatabaseBackendDispatcher::executeSQLAsync(long requestId, int in_databaseId, const String& in_query)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^(NSArray/*<NSString>*/ *columnNames, NSString *notes, double timestamp, RWIProtocolJSONObject *values, RWIProtocolJSONObject *payload, int databaseId, TestProtocolDatabaseError *sqlError, TestProtocolDatabasePrimaryColors screenColor, NSArray/*<NSString>*/ *alternateColors, TestProtocolDatabaseExecuteSQLAsyncPrintColor printColor) {
+ Ref<InspectorObject> resultObject = InspectorObject::create();
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(notes, @"notes");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(values, @"values");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
+ resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+ resultObject->setString(ASCIILiteral("notes"), notes);
+ resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
+ resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+ resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
+ resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+ resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
+ resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+ resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
+ backendDispatcher()->sendResponse(requestId, WTFMove(resultObject));
+ };
+
+ int o_in_databaseId = in_databaseId;
+ NSString *o_in_query = in_query;
+
+ [m_delegate executeSQLAsyncWithErrorCallback:errorCallback successCallback:successCallback databaseId:o_in_databaseId query:o_in_query];
+}
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+@class TestProtocolDatabaseError;
+
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabasePrimaryColors) {
+ TestProtocolDatabasePrimaryColorsRed,
+ TestProtocolDatabasePrimaryColorsGreen,
+ TestProtocolDatabasePrimaryColorsBlue,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColor) {
+ TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorCyan,
+ TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorMagenta,
+ TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorYellow,
+ TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorBlack,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColor) {
+ TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorCyan,
+ TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorMagenta,
+ TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorYellow,
+ TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorBlack,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteSQLSyncPrintColor) {
+ TestProtocolDatabaseExecuteSQLSyncPrintColorCyan,
+ TestProtocolDatabaseExecuteSQLSyncPrintColorMagenta,
+ TestProtocolDatabaseExecuteSQLSyncPrintColorYellow,
+ TestProtocolDatabaseExecuteSQLSyncPrintColorBlack,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteSQLAsyncPrintColor) {
+ TestProtocolDatabaseExecuteSQLAsyncPrintColorCyan,
+ TestProtocolDatabaseExecuteSQLAsyncPrintColorMagenta,
+ TestProtocolDatabaseExecuteSQLAsyncPrintColorYellow,
+ TestProtocolDatabaseExecuteSQLAsyncPrintColorBlack,
+};
+
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseError : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithMessage:(NSString *)message code:(int)code;
+/* required */ @property (nonatomic, copy) NSString *message;
+/* required */ @property (nonatomic, assign) int code;
+@end
+
+@protocol TestProtocolDatabaseDomainHandler <NSObject>
+@required
+- (void)executeSQLSyncOptionalReturnValuesWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(NSArray/*<NSString>*/ **columnNames, NSString **notes, double *timestamp, RWIProtocolJSONObject **values, RWIProtocolJSONObject **payload, int *databaseId, TestProtocolDatabaseError **sqlError, TestProtocolDatabasePrimaryColors *screenColor, NSArray/*<NSString>*/ **alternateColors, TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColor *printColor))successCallback databaseId:(int)databaseId query:(NSString *)query;
+- (void)executeSQLAsyncOptionalReturnValuesWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(NSArray/*<NSString>*/ **columnNames, NSString **notes, double *timestamp, RWIProtocolJSONObject **values, RWIProtocolJSONObject **payload, int *databaseId, TestProtocolDatabaseError **sqlError, TestProtocolDatabasePrimaryColors *screenColor, NSArray/*<NSString>*/ **alternateColors, TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColor *printColor))successCallback databaseId:(int)databaseId query:(NSString *)query;
+- (void)executeSQLSyncWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(NSArray/*<NSString>*/ *columnNames, NSString *notes, double timestamp, RWIProtocolJSONObject *values, RWIProtocolJSONObject *payload, int databaseId, TestProtocolDatabaseError *sqlError, NSArray/*<NSString>*/ *alternateColors, TestProtocolDatabasePrimaryColors screenColor, TestProtocolDatabaseExecuteSQLSyncPrintColor printColor))successCallback databaseId:(int)databaseId query:(NSString *)query;
+- (void)executeSQLAsyncWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(NSArray/*<NSString>*/ *columnNames, NSString *notes, double timestamp, RWIProtocolJSONObject *values, RWIProtocolJSONObject *payload, int databaseId, TestProtocolDatabaseError *sqlError, TestProtocolDatabasePrimaryColors screenColor, NSArray/*<NSString>*/ *alternateColors, TestProtocolDatabaseExecuteSQLAsyncPrintColor printColor))successCallback databaseId:(int)databaseId query:(NSString *)query;
+@end
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+inline String toProtocolString(TestProtocolDatabasePrimaryColors value)
+{
+ switch(value) {
+ case TestProtocolDatabasePrimaryColorsRed:
+ return ASCIILiteral("red");
+ case TestProtocolDatabasePrimaryColorsGreen:
+ return ASCIILiteral("green");
+ case TestProtocolDatabasePrimaryColorsBlue:
+ return ASCIILiteral("blue");
+ }
+}
+
+template<>
+inline TestProtocolDatabasePrimaryColors fromProtocolString(const String& value)
+{
+ if (value == "red")
+ return TestProtocolDatabasePrimaryColorsRed;
+ if (value == "green")
+ return TestProtocolDatabasePrimaryColorsGreen;
+ if (value == "blue")
+ return TestProtocolDatabasePrimaryColorsBlue;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabasePrimaryColorsRed;
+}
+
+inline String toProtocolString(TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColor value)
+{
+ switch(value) {
+ case TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorYellow:
+ return ASCIILiteral("yellow");
+ case TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorBlack:
+ return ASCIILiteral("black");
+ }
+}
+
+template<>
+inline TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColor fromProtocolString(const String& value)
+{
+ if (value == "cyan")
+ return TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorCyan;
+ if (value == "magenta")
+ return TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorMagenta;
+ if (value == "yellow")
+ return TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorYellow;
+ if (value == "black")
+ return TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorBlack;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorCyan;
+}
+
+inline String toProtocolString(TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColor value)
+{
+ switch(value) {
+ case TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorYellow:
+ return ASCIILiteral("yellow");
+ case TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorBlack:
+ return ASCIILiteral("black");
+ }
+}
+
+template<>
+inline TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColor fromProtocolString(const String& value)
+{
+ if (value == "cyan")
+ return TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorCyan;
+ if (value == "magenta")
+ return TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorMagenta;
+ if (value == "yellow")
+ return TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorYellow;
+ if (value == "black")
+ return TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorBlack;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorCyan;
+}
+
+inline String toProtocolString(TestProtocolDatabaseExecuteSQLSyncPrintColor value)
+{
+ switch(value) {
+ case TestProtocolDatabaseExecuteSQLSyncPrintColorCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolDatabaseExecuteSQLSyncPrintColorMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolDatabaseExecuteSQLSyncPrintColorYellow:
+ return ASCIILiteral("yellow");
+ case TestProtocolDatabaseExecuteSQLSyncPrintColorBlack:
+ return ASCIILiteral("black");
+ }
+}
+
+template<>
+inline TestProtocolDatabaseExecuteSQLSyncPrintColor fromProtocolString(const String& value)
+{
+ if (value == "cyan")
+ return TestProtocolDatabaseExecuteSQLSyncPrintColorCyan;
+ if (value == "magenta")
+ return TestProtocolDatabaseExecuteSQLSyncPrintColorMagenta;
+ if (value == "yellow")
+ return TestProtocolDatabaseExecuteSQLSyncPrintColorYellow;
+ if (value == "black")
+ return TestProtocolDatabaseExecuteSQLSyncPrintColorBlack;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabaseExecuteSQLSyncPrintColorCyan;
+}
+
+inline String toProtocolString(TestProtocolDatabaseExecuteSQLAsyncPrintColor value)
+{
+ switch(value) {
+ case TestProtocolDatabaseExecuteSQLAsyncPrintColorCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolDatabaseExecuteSQLAsyncPrintColorMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolDatabaseExecuteSQLAsyncPrintColorYellow:
+ return ASCIILiteral("yellow");
+ case TestProtocolDatabaseExecuteSQLAsyncPrintColorBlack:
+ return ASCIILiteral("black");
+ }
+}
+
+template<>
+inline TestProtocolDatabaseExecuteSQLAsyncPrintColor fromProtocolString(const String& value)
+{
+ if (value == "cyan")
+ return TestProtocolDatabaseExecuteSQLAsyncPrintColorCyan;
+ if (value == "magenta")
+ return TestProtocolDatabaseExecuteSQLAsyncPrintColorMagenta;
+ if (value == "yellow")
+ return TestProtocolDatabaseExecuteSQLAsyncPrintColorYellow;
+ if (value == "black")
+ return TestProtocolDatabaseExecuteSQLAsyncPrintColorBlack;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabaseExecuteSQLAsyncPrintColorCyan;
+}
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (DatabaseDomain)
+
++ (void)_parseDatabaseId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parsePrimaryColors:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (DatabaseDomain)
+
++ (void)_parseDatabaseId:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+ *outValue = (NSNumber *)payload;
+}
+
++ (void)_parsePrimaryColors:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = @(Inspector::fromProtocolString<TestProtocolDatabasePrimaryColors>(payload));
+}
+
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+ *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolDatabaseError alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+@implementation TestProtocolDatabaseError
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"message"], @"message");
+ self.message = payload[@"message"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"code"], @"code");
+ self.code = [payload[@"code"] integerValue];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithMessage:(NSString *)message code:(int)code
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(message, @"message");
+
+ self.message = message;
+ self.code = code;
+
+ return self;
+}
+
+- (void)setMessage:(NSString *)message
+{
+ [super setString:message forKey:@"message"];
+}
+
+- (NSString *)message
+{
+ return [super stringForKey:@"message"];
+}
+
+- (void)setCode:(int)code
+{
+ [super setInteger:code forKey:@"code"];
+}
+
+- (int)code
+{
+ return [super integerForKey:@"code"];
+}
+
+@end
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedcommandswithoptionalcallreturnparametersjsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedcommandswithoptionalcallreturnparametersjsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1609 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// Database.
+InspectorBackend.registerEnum("Database.PrimaryColors", {Red: "red", Green: "green", Blue: "blue"});
+InspectorBackend.registerCommand("Database.executeAllOptionalParameters", [{"name": "columnNames", "type": "object", "optional": true}, {"name": "notes", "type": "string", "optional": true}, {"name": "timestamp", "type": "number", "optional": true}, {"name": "values", "type": "object", "optional": true}, {"name": "payload", "type": "object", "optional": true}, {"name": "databaseId", "type": "number", "optional": true}, {"name": "sqlError", "type": "object", "optional": true}, {"name": "screenColor", "type": "string", "optional": true}, {"name": "alternateCol
ors", "type": "object", "optional": true}, {"name": "printColor", "type": "string", "optional": true}], ["columnNames", "notes", "timestamp", "values", "payload", "databaseId", "sqlError", "screenColor", "alternateColors", "printColor"]);
+InspectorBackend.registerCommand("Database.executeNoOptionalParameters", [{"name": "columnNames", "type": "object", "optional": false}, {"name": "notes", "type": "string", "optional": false}, {"name": "timestamp", "type": "number", "optional": false}, {"name": "values", "type": "object", "optional": false}, {"name": "payload", "type": "object", "optional": false}, {"name": "databaseId", "type": "number", "optional": false}, {"name": "sqlError", "type": "object", "optional": false}, {"name": "screenColor", "type": "string", "optional": false}, {"name": "alter
nateColors", "type": "object", "optional": false}, {"name": "printColor", "type": "string", "optional": false}], ["columnNames", "notes", "timestamp", "values", "payload", "databaseId", "sqlError", "screenColor", "alternateColors", "printColor"]);
+InspectorBackend.activateDomain("Database");
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+class AlternateDatabaseBackendDispatcher : public AlternateBackendDispatcher {
+public:
+ virtual ~AlternateDatabaseBackendDispatcher() { }
+ virtual void executeAllOptionalParameters(long callId, const Inspector::InspectorArray* in_columnNames, const String* const in_notes, const double* const in_timestamp, const Inspector::InspectorObject* in_values, const Inspector::InspectorValue* const in_payload, const int* const in_databaseId, const Inspector::InspectorObject* in_sqlError, const String* const in_screenColor, const Inspector::InspectorArray* in_alternateColors, const String* const in_printColor) = 0;
+ virtual void executeNoOptionalParameters(long callId, const Inspector::InspectorArray& in_columnNames, const String& in_notes, double in_timestamp, const Inspector::InspectorObject& in_values, Inspector::InspectorValue in_payload, int in_databaseId, const Inspector::InspectorObject& in_sqlError, const String& in_screenColor, const Inspector::InspectorArray& in_alternateColors, const String& in_printColor) = 0;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+class AlternateDatabaseBackendDispatcher;
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+class DatabaseBackendDispatcherHandler {
+public:
+ // Named after parameter 'printColor' while generating command/event executeAllOptionalParameters.
+ enum class PrintColor {
+ Cyan = 3,
+ Magenta = 4,
+ Yellow = 5,
+ Black = 6,
+ }; // enum class PrintColor
+ virtual void executeAllOptionalParameters(ErrorString&, const Inspector::InspectorArray* opt_in_columnNames, const String* const opt_in_notes, const double* const opt_in_timestamp, const Inspector::InspectorObject* opt_in_values, const Inspector::InspectorValue* const opt_in_payload, const int* const opt_in_databaseId, const Inspector::InspectorObject* opt_in_sqlError, const String* const opt_in_screenColor, const Inspector::InspectorArray* opt_in_alternateColors, const String* const opt_in_printColor, RefPtr<Inspector::Protocol::Array<String>>& opt_out_columnNames, Inspector::Protocol::OptOutput<String>* opt_out_notes, Inspector::Protocol::OptOutput<double>* opt_out_timestamp, Inspector::Protocol::OptOutput<Inspector::InspectorObject>* opt_out_values, Inspector::Protocol::OptOutput<Inspector::InspectorValue>* opt_out_payload, Inspector::Protocol::OptOutput<int>* opt_out_databaseId, RefPtr<Inspector::Protocol::Database
::Error>& opt_out_sqlError, Inspector::Protocol::Database::PrimaryColors* opt_out_screenColor, RefPtr<Inspector::Protocol::Database::ColorList>& opt_out_alternateColors, DatabaseBackendDispatcherHandler::PrintColor* opt_out_printColor) = 0;
+ virtual void executeNoOptionalParameters(ErrorString&, const Inspector::InspectorArray& in_columnNames, const String& in_notes, double in_timestamp, const Inspector::InspectorObject& in_values, Inspector::InspectorValue in_payload, int in_databaseId, const Inspector::InspectorObject& in_sqlError, const String& in_screenColor, const Inspector::InspectorArray& in_alternateColors, const String& in_printColor, RefPtr<Inspector::Protocol::Array<String>>& out_columnNames, String* out_notes, double* out_timestamp, Inspector::InspectorObject* out_values, Inspector::InspectorValue* out_payload, int* out_databaseId, RefPtr<Inspector::Protocol::Database::Error>& out_sqlError, Inspector::Protocol::Database::PrimaryColors* out_screenColor, RefPtr<Inspector::Protocol::Database::ColorList>& out_alternateColors, DatabaseBackendDispatcherHandler::PrintColor* out_printColor) = 0;
+protected:
+ virtual ~DatabaseBackendDispatcherHandler();
+};
+
+class DatabaseBackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+ static Ref<DatabaseBackendDispatcher> create(BackendDispatcher&, DatabaseBackendDispatcherHandler*);
+ void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override;
+private:
+ void executeAllOptionalParameters(long requestId, RefPtr<InspectorObject>&& parameters);
+ void executeNoOptionalParameters(long requestId, RefPtr<InspectorObject>&& parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+ void setAlternateDispatcher(AlternateDatabaseBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+ AlternateDatabaseBackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+ DatabaseBackendDispatcher(BackendDispatcher&, DatabaseBackendDispatcherHandler*);
+ DatabaseBackendDispatcherHandler* m_agent { nullptr };
+};
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+DatabaseBackendDispatcherHandler::~DatabaseBackendDispatcherHandler() { }
+
+Ref<DatabaseBackendDispatcher> DatabaseBackendDispatcher::create(BackendDispatcher& backendDispatcher, DatabaseBackendDispatcherHandler* agent)
+{
+ return adoptRef(*new DatabaseBackendDispatcher(backendDispatcher, agent));
+}
+
+DatabaseBackendDispatcher::DatabaseBackendDispatcher(BackendDispatcher& backendDispatcher, DatabaseBackendDispatcherHandler* agent)
+ : SupplementalBackendDispatcher(backendDispatcher)
+ , m_agent(agent)
+{
+ m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Database"), this);
+}
+
+void DatabaseBackendDispatcher::dispatch(long requestId, const String& method, Ref<InspectorObject>&& message)
+{
+ Ref<DatabaseBackendDispatcher> protect(*this);
+
+ RefPtr<InspectorObject> parameters;
+ message->getObject(ASCIILiteral("params"), parameters);
+
+ if (method == "executeAllOptionalParameters")
+ executeAllOptionalParameters(requestId, WTFMove(parameters));
+ else if (method == "executeNoOptionalParameters")
+ executeNoOptionalParameters(requestId, WTFMove(parameters));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', "Database", '.', method, "' was not found"));
+}
+
+void DatabaseBackendDispatcher::executeAllOptionalParameters(long requestId, RefPtr<InspectorObject>&& parameters)
+{
+ bool opt_in_columnNames_valueFound = false;
+ RefPtr<Inspector::InspectorArray> opt_in_columnNames = m_backendDispatcher->getArray(parameters.get(), ASCIILiteral("columnNames"), &opt_in_columnNames_valueFound);
+ bool opt_in_notes_valueFound = false;
+ String opt_in_notes = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("notes"), &opt_in_notes_valueFound);
+ bool opt_in_timestamp_valueFound = false;
+ Inspector::Protocol::OptOutput<double> opt_in_timestamp = m_backendDispatcher->getDouble(parameters.get(), ASCIILiteral("timestamp"), &opt_in_timestamp_valueFound);
+ bool opt_in_values_valueFound = false;
+ RefPtr<Inspector::InspectorObject> opt_in_values = m_backendDispatcher->getObject(parameters.get(), ASCIILiteral("values"), &opt_in_values_valueFound);
+ bool opt_in_payload_valueFound = false;
+ RefPtr<Inspector::InspectorValue> opt_in_payload = m_backendDispatcher->getValue(parameters.get(), ASCIILiteral("payload"), &opt_in_payload_valueFound);
+ bool opt_in_databaseId_valueFound = false;
+ int opt_in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), &opt_in_databaseId_valueFound);
+ bool opt_in_sqlError_valueFound = false;
+ RefPtr<Inspector::InspectorObject> opt_in_sqlError = m_backendDispatcher->getObject(parameters.get(), ASCIILiteral("sqlError"), &opt_in_sqlError_valueFound);
+ bool opt_in_screenColor_valueFound = false;
+ String opt_in_screenColor = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("screenColor"), &opt_in_screenColor_valueFound);
+ bool opt_in_alternateColors_valueFound = false;
+ RefPtr<Inspector::InspectorArray> opt_in_alternateColors = m_backendDispatcher->getArray(parameters.get(), ASCIILiteral("alternateColors"), &opt_in_alternateColors_valueFound);
+ bool opt_in_printColor_valueFound = false;
+ String opt_in_printColor = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("printColor"), &opt_in_printColor_valueFound);
+ if (m_backendDispatcher->hasProtocolErrors()) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Some arguments of method '%s' can't be processed", "Database.executeAllOptionalParameters"));
+ return;
+ }
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->executeAllOptionalParameters(requestId, opt_in_columnNames_valueFound ? opt_in_columnNames.get() : nullptr, opt_in_notes_valueFound ? &opt_in_notes : nullptr, opt_in_timestamp_valueFound ? &opt_in_timestamp : nullptr, opt_in_values_valueFound ? opt_in_values.get() : nullptr, opt_in_payload_valueFound ? opt_in_payload.get() : nullptr, opt_in_databaseId_valueFound ? &opt_in_databaseId : nullptr, opt_in_sqlError_valueFound ? opt_in_sqlError.get() : nullptr, opt_in_screenColor_valueFound ? &opt_in_screenColor : nullptr, opt_in_alternateColors_valueFound ? opt_in_alternateColors.get() : nullptr, opt_in_printColor_valueFound ? &opt_in_printColor : nullptr);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ RefPtr<Inspector::Protocol::Array<String>> out_columnNames;
+ Inspector::Protocol::OptOutput<String> out_notes;
+ Inspector::Protocol::OptOutput<double> out_timestamp;
+ Inspector::Protocol::OptOutput<Inspector::InspectorObject> out_values;
+ Inspector::Protocol::OptOutput<Inspector::InspectorValue> out_payload;
+ Inspector::Protocol::OptOutput<Inspector::Protocol::Database::DatabaseId> out_databaseId;
+ RefPtr<Inspector::Protocol::Database::Error> out_sqlError;
+ Inspector::Protocol::Database::PrimaryColors out_screenColor;
+ RefPtr<Inspector::Protocol::Database::ColorList> out_alternateColors;
+ DatabaseBackendDispatcherHandler::PrintColor out_printColor;
+ m_agent->executeAllOptionalParameters(error, opt_in_columnNames_valueFound ? opt_in_columnNames.get() : nullptr, opt_in_notes_valueFound ? &opt_in_notes : nullptr, opt_in_timestamp_valueFound ? &opt_in_timestamp : nullptr, opt_in_values_valueFound ? opt_in_values.get() : nullptr, opt_in_payload_valueFound ? opt_in_payload.get() : nullptr, opt_in_databaseId_valueFound ? &opt_in_databaseId : nullptr, opt_in_sqlError_valueFound ? opt_in_sqlError.get() : nullptr, opt_in_screenColor_valueFound ? &opt_in_screenColor : nullptr, opt_in_alternateColors_valueFound ? opt_in_alternateColors.get() : nullptr, opt_in_printColor_valueFound ? &opt_in_printColor : nullptr, out_columnNames, &out_notes, &out_timestamp, out_values, &out_payload, &out_databaseId, out_sqlError, &out_screenColor, out_alternateColors, &out_printColor);
+
+ if (!error.length()) {
+ if (out_columnNames)
+ result->setArray(ASCIILiteral("columnNames"), out_columnNames);
+ if (out_notes.isAssigned())
+ result->setString(ASCIILiteral("notes"), out_notes.getValue());
+ if (out_timestamp.isAssigned())
+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp.getValue());
+ if (out_values.isAssigned())
+ result->setObject(ASCIILiteral("values"), out_values.getValue());
+ if (out_payload.isAssigned())
+ result->setValue(ASCIILiteral("payload"), out_payload.getValue());
+ if (out_databaseId.isAssigned())
+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId.getValue());
+ if (out_sqlError)
+ result->setObject(ASCIILiteral("sqlError"), out_sqlError);
+ if (out_screenColor.isAssigned())
+ result->setString(ASCIILiteral("screenColor"), out_screenColor.getValue());
+ if (out_alternateColors)
+ result->setArray(ASCIILiteral("alternateColors"), out_alternateColors);
+ if (out_printColor.isAssigned())
+ result->setString(ASCIILiteral("printColor"), out_printColor.getValue());
+ }
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+void DatabaseBackendDispatcher::executeNoOptionalParameters(long requestId, RefPtr<InspectorObject>&& parameters)
+{
+ RefPtr<Inspector::InspectorArray> in_columnNames = m_backendDispatcher->getArray(parameters.get(), ASCIILiteral("columnNames"), nullptr);
+ String in_notes = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("notes"), nullptr);
+ double in_timestamp = m_backendDispatcher->getDouble(parameters.get(), ASCIILiteral("timestamp"), nullptr);
+ RefPtr<Inspector::InspectorObject> in_values = m_backendDispatcher->getObject(parameters.get(), ASCIILiteral("values"), nullptr);
+ RefPtr<Inspector::InspectorValue> in_payload = m_backendDispatcher->getValue(parameters.get(), ASCIILiteral("payload"), nullptr);
+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr);
+ RefPtr<Inspector::InspectorObject> in_sqlError = m_backendDispatcher->getObject(parameters.get(), ASCIILiteral("sqlError"), nullptr);
+ String in_screenColor = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("screenColor"), nullptr);
+ RefPtr<Inspector::InspectorArray> in_alternateColors = m_backendDispatcher->getArray(parameters.get(), ASCIILiteral("alternateColors"), nullptr);
+ String in_printColor = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("printColor"), nullptr);
+ if (m_backendDispatcher->hasProtocolErrors()) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Some arguments of method '%s' can't be processed", "Database.executeNoOptionalParameters"));
+ return;
+ }
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->executeNoOptionalParameters(requestId, *in_columnNames, in_notes, in_timestamp, *in_values, *in_payload, in_databaseId, *in_sqlError, in_screenColor, *in_alternateColors, in_printColor);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ RefPtr<Inspector::Protocol::Array<String>> out_columnNames;
+ String out_notes;
+ double out_timestamp;
+ Inspector::InspectorObject out_values;
+ Inspector::InspectorValue out_payload;
+ Inspector::Protocol::Database::DatabaseId out_databaseId;
+ RefPtr<Inspector::Protocol::Database::Error> out_sqlError;
+ Inspector::Protocol::Database::PrimaryColors out_screenColor;
+ RefPtr<Inspector::Protocol::Database::ColorList> out_alternateColors;
+ DatabaseBackendDispatcherHandler::PrintColor out_printColor;
+ m_agent->executeNoOptionalParameters(error, *in_columnNames, in_notes, in_timestamp, *in_values, *in_payload, in_databaseId, *in_sqlError, in_screenColor, *in_alternateColors, in_printColor, out_columnNames, &out_notes, &out_timestamp, out_values, &out_payload, &out_databaseId, out_sqlError, &out_screenColor, out_alternateColors, &out_printColor);
+
+ if (!error.length()) {
+ result->setArray(ASCIILiteral("columnNames"), out_columnNames);
+ result->setString(ASCIILiteral("notes"), out_notes);
+ result->setDouble(ASCIILiteral("timestamp"), out_timestamp);
+ result->setObject(ASCIILiteral("values"), out_values);
+ result->setValue(ASCIILiteral("payload"), out_payload);
+ result->setInteger(ASCIILiteral("databaseId"), out_databaseId);
+ result->setObject(ASCIILiteral("sqlError"), out_sqlError);
+ result->setString(ASCIILiteral("screenColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_screenColor));
+ result->setArray(ASCIILiteral("alternateColors"), out_alternateColors);
+ result->setString(ASCIILiteral("printColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_printColor));
+ }
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace Database {
+class Error;
+enum class PrimaryColors;
+} // Database
+// End of forward declarations.
+
+
+// Typedefs.
+namespace Database {
+/* Unique identifier of Database object. */
+typedef int DatabaseId;
+typedef Inspector::Protocol::Array<Inspector::Protocol::Database::PrimaryColors> ColorList;
+} // Database
+// End of typedefs.
+
+namespace TestHelpers {
+
+String getEnumConstantValue(int code);
+
+template<typename T> String getEnumConstantValue(T enumValue)
+{
+ return getEnumConstantValue(static_cast<int>(enumValue));
+}
+
+} // namespace TestHelpers
+
+namespace Database {
+/* */
+enum class PrimaryColors {
+ Red = 0,
+ Green = 1,
+ Blue = 2,
+}; // enum class PrimaryColors
+/* Database error. */
+class Error : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ MessageSet = 1 << 0,
+ CodeSet = 1 << 1,
+ AllFieldsSet = (MessageSet | CodeSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*Error*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class Error;
+ public:
+
+ Builder<STATE | MessageSet>& setMessage(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set);
+ m_result->setString(ASCIILiteral("message"), value);
+ return castState<MessageSet>();
+ }
+
+ Builder<STATE | CodeSet>& setCode(int value)
+ {
+ COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
+ m_result->setInteger(ASCIILiteral("code"), value);
+ return castState<CodeSet>();
+ }
+
+ Ref<Error> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(Error) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<Error>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<Error> result = Error::create()
+ * .setMessage(...)
+ * .setCode(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+} // Database
+
+
+
+namespace TestHelpers {
+
+template<typename ProtocolEnumType>
+std::optional<ProtocolEnumType> parseEnumValueFromString(const String&);
+
+// Enums in the 'Database' Domain
+template<>
+std::optional<Inspector::Protocol::Database::PrimaryColors> parseEnumValueFromString<Inspector::Protocol::Database::PrimaryColors>(const String&);
+
+} // namespace TestHelpers
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+namespace TestHelpers {
+
+static const char* const enum_constant_values[] = {
+ "red",
+ "green",
+ "blue",
+ "cyan",
+ "magenta",
+ "yellow",
+ "black",
+};
+
+String getEnumConstantValue(int code) {
+ return enum_constant_values[code];
+}
+
+// Enums in the 'Database' Domain
+template<>
+std::optional<Inspector::Protocol::Database::PrimaryColors> parseEnumValueFromString<Inspector::Protocol::Database::PrimaryColors>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::Database::PrimaryColors::Red,
+ (size_t)Inspector::Protocol::Database::PrimaryColors::Green,
+ (size_t)Inspector::Protocol::Database::PrimaryColors::Blue,
+ };
+ for (size_t i = 0; i < 3; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::Database::PrimaryColors)constantValues[i];
+
+ return std::nullopt;
+}
+
+
+} // namespace TestHelpers
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+@protocol TestProtocolDatabaseDomainHandler;
+
+namespace Inspector {
+
+
+class ObjCInspectorDatabaseBackendDispatcher final : public AlternateDatabaseBackendDispatcher {
+public:
+ ObjCInspectorDatabaseBackendDispatcher(id<TestProtocolDatabaseDomainHandler> handler) { m_delegate = handler; }
+ virtual void executeAllOptionalParameters(long requestId, const Inspector::InspectorArray* in_columnNames, const String* const in_notes, const double* const in_timestamp, const Inspector::InspectorObject* in_values, const Inspector::InspectorValue* const in_payload, const int* const in_databaseId, const Inspector::InspectorObject* in_sqlError, const String* const in_screenColor, const Inspector::InspectorArray* in_alternateColors, const String* const in_printColor) override;
+ virtual void executeNoOptionalParameters(long requestId, const Inspector::InspectorArray& in_columnNames, const String& in_notes, double in_timestamp, const Inspector::InspectorObject& in_values, Inspector::InspectorValue in_payload, int in_databaseId, const Inspector::InspectorObject& in_sqlError, const String& in_screenColor, const Inspector::InspectorArray& in_alternateColors, const String& in_printColor) override;
+private:
+ RetainPtr<id<TestProtocolDatabaseDomainHandler>> m_delegate;
+};
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+ id<TestProtocolDatabaseDomainHandler> _databaseHandler;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [_databaseHandler release];
+ [super dealloc];
+}
+
+- (void)setDatabaseHandler:(id<TestProtocolDatabaseDomainHandler>)handler
+{
+ if (handler == _databaseHandler)
+ return;
+
+ [_databaseHandler release];
+ _databaseHandler = [handler retain];
+
+ auto alternateDispatcher = std::make_unique<ObjCInspectorDatabaseBackendDispatcher>(handler);
+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>(ASCIILiteral("Database"), *_controller, WTFMove(alternateDispatcher));
+ _controller->appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id<TestProtocolDatabaseDomainHandler>)databaseHandler
+{
+ return _databaseHandler;
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@property (nonatomic, retain, setter=setDatabaseHandler:) id<TestProtocolDatabaseDomainHandler> databaseHandler;
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+void ObjCInspectorDatabaseBackendDispatcher::executeAllOptionalParameters(long requestId, const Inspector::InspectorArray* in_columnNames, const String* const in_notes, const double* const in_timestamp, const Inspector::InspectorObject* in_values, const Inspector::InspectorValue* const in_payload, const int* const in_databaseId, const Inspector::InspectorObject* in_sqlError, const String* const in_screenColor, const Inspector::InspectorArray* in_alternateColors, const String* const in_printColor)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^(NSArray/*<NSString>*/ **columnNames, NSString **notes, double *timestamp, RWIProtocolJSONObject **values, RWIProtocolJSONObject **payload, int *databaseId, TestProtocolDatabaseError **sqlError, TestProtocolDatabasePrimaryColors *screenColor, NSArray/*<NSString>*/ **alternateColors, TestProtocolDatabaseExecuteAllOptionalParametersPrintColor *printColor) {
+ Ref<InspectorObject> resultObject = InspectorObject::create();
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(notes, @"notes");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(values, @"values");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(payload, @"payload");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
+ if (columnNames)
+ resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+ if (notes)
+ resultObject->setString(ASCIILiteral("notes"), *notes);
+ if (timestamp)
+ resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
+ if (values)
+ resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+ if (payload)
+ resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+ if (databaseId)
+ resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
+ if (sqlError)
+ resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+ if (screenColor)
+ resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
+ if (alternateColors)
+ resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+ if (printColor)
+ resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
+ backendDispatcher()->sendResponse(requestId, WTFMove(resultObject));
+ };
+
+ NSArray/*<NSString>*/ *o_in_columnNames;
+ if (in_columnNames)
+ o_in_columnNames = objcStringArray(in_columnNames);
+ NSString *o_in_notes;
+ if (in_notes)
+ o_in_notes = *in_notes;
+ double o_in_timestamp;
+ if (in_timestamp)
+ o_in_timestamp = *in_timestamp;
+ RWIProtocolJSONObject *o_in_values;
+ if (in_values)
+ o_in_values = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:in_values] autorelease];
+ RWIProtocolJSONObject *o_in_payload;
+ if (in_payload)
+ o_in_payload = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:in_payload] autorelease];
+ int o_in_databaseId;
+ if (in_databaseId)
+ o_in_databaseId = *in_databaseId;
+ TestProtocolDatabaseError *o_in_sqlError;
+ if (in_sqlError)
+ o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithInspectorObject:in_sqlError] autorelease];
+ TestProtocolDatabasePrimaryColors o_in_screenColor;
+ if (in_screenColor)
+ o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(*in_screenColor);
+ NSArray/*<NSString>*/ *o_in_alternateColors;
+ if (in_alternateColors)
+ o_in_alternateColors = objcStringArray(in_alternateColors);
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColor o_in_printColor;
+ if (in_printColor)
+ o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteAllOptionalParametersPrintColor>(*in_printColor);
+
+ [m_delegate executeAllOptionalParametersWithErrorCallback:errorCallback successCallback:successCallback columnNames:(in_columnNames ? &o_in_columnNames : nil) notes:(in_notes ? &o_in_notes : nil) timestamp:(in_timestamp ? &o_in_timestamp : nil) values:(in_values ? &o_in_values : nil) payload:(in_payload ? &o_in_payload : nil) databaseId:(in_databaseId ? &o_in_databaseId : nil) sqlError:(in_sqlError ? &o_in_sqlError : nil) screenColor:(in_screenColor ? &o_in_screenColor : nil) alternateColors:(in_alternateColors ? &o_in_alternateColors : nil) printColor:(in_printColor ? &o_in_printColor : nil)];
+}
+
+void ObjCInspectorDatabaseBackendDispatcher::executeNoOptionalParameters(long requestId, const Inspector::InspectorArray& in_columnNames, const String& in_notes, double in_timestamp, const Inspector::InspectorObject& in_values, Inspector::InspectorValue in_payload, int in_databaseId, const Inspector::InspectorObject& in_sqlError, const String& in_screenColor, const Inspector::InspectorArray& in_alternateColors, const String& in_printColor)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^(NSArray/*<NSString>*/ *columnNames, NSString *notes, double timestamp, RWIProtocolJSONObject *values, RWIProtocolJSONObject *payload, int databaseId, TestProtocolDatabaseError *sqlError, TestProtocolDatabasePrimaryColors screenColor, NSArray/*<NSString>*/ *alternateColors, TestProtocolDatabaseExecuteNoOptionalParametersPrintColor printColor) {
+ Ref<InspectorObject> resultObject = InspectorObject::create();
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(notes, @"notes");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(values, @"values");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
+ resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+ resultObject->setString(ASCIILiteral("notes"), notes);
+ resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
+ resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
+ resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+ resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
+ resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+ resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
+ resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+ resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
+ backendDispatcher()->sendResponse(requestId, WTFMove(resultObject));
+ };
+
+ NSArray/*<NSString>*/ *o_in_columnNames = objcStringArray(&in_columnNames);
+ NSString *o_in_notes = in_notes;
+ double o_in_timestamp = in_timestamp;
+ RWIProtocolJSONObject *o_in_values = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:&in_values] autorelease];
+ RWIProtocolJSONObject *o_in_payload = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:&in_payload] autorelease];
+ int o_in_databaseId = in_databaseId;
+ TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithInspectorObject:&in_sqlError] autorelease];
+ TestProtocolDatabasePrimaryColors o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(in_screenColor);
+ NSArray/*<NSString>*/ *o_in_alternateColors = objcStringArray(&in_alternateColors);
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColor o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor>(in_printColor);
+
+ [m_delegate executeNoOptionalParametersWithErrorCallback:errorCallback successCallback:successCallback columnNames:o_in_columnNames notes:o_in_notes timestamp:o_in_timestamp values:o_in_values payload:o_in_payload databaseId:o_in_databaseId sqlError:o_in_sqlError screenColor:o_in_screenColor alternateColors:o_in_alternateColors printColor:o_in_printColor];
+}
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+@class TestProtocolDatabaseError;
+
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabasePrimaryColors) {
+ TestProtocolDatabasePrimaryColorsRed,
+ TestProtocolDatabasePrimaryColorsGreen,
+ TestProtocolDatabasePrimaryColorsBlue,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteAllOptionalParametersPrintColor) {
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan,
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColorMagenta,
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColorYellow,
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColorBlack,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteAllOptionalParametersPrintColor) {
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan,
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColorMagenta,
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColorYellow,
+ TestProtocolDatabaseExecuteAllOptionalParametersPrintColorBlack,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteNoOptionalParametersPrintColor) {
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan,
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColorMagenta,
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColorYellow,
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteNoOptionalParametersPrintColor) {
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan,
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColorMagenta,
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColorYellow,
+ TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack,
+};
+
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseError : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithMessage:(NSString *)message code:(int)code;
+/* required */ @property (nonatomic, copy) NSString *message;
+/* required */ @property (nonatomic, assign) int code;
+@end
+
+@protocol TestProtocolDatabaseDomainHandler <NSObject>
+@required
+- (void)executeAllOptionalParametersWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(NSArray/*<NSString>*/ **columnNames, NSString **notes, double *timestamp, RWIProtocolJSONObject **values, RWIProtocolJSONObject **payload, int *databaseId, TestProtocolDatabaseError **sqlError, TestProtocolDatabasePrimaryColors *screenColor, NSArray/*<NSString>*/ **alternateColors, TestProtocolDatabaseExecuteAllOptionalParametersPrintColor *printColor))successCallback columnNames:(NSArray/*<NSString>*/ **)columnNames notes:(NSString **)notes timestamp:(double *)timestamp values:(RWIProtocolJSONObject **)values payload:(RWIProtocolJSONObject **)payload databaseId:(int *)databaseId sqlError:(TestProtocolDatabaseError **)sqlError screenColor:(TestProtocolDatabasePrimaryColors *)screenColor alternateColors:(NSArray/*<NSString>*/ **)alternateColors printColor:(TestProtocolDatabaseExecuteAllOptionalParametersPrintColor *)printColor;
+- (void)executeNoOptionalParametersWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(NSArray/*<NSString>*/ *columnNames, NSString *notes, double timestamp, RWIProtocolJSONObject *values, RWIProtocolJSONObject *payload, int databaseId, TestProtocolDatabaseError *sqlError, TestProtocolDatabasePrimaryColors screenColor, NSArray/*<NSString>*/ *alternateColors, TestProtocolDatabaseExecuteNoOptionalParametersPrintColor printColor))successCallback columnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload databaseId:(int)databaseId sqlError:(TestProtocolDatabaseError *)sqlError screenColor:(TestProtocolDatabasePrimaryColors)screenColor alternateColors:(NSArray/*<NSString>*/ *)alternateColors printColor:(TestProtocolDatabaseExecuteNoOptionalParametersPrintColor)printColor;
+@end
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+inline String toProtocolString(TestProtocolDatabasePrimaryColors value)
+{
+ switch(value) {
+ case TestProtocolDatabasePrimaryColorsRed:
+ return ASCIILiteral("red");
+ case TestProtocolDatabasePrimaryColorsGreen:
+ return ASCIILiteral("green");
+ case TestProtocolDatabasePrimaryColorsBlue:
+ return ASCIILiteral("blue");
+ }
+}
+
+template<>
+inline TestProtocolDatabasePrimaryColors fromProtocolString(const String& value)
+{
+ if (value == "red")
+ return TestProtocolDatabasePrimaryColorsRed;
+ if (value == "green")
+ return TestProtocolDatabasePrimaryColorsGreen;
+ if (value == "blue")
+ return TestProtocolDatabasePrimaryColorsBlue;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabasePrimaryColorsRed;
+}
+
+inline String toProtocolString(TestProtocolDatabaseExecuteAllOptionalParametersPrintColor value)
+{
+ switch(value) {
+ case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorYellow:
+ return ASCIILiteral("yellow");
+ case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorBlack:
+ return ASCIILiteral("black");
+ }
+}
+
+template<>
+inline TestProtocolDatabaseExecuteAllOptionalParametersPrintColor fromProtocolString(const String& value)
+{
+ if (value == "cyan")
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan;
+ if (value == "magenta")
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorMagenta;
+ if (value == "yellow")
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorYellow;
+ if (value == "black")
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorBlack;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan;
+}
+
+inline String toProtocolString(TestProtocolDatabaseExecuteAllOptionalParametersPrintColor value)
+{
+ switch(value) {
+ case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorYellow:
+ return ASCIILiteral("yellow");
+ case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorBlack:
+ return ASCIILiteral("black");
+ }
+}
+
+template<>
+inline TestProtocolDatabaseExecuteAllOptionalParametersPrintColor fromProtocolString(const String& value)
+{
+ if (value == "cyan")
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan;
+ if (value == "magenta")
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorMagenta;
+ if (value == "yellow")
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorYellow;
+ if (value == "black")
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorBlack;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan;
+}
+
+inline String toProtocolString(TestProtocolDatabaseExecuteNoOptionalParametersPrintColor value)
+{
+ switch(value) {
+ case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorYellow:
+ return ASCIILiteral("yellow");
+ case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack:
+ return ASCIILiteral("black");
+ }
+}
+
+template<>
+inline TestProtocolDatabaseExecuteNoOptionalParametersPrintColor fromProtocolString(const String& value)
+{
+ if (value == "cyan")
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan;
+ if (value == "magenta")
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorMagenta;
+ if (value == "yellow")
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorYellow;
+ if (value == "black")
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan;
+}
+
+inline String toProtocolString(TestProtocolDatabaseExecuteNoOptionalParametersPrintColor value)
+{
+ switch(value) {
+ case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorYellow:
+ return ASCIILiteral("yellow");
+ case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack:
+ return ASCIILiteral("black");
+ }
+}
+
+template<>
+inline TestProtocolDatabaseExecuteNoOptionalParametersPrintColor fromProtocolString(const String& value)
+{
+ if (value == "cyan")
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan;
+ if (value == "magenta")
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorMagenta;
+ if (value == "yellow")
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorYellow;
+ if (value == "black")
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan;
+}
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (DatabaseDomain)
+
++ (void)_parseDatabaseId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parsePrimaryColors:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (DatabaseDomain)
+
++ (void)_parseDatabaseId:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+ *outValue = (NSNumber *)payload;
+}
+
++ (void)_parsePrimaryColors:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = @(Inspector::fromProtocolString<TestProtocolDatabasePrimaryColors>(payload));
+}
+
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+ *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolDatabaseError alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+@implementation TestProtocolDatabaseError
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"message"], @"message");
+ self.message = payload[@"message"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"code"], @"code");
+ self.code = [payload[@"code"] integerValue];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithMessage:(NSString *)message code:(int)code
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(message, @"message");
+
+ self.message = message;
+ self.code = code;
+
+ return self;
+}
+
+- (void)setMessage:(NSString *)message
+{
+ [super setString:message forKey:@"message"];
+}
+
+- (NSString *)message
+{
+ return [super stringForKey:@"message"];
+}
+
+- (void)setCode:(int)code
+{
+ [super setInteger:code forKey:@"code"];
+}
+
+- (int)code
+{
+ return [super integerForKey:@"code"];
+}
+
+@end
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddomainswithvaryingcommandsizesjsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpecteddomainswithvaryingcommandsizesjsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1398 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// Network1.
+InspectorBackend.registerCommand("Network1.loadResource1", [], []);
+InspectorBackend.activateDomain("Network1");
+
+// Network3.
+InspectorBackend.registerCommand("Network3.loadResource1", [], []);
+InspectorBackend.registerCommand("Network3.loadResource2", [], []);
+InspectorBackend.registerCommand("Network3.loadResource3", [], []);
+InspectorBackend.registerCommand("Network3.loadResource4", [], []);
+InspectorBackend.registerCommand("Network3.loadResource5", [], []);
+InspectorBackend.registerCommand("Network3.loadResource6", [], []);
+InspectorBackend.registerCommand("Network3.loadResource7", [], []);
+InspectorBackend.activateDomain("Network3");
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+class AlternateNetwork1BackendDispatcher : public AlternateBackendDispatcher {
+public:
+ virtual ~AlternateNetwork1BackendDispatcher() { }
+ virtual void loadResource1(long callId) = 0;
+};
+class AlternateNetwork3BackendDispatcher : public AlternateBackendDispatcher {
+public:
+ virtual ~AlternateNetwork3BackendDispatcher() { }
+ virtual void loadResource1(long callId) = 0;
+ virtual void loadResource2(long callId) = 0;
+ virtual void loadResource3(long callId) = 0;
+ virtual void loadResource4(long callId) = 0;
+ virtual void loadResource5(long callId) = 0;
+ virtual void loadResource6(long callId) = 0;
+ virtual void loadResource7(long callId) = 0;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+class AlternateNetwork1BackendDispatcher;
+class AlternateNetwork3BackendDispatcher;
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+class Network1BackendDispatcherHandler {
+public:
+ virtual void loadResource1(ErrorString&) = 0;
+protected:
+ virtual ~Network1BackendDispatcherHandler();
+};
+
+class Network3BackendDispatcherHandler {
+public:
+ virtual void loadResource1(ErrorString&) = 0;
+ virtual void loadResource2(ErrorString&) = 0;
+ virtual void loadResource3(ErrorString&) = 0;
+ virtual void loadResource4(ErrorString&) = 0;
+ virtual void loadResource5(ErrorString&) = 0;
+ virtual void loadResource6(ErrorString&) = 0;
+ virtual void loadResource7(ErrorString&) = 0;
+protected:
+ virtual ~Network3BackendDispatcherHandler();
+};
+
+class Network1BackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+ static Ref<Network1BackendDispatcher> create(BackendDispatcher&, Network1BackendDispatcherHandler*);
+ void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override;
+private:
+ void loadResource1(long requestId, RefPtr<InspectorObject>&& parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+ void setAlternateDispatcher(AlternateNetwork1BackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+ AlternateNetwork1BackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+ Network1BackendDispatcher(BackendDispatcher&, Network1BackendDispatcherHandler*);
+ Network1BackendDispatcherHandler* m_agent { nullptr };
+};
+
+class Network3BackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+ static Ref<Network3BackendDispatcher> create(BackendDispatcher&, Network3BackendDispatcherHandler*);
+ void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override;
+private:
+ void loadResource1(long requestId, RefPtr<InspectorObject>&& parameters);
+ void loadResource2(long requestId, RefPtr<InspectorObject>&& parameters);
+ void loadResource3(long requestId, RefPtr<InspectorObject>&& parameters);
+ void loadResource4(long requestId, RefPtr<InspectorObject>&& parameters);
+ void loadResource5(long requestId, RefPtr<InspectorObject>&& parameters);
+ void loadResource6(long requestId, RefPtr<InspectorObject>&& parameters);
+ void loadResource7(long requestId, RefPtr<InspectorObject>&& parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+ void setAlternateDispatcher(AlternateNetwork3BackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+ AlternateNetwork3BackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+ Network3BackendDispatcher(BackendDispatcher&, Network3BackendDispatcherHandler*);
+ Network3BackendDispatcherHandler* m_agent { nullptr };
+};
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+Network1BackendDispatcherHandler::~Network1BackendDispatcherHandler() { }
+Network3BackendDispatcherHandler::~Network3BackendDispatcherHandler() { }
+
+Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent)
+{
+ return adoptRef(*new Network1BackendDispatcher(backendDispatcher, agent));
+}
+
+Network1BackendDispatcher::Network1BackendDispatcher(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent)
+ : SupplementalBackendDispatcher(backendDispatcher)
+ , m_agent(agent)
+{
+ m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network1"), this);
+}
+
+void Network1BackendDispatcher::dispatch(long requestId, const String& method, Ref<InspectorObject>&& message)
+{
+ Ref<Network1BackendDispatcher> protect(*this);
+
+ RefPtr<InspectorObject> parameters;
+ message->getObject(ASCIILiteral("params"), parameters);
+
+ if (method == "loadResource1")
+ loadResource1(requestId, WTFMove(parameters));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', "Network1", '.', method, "' was not found"));
+}
+
+void Network1BackendDispatcher::loadResource1(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource1(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource1(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+Ref<Network3BackendDispatcher> Network3BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network3BackendDispatcherHandler* agent)
+{
+ return adoptRef(*new Network3BackendDispatcher(backendDispatcher, agent));
+}
+
+Network3BackendDispatcher::Network3BackendDispatcher(BackendDispatcher& backendDispatcher, Network3BackendDispatcherHandler* agent)
+ : SupplementalBackendDispatcher(backendDispatcher)
+ , m_agent(agent)
+{
+ m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network3"), this);
+}
+
+void Network3BackendDispatcher::dispatch(long requestId, const String& method, Ref<InspectorObject>&& message)
+{
+ Ref<Network3BackendDispatcher> protect(*this);
+
+ RefPtr<InspectorObject> parameters;
+ message->getObject(ASCIILiteral("params"), parameters);
+
+ typedef void (Network3BackendDispatcher::*CallHandler)(long requestId, RefPtr<InspectorObject>&& message);
+ typedef HashMap<String, CallHandler> DispatchMap;
+ static NeverDestroyed<DispatchMap> dispatchMap;
+ if (dispatchMap.get().isEmpty()) {
+ static const struct MethodTable {
+ const char* name;
+ CallHandler handler;
+ } commands[] = {
+ { "loadResource1", &Network3BackendDispatcher::loadResource1 },
+ { "loadResource2", &Network3BackendDispatcher::loadResource2 },
+ { "loadResource3", &Network3BackendDispatcher::loadResource3 },
+ { "loadResource4", &Network3BackendDispatcher::loadResource4 },
+ { "loadResource5", &Network3BackendDispatcher::loadResource5 },
+ { "loadResource6", &Network3BackendDispatcher::loadResource6 },
+ { "loadResource7", &Network3BackendDispatcher::loadResource7 },
+ };
+ size_t length = WTF_ARRAY_LENGTH(commands);
+ for (size_t i = 0; i < length; ++i)
+ dispatchMap.get().add(commands[i].name, commands[i].handler);
+ }
+
+ auto findResult = dispatchMap.get().find(method);
+ if (findResult == dispatchMap.get().end()) {
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', "Network3", '.', method, "' was not found"));
+ return;
+ }
+
+ ((*this).*findResult->value)(requestId, WTFMove(parameters));
+}
+
+void Network3BackendDispatcher::loadResource1(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource1(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource1(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+void Network3BackendDispatcher::loadResource2(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource2(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource2(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+void Network3BackendDispatcher::loadResource3(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource3(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource3(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+void Network3BackendDispatcher::loadResource4(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource4(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource4(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+void Network3BackendDispatcher::loadResource5(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource5(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource5(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+void Network3BackendDispatcher::loadResource6(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource6(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource6(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+void Network3BackendDispatcher::loadResource7(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource7(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource7(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+
+
+// Typedefs.
+namespace Network2 {
+/* Unique loader identifier. */
+typedef String LoaderId;
+} // Network2
+// End of typedefs.
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+@protocol TestProtocolNetwork1DomainHandler;
+@protocol TestProtocolNetwork3DomainHandler;
+
+namespace Inspector {
+
+
+class ObjCInspectorNetwork1BackendDispatcher final : public AlternateNetwork1BackendDispatcher {
+public:
+ ObjCInspectorNetwork1BackendDispatcher(id<TestProtocolNetwork1DomainHandler> handler) { m_delegate = handler; }
+ virtual void loadResource1(long requestId) override;
+private:
+ RetainPtr<id<TestProtocolNetwork1DomainHandler>> m_delegate;
+};
+
+
+
+class ObjCInspectorNetwork3BackendDispatcher final : public AlternateNetwork3BackendDispatcher {
+public:
+ ObjCInspectorNetwork3BackendDispatcher(id<TestProtocolNetwork3DomainHandler> handler) { m_delegate = handler; }
+ virtual void loadResource1(long requestId) override;
+ virtual void loadResource2(long requestId) override;
+ virtual void loadResource3(long requestId) override;
+ virtual void loadResource4(long requestId) override;
+ virtual void loadResource5(long requestId) override;
+ virtual void loadResource6(long requestId) override;
+ virtual void loadResource7(long requestId) override;
+private:
+ RetainPtr<id<TestProtocolNetwork3DomainHandler>> m_delegate;
+};
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+ id<TestProtocolNetwork1DomainHandler> _network1Handler;
+ id<TestProtocolNetwork3DomainHandler> _network3Handler;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [_network1Handler release];
+ [_network3Handler release];
+ [super dealloc];
+}
+
+- (void)setNetwork1Handler:(id<TestProtocolNetwork1DomainHandler>)handler
+{
+ if (handler == _network1Handler)
+ return;
+
+ [_network1Handler release];
+ _network1Handler = [handler retain];
+
+ auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork1BackendDispatcher>(handler);
+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), *_controller, WTFMove(alternateDispatcher));
+ _controller->appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id<TestProtocolNetwork1DomainHandler>)network1Handler
+{
+ return _network1Handler;
+}
+
+- (void)setNetwork3Handler:(id<TestProtocolNetwork3DomainHandler>)handler
+{
+ if (handler == _network3Handler)
+ return;
+
+ [_network3Handler release];
+ _network3Handler = [handler retain];
+
+ auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork3BackendDispatcher>(handler);
+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network3BackendDispatcher, AlternateNetwork3BackendDispatcher>>(ASCIILiteral("Network3"), *_controller, WTFMove(alternateDispatcher));
+ _controller->appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id<TestProtocolNetwork3DomainHandler>)network3Handler
+{
+ return _network3Handler;
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@property (nonatomic, retain, setter=setNetwork1Handler:) id<TestProtocolNetwork1DomainHandler> network1Handler;
+@property (nonatomic, retain, setter=setNetwork3Handler:) id<TestProtocolNetwork3DomainHandler> network3Handler;
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+void ObjCInspectorNetwork1BackendDispatcher::loadResource1(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResource1WithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+
+
+
+void ObjCInspectorNetwork3BackendDispatcher::loadResource1(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResource1WithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+void ObjCInspectorNetwork3BackendDispatcher::loadResource2(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResource2WithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+void ObjCInspectorNetwork3BackendDispatcher::loadResource3(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResource3WithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+void ObjCInspectorNetwork3BackendDispatcher::loadResource4(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResource4WithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+void ObjCInspectorNetwork3BackendDispatcher::loadResource5(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResource5WithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+void ObjCInspectorNetwork3BackendDispatcher::loadResource6(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResource6WithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+void ObjCInspectorNetwork3BackendDispatcher::loadResource7(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResource7WithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+
+
+
+
+
+
+@protocol TestProtocolNetwork1DomainHandler <NSObject>
+@required
+- (void)loadResource1WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+@end
+
+@protocol TestProtocolNetwork3DomainHandler <NSObject>
+@required
+- (void)loadResource1WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+- (void)loadResource2WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+- (void)loadResource3WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+- (void)loadResource4WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+- (void)loadResource5WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+- (void)loadResource6WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+- (void)loadResource7WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+@end
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (Network1Domain)
+
+@end
+@interface TestProtocolTypeConversions (Network2Domain)
+
++ (void)_parseLoaderId:(NSString **)outValue fromPayload:(id)payload;
+
+@end
+@interface TestProtocolTypeConversions (Network3Domain)
+
+@end
+
+@implementation TestProtocolTypeConversions (Network1Domain)
+
+@end
+@implementation TestProtocolTypeConversions (Network2Domain)
+
++ (void)_parseLoaderId:(NSString **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = (NSString *)payload;
+}
+
+@end
+@implementation TestProtocolTypeConversions (Network3Domain)
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+
+
+
+
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedenumvaluesjsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedenumvaluesjsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1273 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// TypeDomain.
+InspectorBackend.registerEnum("TypeDomain.TypeDomainEnum", {Shared: "shared", Red: "red", Green: "green", Blue: "blue"});
+
+// CommandDomain.
+InspectorBackend.registerCommand("CommandDomain.commandWithEnumReturnValue", [], ["returnValue"]);
+InspectorBackend.activateDomain("CommandDomain");
+
+// EventDomain.
+InspectorBackend.registerEventDomainDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "EventDomain");
+InspectorBackend.registerEnum("EventDomain.EventWithEnumParameterParameter", {Shared: "shared", Black: "black", White: "white"});
+InspectorBackend.registerEvent("EventDomain.eventWithEnumParameter", ["parameter"]);
+InspectorBackend.activateDomain("EventDomain");
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+class AlternateCommandDomainBackendDispatcher : public AlternateBackendDispatcher {
+public:
+ virtual ~AlternateCommandDomainBackendDispatcher() { }
+ virtual void commandWithEnumReturnValue(long callId) = 0;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+class AlternateCommandDomainBackendDispatcher;
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+class CommandDomainBackendDispatcherHandler {
+public:
+ // Named after parameter 'returnValue' while generating command/event commandWithEnumReturnValue.
+ enum class ReturnValue {
+ Shared = 0,
+ Cyan = 6,
+ Magenta = 7,
+ Yellow = 8,
+ }; // enum class ReturnValue
+ virtual void commandWithEnumReturnValue(ErrorString&, CommandDomainBackendDispatcherHandler::ReturnValue* out_returnValue) = 0;
+protected:
+ virtual ~CommandDomainBackendDispatcherHandler();
+};
+
+class CommandDomainBackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+ static Ref<CommandDomainBackendDispatcher> create(BackendDispatcher&, CommandDomainBackendDispatcherHandler*);
+ void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override;
+private:
+ void commandWithEnumReturnValue(long requestId, RefPtr<InspectorObject>&& parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+ void setAlternateDispatcher(AlternateCommandDomainBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+ AlternateCommandDomainBackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+ CommandDomainBackendDispatcher(BackendDispatcher&, CommandDomainBackendDispatcherHandler*);
+ CommandDomainBackendDispatcherHandler* m_agent { nullptr };
+};
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+CommandDomainBackendDispatcherHandler::~CommandDomainBackendDispatcherHandler() { }
+
+Ref<CommandDomainBackendDispatcher> CommandDomainBackendDispatcher::create(BackendDispatcher& backendDispatcher, CommandDomainBackendDispatcherHandler* agent)
+{
+ return adoptRef(*new CommandDomainBackendDispatcher(backendDispatcher, agent));
+}
+
+CommandDomainBackendDispatcher::CommandDomainBackendDispatcher(BackendDispatcher& backendDispatcher, CommandDomainBackendDispatcherHandler* agent)
+ : SupplementalBackendDispatcher(backendDispatcher)
+ , m_agent(agent)
+{
+ m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("CommandDomain"), this);
+}
+
+void CommandDomainBackendDispatcher::dispatch(long requestId, const String& method, Ref<InspectorObject>&& message)
+{
+ Ref<CommandDomainBackendDispatcher> protect(*this);
+
+ RefPtr<InspectorObject> parameters;
+ message->getObject(ASCIILiteral("params"), parameters);
+
+ if (method == "commandWithEnumReturnValue")
+ commandWithEnumReturnValue(requestId, WTFMove(parameters));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', "CommandDomain", '.', method, "' was not found"));
+}
+
+void CommandDomainBackendDispatcher::commandWithEnumReturnValue(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->commandWithEnumReturnValue(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ CommandDomainBackendDispatcherHandler::ReturnValue out_returnValue;
+ m_agent->commandWithEnumReturnValue(error, &out_returnValue);
+
+ if (!error.length())
+ result->setString(ASCIILiteral("returnValue"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_returnValue));
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+class EventDomainFrontendDispatcher {
+public:
+ EventDomainFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
+ // Named after parameter 'parameter' while generating command/event eventWithEnumParameter.
+ enum class Parameter {
+ Shared = 0,
+ Black = 4,
+ White = 5,
+ }; // enum class Parameter
+ void eventWithEnumParameter(Parameter parameter);
+private:
+ FrontendRouter& m_frontendRouter;
+};
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+void EventDomainFrontendDispatcher::eventWithEnumParameter(Parameter parameter)
+{
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("EventDomain.eventWithEnumParameter"));
+ Ref<InspectorObject> paramsObject = InspectorObject::create();
+ paramsObject->setString(ASCIILiteral("parameter"), Inspector::Protocol::TestHelpers::getEnumConstantValue(parameter));
+ jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
+
+ m_frontendRouter.sendEvent(jsonMessage->toJSONString());
+}
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace TypeDomain {
+enum class TypeDomainEnum;
+} // TypeDomain
+// End of forward declarations.
+
+
+
+
+namespace TestHelpers {
+
+String getEnumConstantValue(int code);
+
+template<typename T> String getEnumConstantValue(T enumValue)
+{
+ return getEnumConstantValue(static_cast<int>(enumValue));
+}
+
+} // namespace TestHelpers
+
+namespace TypeDomain {
+/* */
+enum class TypeDomainEnum {
+ Shared = 0,
+ Red = 1,
+ Green = 2,
+ Blue = 3,
+}; // enum class TypeDomainEnum
+} // TypeDomain
+
+
+
+namespace TestHelpers {
+
+template<typename ProtocolEnumType>
+std::optional<ProtocolEnumType> parseEnumValueFromString(const String&);
+
+// Enums in the 'TypeDomain' Domain
+template<>
+std::optional<Inspector::Protocol::TypeDomain::TypeDomainEnum> parseEnumValueFromString<Inspector::Protocol::TypeDomain::TypeDomainEnum>(const String&);
+
+} // namespace TestHelpers
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+namespace TestHelpers {
+
+static const char* const enum_constant_values[] = {
+ "shared",
+ "red",
+ "green",
+ "blue",
+ "black",
+ "white",
+ "cyan",
+ "magenta",
+ "yellow",
+};
+
+String getEnumConstantValue(int code) {
+ return enum_constant_values[code];
+}
+
+// Enums in the 'TypeDomain' Domain
+template<>
+std::optional<Inspector::Protocol::TypeDomain::TypeDomainEnum> parseEnumValueFromString<Inspector::Protocol::TypeDomain::TypeDomainEnum>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::TypeDomain::TypeDomainEnum::Shared,
+ (size_t)Inspector::Protocol::TypeDomain::TypeDomainEnum::Red,
+ (size_t)Inspector::Protocol::TypeDomain::TypeDomainEnum::Green,
+ (size_t)Inspector::Protocol::TypeDomain::TypeDomainEnum::Blue,
+ };
+ for (size_t i = 0; i < 4; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::TypeDomain::TypeDomainEnum)constantValues[i];
+
+ return std::nullopt;
+}
+
+
+} // namespace TestHelpers
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+@protocol TestProtocolCommandDomainDomainHandler;
+
+namespace Inspector {
+
+
+
+
+class ObjCInspectorCommandDomainBackendDispatcher final : public AlternateCommandDomainBackendDispatcher {
+public:
+ ObjCInspectorCommandDomainBackendDispatcher(id<TestProtocolCommandDomainDomainHandler> handler) { m_delegate = handler; }
+ virtual void commandWithEnumReturnValue(long requestId) override;
+private:
+ RetainPtr<id<TestProtocolCommandDomainDomainHandler>> m_delegate;
+};
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+ id<TestProtocolCommandDomainDomainHandler> _commandDomainHandler;
+ TestProtocolEventDomainDomainEventDispatcher *_eventDomainEventDispatcher;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [_commandDomainHandler release];
+ [_eventDomainEventDispatcher release];
+ [super dealloc];
+}
+
+- (void)setCommandDomainHandler:(id<TestProtocolCommandDomainDomainHandler>)handler
+{
+ if (handler == _commandDomainHandler)
+ return;
+
+ [_commandDomainHandler release];
+ _commandDomainHandler = [handler retain];
+
+ auto alternateDispatcher = std::make_unique<ObjCInspectorCommandDomainBackendDispatcher>(handler);
+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<CommandDomainBackendDispatcher, AlternateCommandDomainBackendDispatcher>>(ASCIILiteral("CommandDomain"), *_controller, WTFMove(alternateDispatcher));
+ _controller->appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id<TestProtocolCommandDomainDomainHandler>)commandDomainHandler
+{
+ return _commandDomainHandler;
+}
+
+- (TestProtocolEventDomainDomainEventDispatcher *)eventDomainEventDispatcher
+{
+ if (!_eventDomainEventDispatcher)
+ _eventDomainEventDispatcher = [[TestProtocolEventDomainDomainEventDispatcher alloc] initWithController:_controller];
+ return _eventDomainEventDispatcher;
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@property (nonatomic, retain, setter=setCommandDomainHandler:) id<TestProtocolCommandDomainDomainHandler> commandDomainHandler;
+@property (nonatomic, readonly) TestProtocolEventDomainDomainEventDispatcher *eventDomainEventDispatcher;
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+void ObjCInspectorCommandDomainBackendDispatcher::commandWithEnumReturnValue(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^(TestProtocolCommandDomainCommandWithEnumReturnValueReturnValue returnValue) {
+ Ref<InspectorObject> resultObject = InspectorObject::create();
+ resultObject->setString(ASCIILiteral("returnValue"), toProtocolString(returnValue));
+ backendDispatcher()->sendResponse(requestId, WTFMove(resultObject));
+ };
+
+ [m_delegate commandWithEnumReturnValueWithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+
+@implementation TestProtocolEventDomainDomainEventDispatcher
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller;
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)eventWithEnumParameterWithParameter:(TestProtocolEventDomainEventWithEnumParameterParameter)parameter
+{
+ const FrontendRouter& router = _controller->frontendRouter();
+
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("EventDomain.eventWithEnumParameter"));
+ Ref<InspectorObject> paramsObject = InspectorObject::create();
+ paramsObject->setString(ASCIILiteral("parameter"), toProtocolString(parameter));
+ jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
+ router.sendEvent(jsonMessage->toJSONString());
+}
+
+@end
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+
+
+
+typedef NS_ENUM(NSInteger, TestProtocolTypeDomainEnum) {
+ TestProtocolTypeDomainEnumShared,
+ TestProtocolTypeDomainEnumRed,
+ TestProtocolTypeDomainEnumGreen,
+ TestProtocolTypeDomainEnumBlue,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolCommandDomainCommandWithEnumReturnValueReturnValue) {
+ TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared,
+ TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan,
+ TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta,
+ TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolEventDomainEventWithEnumParameterParameter) {
+ TestProtocolEventDomainEventWithEnumParameterParameterShared,
+ TestProtocolEventDomainEventWithEnumParameterParameterBlack,
+ TestProtocolEventDomainEventWithEnumParameterParameterWhite,
+};
+
+
+
+@protocol TestProtocolCommandDomainDomainHandler <NSObject>
+@required
+- (void)commandWithEnumReturnValueWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(TestProtocolCommandDomainCommandWithEnumReturnValueReturnValue returnValue))successCallback;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolEventDomainDomainEventDispatcher : NSObject
+- (void)eventWithEnumParameterWithParameter:(TestProtocolEventDomainEventWithEnumParameterParameter)parameter;
+@end
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+@interface TestProtocolEventDomainDomainEventDispatcher (Private)
+- (instancetype)initWithController:(Inspector::AugmentableInspectorController*)controller;
+@end
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+inline String toProtocolString(TestProtocolTypeDomainEnum value)
+{
+ switch(value) {
+ case TestProtocolTypeDomainEnumShared:
+ return ASCIILiteral("shared");
+ case TestProtocolTypeDomainEnumRed:
+ return ASCIILiteral("red");
+ case TestProtocolTypeDomainEnumGreen:
+ return ASCIILiteral("green");
+ case TestProtocolTypeDomainEnumBlue:
+ return ASCIILiteral("blue");
+ }
+}
+
+template<>
+inline TestProtocolTypeDomainEnum fromProtocolString(const String& value)
+{
+ if (value == "shared")
+ return TestProtocolTypeDomainEnumShared;
+ if (value == "red")
+ return TestProtocolTypeDomainEnumRed;
+ if (value == "green")
+ return TestProtocolTypeDomainEnumGreen;
+ if (value == "blue")
+ return TestProtocolTypeDomainEnumBlue;
+ ASSERT_NOT_REACHED();
+ return TestProtocolTypeDomainEnumShared;
+}
+
+
+inline String toProtocolString(TestProtocolCommandDomainCommandWithEnumReturnValueReturnValue value)
+{
+ switch(value) {
+ case TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared:
+ return ASCIILiteral("shared");
+ case TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan:
+ return ASCIILiteral("cyan");
+ case TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta:
+ return ASCIILiteral("magenta");
+ case TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow:
+ return ASCIILiteral("yellow");
+ }
+}
+
+template<>
+inline TestProtocolCommandDomainCommandWithEnumReturnValueReturnValue fromProtocolString(const String& value)
+{
+ if (value == "shared")
+ return TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared;
+ if (value == "cyan")
+ return TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan;
+ if (value == "magenta")
+ return TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta;
+ if (value == "yellow")
+ return TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow;
+ ASSERT_NOT_REACHED();
+ return TestProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared;
+}
+
+
+inline String toProtocolString(TestProtocolEventDomainEventWithEnumParameterParameter value)
+{
+ switch(value) {
+ case TestProtocolEventDomainEventWithEnumParameterParameterShared:
+ return ASCIILiteral("shared");
+ case TestProtocolEventDomainEventWithEnumParameterParameterBlack:
+ return ASCIILiteral("black");
+ case TestProtocolEventDomainEventWithEnumParameterParameterWhite:
+ return ASCIILiteral("white");
+ }
+}
+
+template<>
+inline TestProtocolEventDomainEventWithEnumParameterParameter fromProtocolString(const String& value)
+{
+ if (value == "shared")
+ return TestProtocolEventDomainEventWithEnumParameterParameterShared;
+ if (value == "black")
+ return TestProtocolEventDomainEventWithEnumParameterParameterBlack;
+ if (value == "white")
+ return TestProtocolEventDomainEventWithEnumParameterParameterWhite;
+ ASSERT_NOT_REACHED();
+ return TestProtocolEventDomainEventWithEnumParameterParameterShared;
+}
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (TypeDomainDomain)
+
++ (void)_parseTypeDomainEnum:(NSNumber **)outValue fromPayload:(id)payload;
+
+@end
+@interface TestProtocolTypeConversions (CommandDomainDomain)
+
+@end
+@interface TestProtocolTypeConversions (EventDomainDomain)
+
+@end
+
+@implementation TestProtocolTypeConversions (TypeDomainDomain)
+
++ (void)_parseTypeDomainEnum:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = @(Inspector::fromProtocolString<TestProtocolTypeDomainEnum>(payload));
+}
+
+@end
+@implementation TestProtocolTypeConversions (CommandDomainDomain)
+
+@end
+@implementation TestProtocolTypeConversions (EventDomainDomain)
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+
+
+
+
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedeventswithoptionalparametersjsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedeventswithoptionalparametersjsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1183 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// Database.
+InspectorBackend.registerDatabaseDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Database");
+InspectorBackend.registerEvent("Database.didExecuteOptionalParameters", ["columnNames", "notes", "timestamp", "values", "payload", "sqlError", "screenColor", "alternateColors", "printColor"]);
+InspectorBackend.registerEvent("Database.didExecuteNoOptionalParameters", ["columnNames", "notes", "timestamp", "values", "payload", "sqlError", "screenColor", "alternateColors", "printColor"]);
+InspectorBackend.activateDomain("Database");
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+class DatabaseFrontendDispatcher {
+public:
+ DatabaseFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
+ void didExecuteOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String* const notes, const double* const timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors* const screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String* const printColor);
+ void didExecuteNoOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String& notes, double timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors& screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String& printColor);
+private:
+ FrontendRouter& m_frontendRouter;
+};
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+void DatabaseFrontendDispatcher::didExecuteOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String* const notes, const double* const timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors* const screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String* const printColor)
+{
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteOptionalParameters"));
+ Ref<InspectorObject> paramsObject = InspectorObject::create();
+ if (columnNames)
+ paramsObject->setArray(ASCIILiteral("columnNames"), columnNames);
+ if (notes)
+ paramsObject->setString(ASCIILiteral("notes"), *notes);
+ if (timestamp)
+ paramsObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
+ if (values)
+ paramsObject->setObject(ASCIILiteral("values"), values);
+ if (payload)
+ paramsObject->setValue(ASCIILiteral("payload"), *payload);
+ if (sqlError)
+ paramsObject->setObject(ASCIILiteral("sqlError"), sqlError);
+ if (screenColor)
+ paramsObject->setString(ASCIILiteral("screenColor"), *screenColor);
+ if (alternateColors)
+ paramsObject->setArray(ASCIILiteral("alternateColors"), alternateColors);
+ if (printColor)
+ paramsObject->setString(ASCIILiteral("printColor"), *printColor);
+ jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
+
+ m_frontendRouter.sendEvent(jsonMessage->toJSONString());
+}
+
+void DatabaseFrontendDispatcher::didExecuteNoOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String& notes, double timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors& screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String& printColor)
+{
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters"));
+ Ref<InspectorObject> paramsObject = InspectorObject::create();
+ paramsObject->setArray(ASCIILiteral("columnNames"), columnNames);
+ paramsObject->setString(ASCIILiteral("notes"), notes);
+ paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
+ paramsObject->setObject(ASCIILiteral("values"), values);
+ paramsObject->setValue(ASCIILiteral("payload"), payload);
+ paramsObject->setObject(ASCIILiteral("sqlError"), sqlError);
+ paramsObject->setString(ASCIILiteral("screenColor"), screenColor);
+ paramsObject->setArray(ASCIILiteral("alternateColors"), alternateColors);
+ paramsObject->setString(ASCIILiteral("printColor"), printColor);
+ jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
+
+ m_frontendRouter.sendEvent(jsonMessage->toJSONString());
+}
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace Database {
+class Error;
+} // Database
+// End of forward declarations.
+
+
+// Typedefs.
+namespace Database {
+/* Unique identifier of Database object. */
+typedef String DatabaseId;
+typedef String PrimaryColors;
+typedef Inspector::Protocol::Array<Inspector::Protocol::Database::PrimaryColors> ColorList;
+} // Database
+// End of typedefs.
+
+namespace Database {
+/* Database error. */
+class Error : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ MessageSet = 1 << 0,
+ CodeSet = 1 << 1,
+ AllFieldsSet = (MessageSet | CodeSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*Error*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class Error;
+ public:
+
+ Builder<STATE | MessageSet>& setMessage(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set);
+ m_result->setString(ASCIILiteral("message"), value);
+ return castState<MessageSet>();
+ }
+
+ Builder<STATE | CodeSet>& setCode(int value)
+ {
+ COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
+ m_result->setInteger(ASCIILiteral("code"), value);
+ return castState<CodeSet>();
+ }
+
+ Ref<Error> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(Error) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<Error>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<Error> result = Error::create()
+ * .setMessage(...)
+ * .setCode(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+} // Database
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+
+
+namespace Inspector {
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+ TestProtocolDatabaseDomainEventDispatcher *_databaseEventDispatcher;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [_databaseEventDispatcher release];
+ [super dealloc];
+}
+
+- (TestProtocolDatabaseDomainEventDispatcher *)databaseEventDispatcher
+{
+ if (!_databaseEventDispatcher)
+ _databaseEventDispatcher = [[TestProtocolDatabaseDomainEventDispatcher alloc] initWithController:_controller];
+ return _databaseEventDispatcher;
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@property (nonatomic, readonly) TestProtocolDatabaseDomainEventDispatcher *databaseEventDispatcher;
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolDatabaseDomainEventDispatcher
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller;
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)didExecuteOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ **)columnNames notes:(NSString **)notes timestamp:(double *)timestamp values:(RWIProtocolJSONObject **)values payload:(RWIProtocolJSONObject **)payload sqlError:(TestProtocolDatabaseError **)sqlError screenColor:(NSString **)screenColor alternateColors:(NSArray/*<NSString>*/ **)alternateColors printColor:(NSString **)printColor
+{
+ const FrontendRouter& router = _controller->frontendRouter();
+
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(notes, @"notes");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(values, @"values");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(payload, @"payload");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(screenColor, @"screenColor");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
+ THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(printColor, @"printColor");
+
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteOptionalParameters"));
+ Ref<InspectorObject> paramsObject = InspectorObject::create();
+ if (columnNames)
+ paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray((*columnNames)));
+ if (notes)
+ paramsObject->setString(ASCIILiteral("notes"), (*notes));
+ if (timestamp)
+ paramsObject->setDouble(ASCIILiteral("timestamp"), (*timestamp));
+ if (values)
+ paramsObject->setObject(ASCIILiteral("values"), [(*values) toInspectorObject]);
+ if (payload)
+ paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toInspectorObject]);
+ if (sqlError)
+ paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toInspectorObject]);
+ if (screenColor)
+ paramsObject->setString(ASCIILiteral("screenColor"), (*screenColor));
+ if (alternateColors)
+ paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray((*alternateColors)));
+ if (printColor)
+ paramsObject->setString(ASCIILiteral("printColor"), (*printColor));
+ jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
+ router.sendEvent(jsonMessage->toJSONString());
+}
+
+- (void)didExecuteNoOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload sqlError:(TestProtocolDatabaseError *)sqlError screenColor:(NSString *)screenColor alternateColors:(NSArray/*<NSString>*/ *)alternateColors printColor:(NSString *)printColor
+{
+ const FrontendRouter& router = _controller->frontendRouter();
+
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(notes, @"notes");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(values, @"values");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(screenColor, @"screenColor");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
+ THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(printColor, @"printColor");
+
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters"));
+ Ref<InspectorObject> paramsObject = InspectorObject::create();
+ paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+ paramsObject->setString(ASCIILiteral("notes"), notes);
+ paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
+ paramsObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
+ paramsObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+ paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+ paramsObject->setString(ASCIILiteral("screenColor"), screenColor);
+ paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+ paramsObject->setString(ASCIILiteral("printColor"), printColor);
+ jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
+ router.sendEvent(jsonMessage->toJSONString());
+}
+
+@end
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+@class TestProtocolDatabaseError;
+
+
+
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseError : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithMessage:(NSString *)message code:(int)code;
+/* required */ @property (nonatomic, copy) NSString *message;
+/* required */ @property (nonatomic, assign) int code;
+@end
+
+
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseDomainEventDispatcher : NSObject
+- (void)didExecuteOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ **)columnNames notes:(NSString **)notes timestamp:(double *)timestamp values:(RWIProtocolJSONObject **)values payload:(RWIProtocolJSONObject **)payload sqlError:(TestProtocolDatabaseError **)sqlError screenColor:(NSString **)screenColor alternateColors:(NSArray/*<NSString>*/ **)alternateColors printColor:(NSString **)printColor;
+- (void)didExecuteNoOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload sqlError:(TestProtocolDatabaseError *)sqlError screenColor:(NSString *)screenColor alternateColors:(NSArray/*<NSString>*/ *)alternateColors printColor:(NSString *)printColor;
+@end
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+@interface TestProtocolDatabaseDomainEventDispatcher (Private)
+- (instancetype)initWithController:(Inspector::AugmentableInspectorController*)controller;
+@end
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (DatabaseDomain)
+
++ (void)_parseDatabaseId:(NSString **)outValue fromPayload:(id)payload;
++ (void)_parsePrimaryColors:(NSString **)outValue fromPayload:(id)payload;
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (DatabaseDomain)
+
++ (void)_parseDatabaseId:(NSString **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = (NSString *)payload;
+}
+
++ (void)_parsePrimaryColors:(NSString **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = (NSString *)payload;
+}
+
++ (void)_parseColorList:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+ *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolDatabaseError alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+@implementation TestProtocolDatabaseError
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"message"], @"message");
+ self.message = payload[@"message"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"code"], @"code");
+ self.code = [payload[@"code"] integerValue];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithMessage:(NSString *)message code:(int)code
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(message, @"message");
+
+ self.message = message;
+ self.code = code;
+
+ return self;
+}
+
+- (void)setMessage:(NSString *)message
+{
+ [super setString:message forKey:@"message"];
+}
+
+- (NSString *)message
+{
+ return [super stringForKey:@"message"];
+}
+
+- (void)setCode:(int)code
+{
+ [super setInteger:code forKey:@"code"];
+}
+
+- (int)code
+{
+ return [super integerForKey:@"code"];
+}
+
+@end
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailondomainavailabilityjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailondomainavailabilityjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-availability.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-domain-availability.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-availability.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-availability.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Malformed domain specification: availability is an unsupported string. Was: "webb", Allowed values: web
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicatecommandcallparameternamesjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonduplicatecommandcallparameternamesjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-call-parameter-names.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-duplicate-command-call-parameter-names.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-call-parameter-names.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-call-parameter-names.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Malformed domain specification: call parameter list for command processPoints has duplicate parameter names
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicatecommandreturnparameternamesjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonduplicatecommandreturnparameternamesjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-return-parameter-names.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-duplicate-command-return-parameter-names.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-return-parameter-names.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-return-parameter-names.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Malformed domain specification: return parameter list for command processPoints has duplicate parameter names
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicateeventparameternamesjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonduplicateeventparameternamesjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-event-parameter-names.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-duplicate-event-parameter-names.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-event-parameter-names.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-event-parameter-names.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Malformed domain specification: parameter list for event processedPoints has duplicate parameter names
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicatetypedeclarationsjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonduplicatetypedeclarationsjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-declarations.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-duplicate-type-declarations.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-declarations.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-declarations.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Duplicate type declaration: Runtime.RemoteObjectId
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonduplicatetypemembernamesjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonduplicatetypemembernamesjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-member-names.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-duplicate-type-member-names.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-member-names.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-member-names.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Malformed domain specification: type declaration for Point has duplicate member names
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonenumwithnovaluesjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonenumwithnovaluesjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-enum-with-no-values.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-enum-with-no-values.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-enum-with-no-values.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-enum-with-no-values.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Type reference with enum values must have at least one enum value.
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonnumbertypedoptionalparameterflagjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonnumbertypedoptionalparameterflagjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-parameter-flag.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-number-typed-optional-parameter-flag.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-parameter-flag.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-parameter-flag.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: The 'optional' flag for a parameter must be a boolean literal.
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonnumbertypedoptionaltypememberjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonnumbertypedoptionaltypememberjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-type-member.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-number-typed-optional-type-member.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-type-member.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-type-member.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: The 'optional' flag for a type member must be a boolean literal.
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonstringtypedoptionalparameterflagjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonstringtypedoptionalparameterflagjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-parameter-flag.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-string-typed-optional-parameter-flag.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-parameter-flag.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-parameter-flag.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: The 'optional' flag for a parameter must be a boolean literal.
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonstringtypedoptionaltypememberjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonstringtypedoptionaltypememberjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-type-member.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-string-typed-optional-type-member.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-type-member.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-type-member.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: The 'optional' flag for a type member must be a boolean literal.
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailontypedeclarationusingtypereferencejsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailontypedeclarationusingtypereferencejsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-declaration-using-type-reference.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-type-declaration-using-type-reference.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-declaration-using-type-reference.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-declaration-using-type-reference.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Type reference cannot have both 'type' and '$ref' keys.
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailontypereferenceasprimitivetypejsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailontypereferenceasprimitivetypejsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-reference-as-primitive-type.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-type-reference-as-primitive-type.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-reference-as-primitive-type.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-reference-as-primitive-type.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Type reference 'DatabaseId' is not a primitive type. Allowed values: integer, number, string, boolean, enum, object, array, any
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailontypewithlowercasenamejsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailontypewithlowercasenamejsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-with-lowercase-name.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-type-with-lowercase-name.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-with-lowercase-name.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-with-lowercase-name.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Types must begin with an uppercase character.
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonunknowntypereferenceintypedeclarationjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonunknowntypereferenceintypedeclarationjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-declaration.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-unknown-type-reference-in-type-declaration.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-declaration.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-declaration.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Type reference 'dragon' is not a primitive type. Allowed values: integer, number, string, boolean, enum, object, array, any
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedfailonunknowntypereferenceintypememberjsonerrorfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedfailonunknowntypereferenceintypememberjsonerror"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-member.json-error (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/fail-on-unknown-type-reference-in-type-member.json-error) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-member.json-error         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-member.json-error        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+ERROR: Lookup failed for type reference: Color (referenced from domain: Fantasy)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedgeneratedomainswithfeatureguardsjsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedgeneratedomainswithfeatureguardsjsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1231 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// Network1.
+InspectorBackend.registerCommand("Network1.loadResource", [], []);
+InspectorBackend.activateDomain("Network1");
+
+// Network3.
+InspectorBackend.registerNetwork3Dispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Network3");
+InspectorBackend.registerEvent("Network3.resourceLoaded", []);
+InspectorBackend.activateDomain("Network3");
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+#if PLATFORM(WEB_COMMANDS)
+class AlternateNetwork1BackendDispatcher : public AlternateBackendDispatcher {
+public:
+ virtual ~AlternateNetwork1BackendDispatcher() { }
+ virtual void loadResource(long callId) = 0;
+};
+#endif // PLATFORM(WEB_COMMANDS)
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#if PLATFORM(WEB_COMMANDS)
+class AlternateNetwork1BackendDispatcher;
+#endif // PLATFORM(WEB_COMMANDS)
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#if PLATFORM(WEB_COMMANDS)
+class Network1BackendDispatcherHandler {
+public:
+ virtual void loadResource(ErrorString&) = 0;
+protected:
+ virtual ~Network1BackendDispatcherHandler();
+};
+#endif // PLATFORM(WEB_COMMANDS)
+
+#if PLATFORM(WEB_COMMANDS)
+class Network1BackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+ static Ref<Network1BackendDispatcher> create(BackendDispatcher&, Network1BackendDispatcherHandler*);
+ void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override;
+private:
+ void loadResource(long requestId, RefPtr<InspectorObject>&& parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+ void setAlternateDispatcher(AlternateNetwork1BackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+ AlternateNetwork1BackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+ Network1BackendDispatcher(BackendDispatcher&, Network1BackendDispatcherHandler*);
+ Network1BackendDispatcherHandler* m_agent { nullptr };
+};
+#endif // PLATFORM(WEB_COMMANDS)
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+#if PLATFORM(WEB_COMMANDS)
+Network1BackendDispatcherHandler::~Network1BackendDispatcherHandler() { }
+#endif // PLATFORM(WEB_COMMANDS)
+
+#if PLATFORM(WEB_COMMANDS)
+Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent)
+{
+ return adoptRef(*new Network1BackendDispatcher(backendDispatcher, agent));
+}
+
+Network1BackendDispatcher::Network1BackendDispatcher(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent)
+ : SupplementalBackendDispatcher(backendDispatcher)
+ , m_agent(agent)
+{
+ m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network1"), this);
+}
+
+void Network1BackendDispatcher::dispatch(long requestId, const String& method, Ref<InspectorObject>&& message)
+{
+ Ref<Network1BackendDispatcher> protect(*this);
+
+ RefPtr<InspectorObject> parameters;
+ message->getObject(ASCIILiteral("params"), parameters);
+
+ if (method == "loadResource")
+ loadResource(requestId, WTFMove(parameters));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', "Network1", '.', method, "' was not found"));
+}
+
+void Network1BackendDispatcher::loadResource(long requestId, RefPtr<InspectorObject>&&)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ if (m_alternateDispatcher) {
+ m_alternateDispatcher->loadResource(requestId);
+ return;
+ }
+#endif
+
+ ErrorString error;
+ Ref<InspectorObject> result = InspectorObject::create();
+ m_agent->loadResource(error);
+
+ if (!error.length())
+ m_backendDispatcher->sendResponse(requestId, WTFMove(result));
+ else
+ m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+#endif // PLATFORM(WEB_COMMANDS)
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+#if PLATFORM(WEB_EVENTS)
+class Network3FrontendDispatcher {
+public:
+ Network3FrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
+ void resourceLoaded();
+private:
+ FrontendRouter& m_frontendRouter;
+};
+#endif // PLATFORM(WEB_EVENTS)
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+#if PLATFORM(WEB_EVENTS)
+void Network3FrontendDispatcher::resourceLoaded()
+{
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded"));
+
+ m_frontendRouter.sendEvent(jsonMessage->toJSONString());
+}
+#endif // PLATFORM(WEB_EVENTS)
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+#if PLATFORM(WEB_TYPES)
+namespace Network2 {
+class NetworkError;
+} // Network2
+#endif // PLATFORM(WEB_TYPES)
+// End of forward declarations.
+
+
+
+
+#if PLATFORM(WEB_TYPES)
+namespace Network2 {
+class NetworkError : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ MessageSet = 1 << 0,
+ CodeSet = 1 << 1,
+ AllFieldsSet = (MessageSet | CodeSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*NetworkError*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class NetworkError;
+ public:
+
+ Builder<STATE | MessageSet>& setMessage(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set);
+ m_result->setString(ASCIILiteral("message"), value);
+ return castState<MessageSet>();
+ }
+
+ Builder<STATE | CodeSet>& setCode(int value)
+ {
+ COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
+ m_result->setInteger(ASCIILiteral("code"), value);
+ return castState<CodeSet>();
+ }
+
+ Ref<NetworkError> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(NetworkError) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<NetworkError>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<NetworkError> result = NetworkError::create()
+ * .setMessage(...)
+ * .setCode(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+} // Network2
+#endif // PLATFORM(WEB_TYPES)
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+@protocol TestProtocolNetwork1DomainHandler;
+
+namespace Inspector {
+
+
+#if PLATFORM(WEB_COMMANDS)
+class ObjCInspectorNetwork1BackendDispatcher final : public AlternateNetwork1BackendDispatcher {
+public:
+ ObjCInspectorNetwork1BackendDispatcher(id<TestProtocolNetwork1DomainHandler> handler) { m_delegate = handler; }
+ virtual void loadResource(long requestId) override;
+private:
+ RetainPtr<id<TestProtocolNetwork1DomainHandler>> m_delegate;
+};
+#endif // PLATFORM(WEB_COMMANDS)
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+ id<TestProtocolNetwork1DomainHandler> _network1Handler;
+ TestProtocolNetwork3DomainEventDispatcher *_network3EventDispatcher;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [_network1Handler release];
+ [_network3EventDispatcher release];
+ [super dealloc];
+}
+
+- (void)setNetwork1Handler:(id<TestProtocolNetwork1DomainHandler>)handler
+{
+ if (handler == _network1Handler)
+ return;
+
+ [_network1Handler release];
+ _network1Handler = [handler retain];
+
+ auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork1BackendDispatcher>(handler);
+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), *_controller, WTFMove(alternateDispatcher));
+ _controller->appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id<TestProtocolNetwork1DomainHandler>)network1Handler
+{
+ return _network1Handler;
+}
+
+- (TestProtocolNetwork3DomainEventDispatcher *)network3EventDispatcher
+{
+ if (!_network3EventDispatcher)
+ _network3EventDispatcher = [[TestProtocolNetwork3DomainEventDispatcher alloc] initWithController:_controller];
+ return _network3EventDispatcher;
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@property (nonatomic, retain, setter=setNetwork1Handler:) id<TestProtocolNetwork1DomainHandler> network1Handler;
+@property (nonatomic, readonly) TestProtocolNetwork3DomainEventDispatcher *network3EventDispatcher;
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+#if PLATFORM(WEB_COMMANDS)
+void ObjCInspectorNetwork1BackendDispatcher::loadResource(long requestId)
+{
+ id errorCallback = ^(NSString *error) {
+ backendDispatcher()->reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+ backendDispatcher()->sendPendingErrors();
+ };
+
+ id successCallback = ^{
+ backendDispatcher()->sendResponse(requestId, InspectorObject::create());
+ };
+
+ [m_delegate loadResourceWithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+#endif // PLATFORM(WEB_COMMANDS)
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+
+@implementation TestProtocolNetwork3DomainEventDispatcher
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller;
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)resourceLoaded
+{
+ const FrontendRouter& router = _controller->frontendRouter();
+
+ Ref<InspectorObject> jsonMessage = InspectorObject::create();
+ jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded"));
+ router.sendEvent(jsonMessage->toJSONString());
+}
+
+@end
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+@class TestProtocolNetwork2NetworkError;
+
+
+
+
+__attribute__((visibility ("default")))
+@interface TestProtocolNetwork2NetworkError : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithMessage:(NSString *)message code:(int)code;
+/* required */ @property (nonatomic, copy) NSString *message;
+/* required */ @property (nonatomic, assign) int code;
+@end
+
+@protocol TestProtocolNetwork1DomainHandler <NSObject>
+@required
+- (void)loadResourceWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolNetwork3DomainEventDispatcher : NSObject
+- (void)resourceLoaded;
+@end
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+@interface TestProtocolNetwork3DomainEventDispatcher (Private)
+- (instancetype)initWithController:(Inspector::AugmentableInspectorController*)controller;
+@end
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (Network1Domain)
+
+@end
+@interface TestProtocolTypeConversions (Network2Domain)
+
++ (void)_parseNetworkError:(TestProtocolNetwork2NetworkError **)outValue fromPayload:(id)payload;
+
+@end
+@interface TestProtocolTypeConversions (Network3Domain)
+
+@end
+
+@implementation TestProtocolTypeConversions (Network1Domain)
+
+@end
+@implementation TestProtocolTypeConversions (Network2Domain)
+
++ (void)_parseNetworkError:(TestProtocolNetwork2NetworkError **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolNetwork2NetworkError alloc] initWithPayload:payload];
+}
+
+@end
+@implementation TestProtocolTypeConversions (Network3Domain)
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+
+
+@implementation TestProtocolNetwork2NetworkError
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"message"], @"message");
+ self.message = payload[@"message"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"code"], @"code");
+ self.code = [payload[@"code"] integerValue];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithMessage:(NSString *)message code:(int)code
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(message, @"message");
+
+ self.message = message;
+ self.code = code;
+
+ return self;
+}
+
+- (void)setMessage:(NSString *)message
+{
+ [super setString:message forKey:@"message"];
+}
+
+- (NSString *)message
+{
+ return [super stringForKey:@"message"];
+}
+
+- (void)setCode:(int)code
+{
+ [super setInteger:code forKey:@"code"];
+}
+
+- (int)code
+{
+ return [super integerForKey:@"code"];
+}
+
+@end
+
+
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedsametypeiddifferentdomainjsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedsametypeiddifferentdomainjsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/same-type-id-different-domain.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,891 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+
+
+// Typedefs.
+namespace Runtime {
+/* Unique object identifier. */
+typedef String RemoteObjectId;
+} // Runtime
+
+namespace Runtime2 {
+/* Unique object identifier. */
+typedef String RemoteObjectId;
+} // Runtime2
+// End of typedefs.
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+
+
+namespace Inspector {
+
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+
+
+
+
+
+
+
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseRemoteObjectId:(NSString **)outValue fromPayload:(id)payload;
+
+@end
+@interface TestProtocolTypeConversions (Runtime2Domain)
+
++ (void)_parseRemoteObjectId:(NSString **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseRemoteObjectId:(NSString **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = (NSString *)payload;
+}
+
+@end
+@implementation TestProtocolTypeConversions (Runtime2Domain)
+
++ (void)_parseRemoteObjectId:(NSString **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = (NSString *)payload;
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+
+
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedshadowedoptionaltypesettersjsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedshadowedoptionaltypesettersjsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1093 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace Runtime {
+class KeyPath;
+} // Runtime
+// End of forward declarations.
+
+
+
+
+namespace TestHelpers {
+
+String getEnumConstantValue(int code);
+
+template<typename T> String getEnumConstantValue(T enumValue)
+{
+ return getEnumConstantValue(static_cast<int>(enumValue));
+}
+
+} // namespace TestHelpers
+
+namespace Runtime {
+/* Key path. */
+class KeyPath : public Inspector::InspectorObjectBase {
+public:
+ // Named after property name 'type' while generating KeyPath.
+ enum class Type {
+ Null = 0,
+ String = 1,
+ Array = 2,
+ }; // enum class Type
+ enum {
+ NoFieldsSet = 0,
+ TypeSet = 1 << 0,
+ AllFieldsSet = (TypeSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*KeyPath*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class KeyPath;
+ public:
+
+ Builder<STATE | TypeSet>& setType(Type value)
+ {
+ COMPILE_ASSERT(!(STATE & TypeSet), property_type_already_set);
+ m_result->setString(ASCIILiteral("type"), Inspector::Protocol::TestHelpers::getEnumConstantValue(value));
+ return castState<TypeSet>();
+ }
+
+ Ref<KeyPath> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(KeyPath) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<KeyPath>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<KeyPath> result = KeyPath::create()
+ * .setType(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+
+ void setString(const String& value)
+ {
+ InspectorObjectBase::setString(ASCIILiteral("string"), value);
+ }
+
+ void setArray(RefPtr<Inspector::Protocol::Array<String>> value)
+ {
+ InspectorObjectBase::setArray(ASCIILiteral("array"), WTFMove(value));
+ }
+};
+
+} // Runtime
+
+
+
+namespace TestHelpers {
+
+template<typename ProtocolEnumType>
+std::optional<ProtocolEnumType> parseEnumValueFromString(const String&);
+
+// Enums in the 'Runtime' Domain
+template<>
+std::optional<Inspector::Protocol::Runtime::KeyPath::Type> parseEnumValueFromString<Inspector::Protocol::Runtime::KeyPath::Type>(const String&);
+
+} // namespace TestHelpers
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+namespace TestHelpers {
+
+static const char* const enum_constant_values[] = {
+ "null",
+ "string",
+ "array",
+};
+
+String getEnumConstantValue(int code) {
+ return enum_constant_values[code];
+}
+
+// Enums in the 'Runtime' Domain
+template<>
+std::optional<Inspector::Protocol::Runtime::KeyPath::Type> parseEnumValueFromString<Inspector::Protocol::Runtime::KeyPath::Type>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::Runtime::KeyPath::Type::Null,
+ (size_t)Inspector::Protocol::Runtime::KeyPath::Type::String,
+ (size_t)Inspector::Protocol::Runtime::KeyPath::Type::Array,
+ };
+ for (size_t i = 0; i < 3; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::Runtime::KeyPath::Type)constantValues[i];
+
+ return std::nullopt;
+}
+
+
+} // namespace TestHelpers
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+
+
+namespace Inspector {
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+@class TestProtocolRuntimeKeyPath;
+
+
+typedef NS_ENUM(NSInteger, TestProtocolRuntimeKeyPathType) {
+ TestProtocolRuntimeKeyPathTypeNull,
+ TestProtocolRuntimeKeyPathTypeString,
+ TestProtocolRuntimeKeyPathTypeArray,
+};
+
+
+__attribute__((visibility ("default")))
+@interface TestProtocolRuntimeKeyPath : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithType:(TestProtocolRuntimeKeyPathType)type;
+/* required */ @property (nonatomic, assign) TestProtocolRuntimeKeyPathType type;
+/* optional */ @property (nonatomic, copy) NSString *string;
+/* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *array;
+@end
+
+
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+inline String toProtocolString(TestProtocolRuntimeKeyPathType value)
+{
+ switch(value) {
+ case TestProtocolRuntimeKeyPathTypeNull:
+ return ASCIILiteral("null");
+ case TestProtocolRuntimeKeyPathTypeString:
+ return ASCIILiteral("string");
+ case TestProtocolRuntimeKeyPathTypeArray:
+ return ASCIILiteral("array");
+ }
+}
+
+template<>
+inline TestProtocolRuntimeKeyPathType fromProtocolString(const String& value)
+{
+ if (value == "null")
+ return TestProtocolRuntimeKeyPathTypeNull;
+ if (value == "string")
+ return TestProtocolRuntimeKeyPathTypeString;
+ if (value == "array")
+ return TestProtocolRuntimeKeyPathTypeArray;
+ ASSERT_NOT_REACHED();
+ return TestProtocolRuntimeKeyPathTypeNull;
+}
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseKeyPath:(TestProtocolRuntimeKeyPath **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseKeyPath:(TestProtocolRuntimeKeyPath **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolRuntimeKeyPath alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+@implementation TestProtocolRuntimeKeyPath
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"type"], @"type");
+ self.type = fromProtocolString<TestProtocolRuntimeKeyPathType>(payload[@"type"]);
+
+ self.string = payload[@"string"];
+
+ self.array = objcArrayFromPayload<NSString>(payload[@"array"]);
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithType:(TestProtocolRuntimeKeyPathType)type
+{
+ if (!(self = [super init]))
+ return nil;
+
+ self.type = type;
+
+ return self;
+}
+
+- (void)setType:(TestProtocolRuntimeKeyPathType)type
+{
+ [super setString:toProtocolString(type) forKey:@"type"];
+}
+
+- (TestProtocolRuntimeKeyPathType)type
+{
+ return fromProtocolString<TestProtocolRuntimeKeyPathType>([super stringForKey:@"type"]);
+}
+
+- (void)setString:(NSString *)string
+{
+ [super setString:string forKey:@"string"];
+}
+
+- (NSString *)string
+{
+ return [super stringForKey:@"string"];
+}
+
+- (void)setArray:(NSArray/*<NSString>*/ *)array
+{
+ [super setInspectorArray:inspectorStringArray(array) forKey:@"array"];
+}
+
+- (NSArray/*<NSString>*/ *)array
+{
+ return objcStringArray([super inspectorArrayForKey:@"array"]);
+}
+
+@end
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationaliasedprimitivetypejsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtypedeclarationaliasedprimitivetypejsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,862 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+
+
+// Typedefs.
+namespace Runtime {
+/* Unique object identifier. */
+typedef int RemoteObjectId;
+} // Runtime
+// End of typedefs.
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+
+
+namespace Inspector {
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+
+
+
+
+
+
+
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseRemoteObjectId:(NSNumber **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseRemoteObjectId:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+ *outValue = (NSNumber *)payload;
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationarraytypejsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtypedeclarationarraytypejsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-array-type.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1035 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// Debugger.
+InspectorBackend.registerEnum("Debugger.Reason", {Died: "Died", Fainted: "Fainted", Hungry: "Hungry"});
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace Debugger {
+enum class Reason;
+} // Debugger
+// End of forward declarations.
+
+
+// Typedefs.
+namespace Debugger {
+typedef int BreakpointId;
+} // Debugger
+
+namespace Runtime {
+typedef int ObjectId;
+typedef Inspector::Protocol::Array<int> LuckyNumbers;
+typedef Inspector::Protocol::Array<String> BabyNames;
+typedef Inspector::Protocol::Array<Inspector::Protocol::Runtime::ObjectId> NewObjects;
+typedef Inspector::Protocol::Array<Inspector::Protocol::Debugger::BreakpointId> OldObjects;
+typedef Inspector::Protocol::Array<Inspector::Protocol::Debugger::Reason> StopReasons;
+} // Runtime
+// End of typedefs.
+
+namespace TestHelpers {
+
+String getEnumConstantValue(int code);
+
+template<typename T> String getEnumConstantValue(T enumValue)
+{
+ return getEnumConstantValue(static_cast<int>(enumValue));
+}
+
+} // namespace TestHelpers
+
+namespace Debugger {
+/* */
+enum class Reason {
+ Died = 0,
+ Fainted = 1,
+ Hungry = 2,
+}; // enum class Reason
+} // Debugger
+
+
+
+namespace TestHelpers {
+
+template<typename ProtocolEnumType>
+std::optional<ProtocolEnumType> parseEnumValueFromString(const String&);
+
+// Enums in the 'Debugger' Domain
+template<>
+std::optional<Inspector::Protocol::Debugger::Reason> parseEnumValueFromString<Inspector::Protocol::Debugger::Reason>(const String&);
+
+} // namespace TestHelpers
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+namespace TestHelpers {
+
+static const char* const enum_constant_values[] = {
+ "Died",
+ "Fainted",
+ "Hungry",
+};
+
+String getEnumConstantValue(int code) {
+ return enum_constant_values[code];
+}
+
+// Enums in the 'Debugger' Domain
+template<>
+std::optional<Inspector::Protocol::Debugger::Reason> parseEnumValueFromString<Inspector::Protocol::Debugger::Reason>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::Debugger::Reason::Died,
+ (size_t)Inspector::Protocol::Debugger::Reason::Fainted,
+ (size_t)Inspector::Protocol::Debugger::Reason::Hungry,
+ };
+ for (size_t i = 0; i < 3; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::Debugger::Reason)constantValues[i];
+
+ return std::nullopt;
+}
+
+
+} // namespace TestHelpers
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+
+
+namespace Inspector {
+
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+
+
+
+typedef NS_ENUM(NSInteger, TestProtocolDebuggerReason) {
+ TestProtocolDebuggerReasonDied,
+ TestProtocolDebuggerReasonFainted,
+ TestProtocolDebuggerReasonHungry,
+};
+
+
+
+
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+inline String toProtocolString(TestProtocolDebuggerReason value)
+{
+ switch(value) {
+ case TestProtocolDebuggerReasonDied:
+ return ASCIILiteral("Died");
+ case TestProtocolDebuggerReasonFainted:
+ return ASCIILiteral("Fainted");
+ case TestProtocolDebuggerReasonHungry:
+ return ASCIILiteral("Hungry");
+ }
+}
+
+template<>
+inline TestProtocolDebuggerReason fromProtocolString(const String& value)
+{
+ if (value == "Died")
+ return TestProtocolDebuggerReasonDied;
+ if (value == "Fainted")
+ return TestProtocolDebuggerReasonFainted;
+ if (value == "Hungry")
+ return TestProtocolDebuggerReasonHungry;
+ ASSERT_NOT_REACHED();
+ return TestProtocolDebuggerReasonDied;
+}
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (DebuggerDomain)
+
++ (void)_parseBreakpointId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseReason:(NSNumber **)outValue fromPayload:(id)payload;
+
+@end
+@interface TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseObjectId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseLuckyNumbers:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseBabyNames:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseNewObjects:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseOldObjects:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseStopReasons:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (DebuggerDomain)
+
++ (void)_parseBreakpointId:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+ *outValue = (NSNumber *)payload;
+}
+
++ (void)_parseReason:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = @(Inspector::fromProtocolString<TestProtocolDebuggerReason>(payload));
+}
+
+@end
+@implementation TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseObjectId:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+ *outValue = (NSNumber *)payload;
+}
+
++ (void)_parseLuckyNumbers:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSNumber>*/ class]);
+ *outValue = (NSArray/*<NSNumber>*/ *)payload;
+}
+
++ (void)_parseBabyNames:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+ *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
++ (void)_parseNewObjects:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSNumber>*/ class]);
+ *outValue = (NSArray/*<NSNumber>*/ *)payload;
+}
+
++ (void)_parseOldObjects:(NSArray/*<NSNumber>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSNumber>*/ class]);
+ *outValue = (NSArray/*<NSNumber>*/ *)payload;
+}
+
++ (void)_parseStopReasons:(NSArray/*<NSString>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<NSString>*/ class]);
+ *outValue = (NSArray/*<NSString>*/ *)payload;
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+
+
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationenumtypejsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtypedeclarationenumtypejsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-enum-type.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1037 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// Runtime.
+InspectorBackend.registerEnum("Runtime.FarmAnimals", {Pigs: "Pigs", Cows: "Cows", Cats: "Cats", Hens: "Hens"});
+InspectorBackend.registerEnum("Runtime.TwoLeggedAnimals", {Ducks: "Ducks", Hens: "Hens", Crows: "Crows", Flamingos: "Flamingos"});
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace Runtime {
+enum class FarmAnimals;
+enum class TwoLeggedAnimals;
+} // Runtime
+// End of forward declarations.
+
+
+
+
+namespace TestHelpers {
+
+String getEnumConstantValue(int code);
+
+template<typename T> String getEnumConstantValue(T enumValue)
+{
+ return getEnumConstantValue(static_cast<int>(enumValue));
+}
+
+} // namespace TestHelpers
+
+namespace Runtime {
+/* */
+enum class FarmAnimals {
+ Pigs = 0,
+ Cows = 1,
+ Cats = 2,
+ Hens = 3,
+}; // enum class FarmAnimals
+/* */
+enum class TwoLeggedAnimals {
+ Ducks = 4,
+ Hens = 3,
+ Crows = 5,
+ Flamingos = 6,
+}; // enum class TwoLeggedAnimals
+} // Runtime
+
+
+
+namespace TestHelpers {
+
+template<typename ProtocolEnumType>
+std::optional<ProtocolEnumType> parseEnumValueFromString(const String&);
+
+// Enums in the 'Runtime' Domain
+template<>
+std::optional<Inspector::Protocol::Runtime::FarmAnimals> parseEnumValueFromString<Inspector::Protocol::Runtime::FarmAnimals>(const String&);
+template<>
+std::optional<Inspector::Protocol::Runtime::TwoLeggedAnimals> parseEnumValueFromString<Inspector::Protocol::Runtime::TwoLeggedAnimals>(const String&);
+
+} // namespace TestHelpers
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+namespace TestHelpers {
+
+static const char* const enum_constant_values[] = {
+ "Pigs",
+ "Cows",
+ "Cats",
+ "Hens",
+ "Ducks",
+ "Crows",
+ "Flamingos",
+};
+
+String getEnumConstantValue(int code) {
+ return enum_constant_values[code];
+}
+
+// Enums in the 'Runtime' Domain
+template<>
+std::optional<Inspector::Protocol::Runtime::FarmAnimals> parseEnumValueFromString<Inspector::Protocol::Runtime::FarmAnimals>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::Runtime::FarmAnimals::Pigs,
+ (size_t)Inspector::Protocol::Runtime::FarmAnimals::Cows,
+ (size_t)Inspector::Protocol::Runtime::FarmAnimals::Cats,
+ (size_t)Inspector::Protocol::Runtime::FarmAnimals::Hens,
+ };
+ for (size_t i = 0; i < 4; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::Runtime::FarmAnimals)constantValues[i];
+
+ return std::nullopt;
+}
+
+template<>
+std::optional<Inspector::Protocol::Runtime::TwoLeggedAnimals> parseEnumValueFromString<Inspector::Protocol::Runtime::TwoLeggedAnimals>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::Runtime::TwoLeggedAnimals::Ducks,
+ (size_t)Inspector::Protocol::Runtime::TwoLeggedAnimals::Hens,
+ (size_t)Inspector::Protocol::Runtime::TwoLeggedAnimals::Crows,
+ (size_t)Inspector::Protocol::Runtime::TwoLeggedAnimals::Flamingos,
+ };
+ for (size_t i = 0; i < 4; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::Runtime::TwoLeggedAnimals)constantValues[i];
+
+ return std::nullopt;
+}
+
+
+} // namespace TestHelpers
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+
+
+namespace Inspector {
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+
+
+
+typedef NS_ENUM(NSInteger, TestProtocolRuntimeFarmAnimals) {
+ TestProtocolRuntimeFarmAnimalsPigs,
+ TestProtocolRuntimeFarmAnimalsCows,
+ TestProtocolRuntimeFarmAnimalsCats,
+ TestProtocolRuntimeFarmAnimalsHens,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolRuntimeTwoLeggedAnimals) {
+ TestProtocolRuntimeTwoLeggedAnimalsDucks,
+ TestProtocolRuntimeTwoLeggedAnimalsHens,
+ TestProtocolRuntimeTwoLeggedAnimalsCrows,
+ TestProtocolRuntimeTwoLeggedAnimalsFlamingos,
+};
+
+
+
+
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+inline String toProtocolString(TestProtocolRuntimeFarmAnimals value)
+{
+ switch(value) {
+ case TestProtocolRuntimeFarmAnimalsPigs:
+ return ASCIILiteral("Pigs");
+ case TestProtocolRuntimeFarmAnimalsCows:
+ return ASCIILiteral("Cows");
+ case TestProtocolRuntimeFarmAnimalsCats:
+ return ASCIILiteral("Cats");
+ case TestProtocolRuntimeFarmAnimalsHens:
+ return ASCIILiteral("Hens");
+ }
+}
+
+template<>
+inline TestProtocolRuntimeFarmAnimals fromProtocolString(const String& value)
+{
+ if (value == "Pigs")
+ return TestProtocolRuntimeFarmAnimalsPigs;
+ if (value == "Cows")
+ return TestProtocolRuntimeFarmAnimalsCows;
+ if (value == "Cats")
+ return TestProtocolRuntimeFarmAnimalsCats;
+ if (value == "Hens")
+ return TestProtocolRuntimeFarmAnimalsHens;
+ ASSERT_NOT_REACHED();
+ return TestProtocolRuntimeFarmAnimalsPigs;
+}
+
+inline String toProtocolString(TestProtocolRuntimeTwoLeggedAnimals value)
+{
+ switch(value) {
+ case TestProtocolRuntimeTwoLeggedAnimalsDucks:
+ return ASCIILiteral("Ducks");
+ case TestProtocolRuntimeTwoLeggedAnimalsHens:
+ return ASCIILiteral("Hens");
+ case TestProtocolRuntimeTwoLeggedAnimalsCrows:
+ return ASCIILiteral("Crows");
+ case TestProtocolRuntimeTwoLeggedAnimalsFlamingos:
+ return ASCIILiteral("Flamingos");
+ }
+}
+
+template<>
+inline TestProtocolRuntimeTwoLeggedAnimals fromProtocolString(const String& value)
+{
+ if (value == "Ducks")
+ return TestProtocolRuntimeTwoLeggedAnimalsDucks;
+ if (value == "Hens")
+ return TestProtocolRuntimeTwoLeggedAnimalsHens;
+ if (value == "Crows")
+ return TestProtocolRuntimeTwoLeggedAnimalsCrows;
+ if (value == "Flamingos")
+ return TestProtocolRuntimeTwoLeggedAnimalsFlamingos;
+ ASSERT_NOT_REACHED();
+ return TestProtocolRuntimeTwoLeggedAnimalsDucks;
+}
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseFarmAnimals:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseTwoLeggedAnimals:(NSNumber **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (RuntimeDomain)
+
++ (void)_parseFarmAnimals:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = @(Inspector::fromProtocolString<TestProtocolRuntimeFarmAnimals>(payload));
+}
+
++ (void)_parseTwoLeggedAnimals:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = @(Inspector::fromProtocolString<TestProtocolRuntimeTwoLeggedAnimals>(payload));
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationobjecttypejsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtypedeclarationobjecttypejsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1993 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace Database {
+class Error;
+class OptionalParameterBundle;
+class ParameterBundle;
+class ObjectWithPropertyNameConflicts;
+class DummyObject;
+} // Database
+
+namespace Test {
+class ParameterBundle;
+} // Test
+// End of forward declarations.
+
+
+// Typedefs.
+namespace Database {
+typedef Inspector::Protocol::Array<Inspector::Protocol::Database::Error> ErrorList;
+} // Database
+// End of typedefs.
+
+namespace Database {
+/* Database error. */
+class Error : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ MessageSet = 1 << 0,
+ CodeSet = 1 << 1,
+ AllFieldsSet = (MessageSet | CodeSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*Error*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class Error;
+ public:
+
+ Builder<STATE | MessageSet>& setMessage(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set);
+ m_result->setString(ASCIILiteral("message"), value);
+ return castState<MessageSet>();
+ }
+
+ Builder<STATE | CodeSet>& setCode(int value)
+ {
+ COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
+ m_result->setInteger(ASCIILiteral("code"), value);
+ return castState<CodeSet>();
+ }
+
+ Ref<Error> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(Error) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<Error>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<Error> result = Error::create()
+ * .setMessage(...)
+ * .setCode(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+class OptionalParameterBundle : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ AllFieldsSet = 0
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*OptionalParameterBundle*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class OptionalParameterBundle;
+ public:
+
+ Ref<OptionalParameterBundle> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(OptionalParameterBundle) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<OptionalParameterBundle>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<OptionalParameterBundle> result = OptionalParameterBundle::create()
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+
+ void setColumnNames(RefPtr<Inspector::Protocol::Array<String>> value)
+ {
+ InspectorObjectBase::setArray(ASCIILiteral("columnNames"), WTFMove(value));
+ }
+
+ void setNotes(const String& value)
+ {
+ InspectorObjectBase::setString(ASCIILiteral("notes"), value);
+ }
+
+ void setTimestamp(double value)
+ {
+ InspectorObjectBase::setDouble(ASCIILiteral("timestamp"), value);
+ }
+
+ void setValues(RefPtr<Inspector::InspectorObject> value)
+ {
+ InspectorObjectBase::setObject(ASCIILiteral("values"), WTFMove(value));
+ }
+
+ void setPayload(RefPtr<Inspector::InspectorValue> value)
+ {
+ InspectorObjectBase::setValue(ASCIILiteral("payload"), WTFMove(value));
+ }
+
+ void setError(RefPtr<Inspector::Protocol::Database::Error> value)
+ {
+ InspectorObjectBase::setObject(ASCIILiteral("error"), WTFMove(value));
+ }
+
+ void setErrorList(RefPtr<Inspector::Protocol::Database::ErrorList> value)
+ {
+ InspectorObjectBase::setArray(ASCIILiteral("errorList"), WTFMove(value));
+ }
+};
+
+class ParameterBundle : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ ColumnNamesSet = 1 << 0,
+ NotesSet = 1 << 1,
+ TimestampSet = 1 << 2,
+ ValuesSet = 1 << 3,
+ PayloadSet = 1 << 4,
+ ErrorSet = 1 << 5,
+ ErrorListSet = 1 << 6,
+ AllFieldsSet = (ColumnNamesSet | NotesSet | TimestampSet | ValuesSet | PayloadSet | ErrorSet | ErrorListSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*ParameterBundle*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class ParameterBundle;
+ public:
+
+ Builder<STATE | ColumnNamesSet>& setColumnNames(RefPtr<Inspector::Protocol::Array<String>> value)
+ {
+ COMPILE_ASSERT(!(STATE & ColumnNamesSet), property_columnNames_already_set);
+ m_result->setArray(ASCIILiteral("columnNames"), value);
+ return castState<ColumnNamesSet>();
+ }
+
+ Builder<STATE | NotesSet>& setNotes(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & NotesSet), property_notes_already_set);
+ m_result->setString(ASCIILiteral("notes"), value);
+ return castState<NotesSet>();
+ }
+
+ Builder<STATE | TimestampSet>& setTimestamp(double value)
+ {
+ COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set);
+ m_result->setDouble(ASCIILiteral("timestamp"), value);
+ return castState<TimestampSet>();
+ }
+
+ Builder<STATE | ValuesSet>& setValues(RefPtr<Inspector::InspectorObject> value)
+ {
+ COMPILE_ASSERT(!(STATE & ValuesSet), property_values_already_set);
+ m_result->setObject(ASCIILiteral("values"), value);
+ return castState<ValuesSet>();
+ }
+
+ Builder<STATE | PayloadSet>& setPayload(RefPtr<Inspector::InspectorValue> value)
+ {
+ COMPILE_ASSERT(!(STATE & PayloadSet), property_payload_already_set);
+ m_result->setValue(ASCIILiteral("payload"), value);
+ return castState<PayloadSet>();
+ }
+
+ Builder<STATE | ErrorSet>& setError(RefPtr<Inspector::Protocol::Database::Error> value)
+ {
+ COMPILE_ASSERT(!(STATE & ErrorSet), property_error_already_set);
+ m_result->setObject(ASCIILiteral("error"), value);
+ return castState<ErrorSet>();
+ }
+
+ Builder<STATE | ErrorListSet>& setErrorList(RefPtr<Inspector::Protocol::Database::ErrorList> value)
+ {
+ COMPILE_ASSERT(!(STATE & ErrorListSet), property_errorList_already_set);
+ m_result->setArray(ASCIILiteral("errorList"), value);
+ return castState<ErrorListSet>();
+ }
+
+ Ref<ParameterBundle> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(ParameterBundle) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<ParameterBundle>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<ParameterBundle> result = ParameterBundle::create()
+ * .setColumnNames(...)
+ * .setNotes(...)
+ * .setTimestamp(...)
+ * .setValues(...)
+ * .setPayload(...)
+ * .setError(...)
+ * .setErrorList(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+/* Conflicted names may cause generated getters/setters to clash with built-in InspectorObject methods. */
+class ObjectWithPropertyNameConflicts : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ IntegerSet = 1 << 0,
+ ArraySet = 1 << 1,
+ StringSet = 1 << 2,
+ ValueSet = 1 << 3,
+ ObjectSet = 1 << 4,
+ AllFieldsSet = (IntegerSet | ArraySet | StringSet | ValueSet | ObjectSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*ObjectWithPropertyNameConflicts*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class ObjectWithPropertyNameConflicts;
+ public:
+
+ Builder<STATE | IntegerSet>& setInteger(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & IntegerSet), property_integer_already_set);
+ m_result->setString(ASCIILiteral("integer"), value);
+ return castState<IntegerSet>();
+ }
+
+ Builder<STATE | ArraySet>& setArray(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & ArraySet), property_array_already_set);
+ m_result->setString(ASCIILiteral("array"), value);
+ return castState<ArraySet>();
+ }
+
+ Builder<STATE | StringSet>& setString(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & StringSet), property_string_already_set);
+ m_result->setString(ASCIILiteral("string"), value);
+ return castState<StringSet>();
+ }
+
+ Builder<STATE | ValueSet>& setValue(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & ValueSet), property_value_already_set);
+ m_result->setString(ASCIILiteral("value"), value);
+ return castState<ValueSet>();
+ }
+
+ Builder<STATE | ObjectSet>& setObject(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & ObjectSet), property_object_already_set);
+ m_result->setString(ASCIILiteral("object"), value);
+ return castState<ObjectSet>();
+ }
+
+ Ref<ObjectWithPropertyNameConflicts> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(ObjectWithPropertyNameConflicts) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<ObjectWithPropertyNameConflicts>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<ObjectWithPropertyNameConflicts> result = ObjectWithPropertyNameConflicts::create()
+ * .setInteger(...)
+ * .setArray(...)
+ * .setString(...)
+ * .setValue(...)
+ * .setObject(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+} // Database
+
+namespace Test {
+class ParameterBundle : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ ColumnNamesSet = 1 << 0,
+ NotesSet = 1 << 1,
+ TimestampSet = 1 << 2,
+ ValuesSet = 1 << 3,
+ PayloadSet = 1 << 4,
+ ErrorSet = 1 << 5,
+ AllFieldsSet = (ColumnNamesSet | NotesSet | TimestampSet | ValuesSet | PayloadSet | ErrorSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*ParameterBundle*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class ParameterBundle;
+ public:
+
+ Builder<STATE | ColumnNamesSet>& setColumnNames(RefPtr<Inspector::Protocol::Array<String>> value)
+ {
+ COMPILE_ASSERT(!(STATE & ColumnNamesSet), property_columnNames_already_set);
+ m_result->setArray(ASCIILiteral("columnNames"), value);
+ return castState<ColumnNamesSet>();
+ }
+
+ Builder<STATE | NotesSet>& setNotes(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & NotesSet), property_notes_already_set);
+ m_result->setString(ASCIILiteral("notes"), value);
+ return castState<NotesSet>();
+ }
+
+ Builder<STATE | TimestampSet>& setTimestamp(double value)
+ {
+ COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set);
+ m_result->setDouble(ASCIILiteral("timestamp"), value);
+ return castState<TimestampSet>();
+ }
+
+ Builder<STATE | ValuesSet>& setValues(RefPtr<Inspector::InspectorObject> value)
+ {
+ COMPILE_ASSERT(!(STATE & ValuesSet), property_values_already_set);
+ m_result->setObject(ASCIILiteral("values"), value);
+ return castState<ValuesSet>();
+ }
+
+ Builder<STATE | PayloadSet>& setPayload(RefPtr<Inspector::InspectorValue> value)
+ {
+ COMPILE_ASSERT(!(STATE & PayloadSet), property_payload_already_set);
+ m_result->setValue(ASCIILiteral("payload"), value);
+ return castState<PayloadSet>();
+ }
+
+ Builder<STATE | ErrorSet>& setError(RefPtr<Inspector::Protocol::Database::Error> value)
+ {
+ COMPILE_ASSERT(!(STATE & ErrorSet), property_error_already_set);
+ m_result->setObject(ASCIILiteral("error"), value);
+ return castState<ErrorSet>();
+ }
+
+ Ref<ParameterBundle> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(ParameterBundle) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<ParameterBundle>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<ParameterBundle> result = ParameterBundle::create()
+ * .setColumnNames(...)
+ * .setNotes(...)
+ * .setTimestamp(...)
+ * .setValues(...)
+ * .setPayload(...)
+ * .setError(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+} // Test
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+
+
+namespace Inspector {
+
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+@class TestProtocolDatabaseError;
+@class TestProtocolDatabaseOptionalParameterBundle;
+@class TestProtocolDatabaseParameterBundle;
+@class TestProtocolDatabaseObjectWithPropertyNameConflicts;
+@class TestProtocolDatabaseDummyObject;
+@class TestProtocolTestParameterBundle;
+
+
+
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseError : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithMessage:(NSString *)message code:(int)code;
+/* required */ @property (nonatomic, copy) NSString *message;
+/* required */ @property (nonatomic, assign) int code;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseOptionalParameterBundle : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+/* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
+/* optional */ @property (nonatomic, copy) NSString *notes;
+/* optional */ @property (nonatomic, assign) double timestamp;
+/* optional */ @property (nonatomic, retain) RWIProtocolJSONObject *values;
+/* optional */ @property (nonatomic, retain) RWIProtocolJSONObject *payload;
+/* optional */ @property (nonatomic, retain) TestProtocolDatabaseError *error;
+/* optional */ @property (nonatomic, copy) NSArray/*<TestProtocolDatabaseError>*/ *errorList;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseParameterBundle : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(TestProtocolDatabaseError *)error errorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList;
+/* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
+/* required */ @property (nonatomic, copy) NSString *notes;
+/* required */ @property (nonatomic, assign) double timestamp;
+/* required */ @property (nonatomic, retain) RWIProtocolJSONObject *values;
+/* required */ @property (nonatomic, retain) RWIProtocolJSONObject *payload;
+/* required */ @property (nonatomic, retain) TestProtocolDatabaseError *error;
+/* required */ @property (nonatomic, copy) NSArray/*<TestProtocolDatabaseError>*/ *errorList;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseObjectWithPropertyNameConflicts : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithInteger:(NSString *)integer array:(NSString *)array string:(NSString *)string value:(NSString *)value object:(NSString *)object;
+/* required */ @property (nonatomic, copy) NSString *integer;
+/* required */ @property (nonatomic, copy) NSString *array;
+/* required */ @property (nonatomic, copy) NSString *string;
+/* required */ @property (nonatomic, copy) NSString *value;
+/* required */ @property (nonatomic, copy) NSString *object;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolDatabaseDummyObject : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolTestParameterBundle : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(TestProtocolDatabaseError *)error;
+/* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
+/* required */ @property (nonatomic, copy) NSString *notes;
+/* required */ @property (nonatomic, assign) double timestamp;
+/* required */ @property (nonatomic, retain) RWIProtocolJSONObject *values;
+/* required */ @property (nonatomic, retain) RWIProtocolJSONObject *payload;
+/* required */ @property (nonatomic, retain) TestProtocolDatabaseError *error;
+@end
+
+
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (DatabaseDomain)
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload;
++ (void)_parseErrorList:(NSArray/*<TestProtocolDatabaseError>*/ **)outValue fromPayload:(id)payload;
++ (void)_parseOptionalParameterBundle:(TestProtocolDatabaseOptionalParameterBundle **)outValue fromPayload:(id)payload;
++ (void)_parseParameterBundle:(TestProtocolDatabaseParameterBundle **)outValue fromPayload:(id)payload;
++ (void)_parseObjectWithPropertyNameConflicts:(TestProtocolDatabaseObjectWithPropertyNameConflicts **)outValue fromPayload:(id)payload;
++ (void)_parseDummyObject:(TestProtocolDatabaseDummyObject **)outValue fromPayload:(id)payload;
+
+@end
+@interface TestProtocolTypeConversions (TestDomain)
+
++ (void)_parseParameterBundle:(TestProtocolTestParameterBundle **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (DatabaseDomain)
+
++ (void)_parseError:(TestProtocolDatabaseError **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolDatabaseError alloc] initWithPayload:payload];
+}
+
++ (void)_parseErrorList:(NSArray/*<TestProtocolDatabaseError>*/ **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSArray/*<TestProtocolDatabaseError>*/ class]);
+ *outValue = (NSArray/*<TestProtocolDatabaseError>*/ *)payload;
+}
+
++ (void)_parseOptionalParameterBundle:(TestProtocolDatabaseOptionalParameterBundle **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolDatabaseOptionalParameterBundle alloc] initWithPayload:payload];
+}
+
++ (void)_parseParameterBundle:(TestProtocolDatabaseParameterBundle **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolDatabaseParameterBundle alloc] initWithPayload:payload];
+}
+
++ (void)_parseObjectWithPropertyNameConflicts:(TestProtocolDatabaseObjectWithPropertyNameConflicts **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolDatabaseObjectWithPropertyNameConflicts alloc] initWithPayload:payload];
+}
+
++ (void)_parseDummyObject:(TestProtocolDatabaseDummyObject **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolDatabaseDummyObject alloc] initWithPayload:payload];
+}
+
+@end
+@implementation TestProtocolTypeConversions (TestDomain)
+
++ (void)_parseParameterBundle:(TestProtocolTestParameterBundle **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolTestParameterBundle alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+@implementation TestProtocolDatabaseError
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"message"], @"message");
+ self.message = payload[@"message"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"code"], @"code");
+ self.code = [payload[@"code"] integerValue];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithMessage:(NSString *)message code:(int)code
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(message, @"message");
+
+ self.message = message;
+ self.code = code;
+
+ return self;
+}
+
+- (void)setMessage:(NSString *)message
+{
+ [super setString:message forKey:@"message"];
+}
+
+- (NSString *)message
+{
+ return [super stringForKey:@"message"];
+}
+
+- (void)setCode:(int)code
+{
+ [super setInteger:code forKey:@"code"];
+}
+
+- (int)code
+{
+ return [super integerForKey:@"code"];
+}
+
+@end
+
+@implementation TestProtocolDatabaseOptionalParameterBundle
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ self.columnNames = objcArrayFromPayload<NSString>(payload[@"columnNames"]);
+
+ self.notes = payload[@"notes"];
+
+ self.timestamp = [payload[@"timestamp"] doubleValue];
+
+ self.values = payload[@"values"];
+
+ self.payload = payload[@"payload"];
+
+ self.error = [[TestProtocolDatabaseError alloc] initWithPayload:payload[@"error"]];
+
+ self.errorList = objcArrayFromPayload<TestProtocolDatabaseError>(payload[@"errorList"]);
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
+{
+ [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+}
+
+- (NSArray/*<NSString>*/ *)columnNames
+{
+ return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+}
+
+- (void)setNotes:(NSString *)notes
+{
+ [super setString:notes forKey:@"notes"];
+}
+
+- (NSString *)notes
+{
+ return [super stringForKey:@"notes"];
+}
+
+- (void)setTimestamp:(double)timestamp
+{
+ [super setDouble:timestamp forKey:@"timestamp"];
+}
+
+- (double)timestamp
+{
+ return [super doubleForKey:@"timestamp"];
+}
+
+- (void)setValues:(RWIProtocolJSONObject *)values
+{
+ [super setObject:values forKey:@"values"];
+}
+
+- (RWIProtocolJSONObject *)values
+{
+ return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+}
+
+- (void)setPayload:(RWIProtocolJSONObject *)payload
+{
+ [super setObject:payload forKey:@"payload"];
+}
+
+- (RWIProtocolJSONObject *)payload
+{
+ return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+}
+
+- (void)setError:(TestProtocolDatabaseError *)error
+{
+ [super setObject:error forKey:@"error"];
+}
+
+- (TestProtocolDatabaseError *)error
+{
+ return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+}
+
+- (void)setErrorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
+ [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
+}
+
+- (NSArray/*<TestProtocolDatabaseError>*/ *)errorList
+{
+ return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
+}
+
+@end
+
+@implementation TestProtocolDatabaseParameterBundle
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"columnNames"], @"columnNames");
+ self.columnNames = objcArrayFromPayload<NSString>(payload[@"columnNames"]);
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"notes"], @"notes");
+ self.notes = payload[@"notes"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"timestamp"], @"timestamp");
+ self.timestamp = [payload[@"timestamp"] doubleValue];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"values"], @"values");
+ self.values = payload[@"values"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"payload"], @"payload");
+ self.payload = payload[@"payload"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"error"], @"error");
+ self.error = [[TestProtocolDatabaseError alloc] initWithPayload:payload[@"error"]];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"errorList"], @"errorList");
+ self.errorList = objcArrayFromPayload<TestProtocolDatabaseError>(payload[@"errorList"]);
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(TestProtocolDatabaseError *)error errorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(notes, @"notes");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(values, @"values");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload, @"payload");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(error, @"error");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(errorList, @"errorList");
+ THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
+
+ self.columnNames = columnNames;
+ self.notes = notes;
+ self.timestamp = timestamp;
+ self.values = values;
+ self.payload = payload;
+ self.error = error;
+ self.errorList = errorList;
+
+ return self;
+}
+
+- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
+{
+ [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+}
+
+- (NSArray/*<NSString>*/ *)columnNames
+{
+ return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+}
+
+- (void)setNotes:(NSString *)notes
+{
+ [super setString:notes forKey:@"notes"];
+}
+
+- (NSString *)notes
+{
+ return [super stringForKey:@"notes"];
+}
+
+- (void)setTimestamp:(double)timestamp
+{
+ [super setDouble:timestamp forKey:@"timestamp"];
+}
+
+- (double)timestamp
+{
+ return [super doubleForKey:@"timestamp"];
+}
+
+- (void)setValues:(RWIProtocolJSONObject *)values
+{
+ [super setObject:values forKey:@"values"];
+}
+
+- (RWIProtocolJSONObject *)values
+{
+ return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+}
+
+- (void)setPayload:(RWIProtocolJSONObject *)payload
+{
+ [super setObject:payload forKey:@"payload"];
+}
+
+- (RWIProtocolJSONObject *)payload
+{
+ return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+}
+
+- (void)setError:(TestProtocolDatabaseError *)error
+{
+ [super setObject:error forKey:@"error"];
+}
+
+- (TestProtocolDatabaseError *)error
+{
+ return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+}
+
+- (void)setErrorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
+ [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
+}
+
+- (NSArray/*<TestProtocolDatabaseError>*/ *)errorList
+{
+ return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
+}
+
+@end
+
+@implementation TestProtocolDatabaseObjectWithPropertyNameConflicts
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"integer"], @"integer");
+ self.integer = payload[@"integer"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"array"], @"array");
+ self.array = payload[@"array"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"string"], @"string");
+ self.string = payload[@"string"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"value"], @"value");
+ self.value = payload[@"value"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"object"], @"object");
+ self.object = payload[@"object"];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithInteger:(NSString *)integer array:(NSString *)array string:(NSString *)string value:(NSString *)value object:(NSString *)object
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(integer, @"integer");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(array, @"array");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(string, @"string");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(value, @"value");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(object, @"object");
+
+ self.integer = integer;
+ self.array = array;
+ self.string = string;
+ self.value = value;
+ self.object = object;
+
+ return self;
+}
+
+- (void)setInteger:(NSString *)integer
+{
+ [super setString:integer forKey:@"integer"];
+}
+
+- (NSString *)integer
+{
+ return [super stringForKey:@"integer"];
+}
+
+- (void)setArray:(NSString *)array
+{
+ [super setString:array forKey:@"array"];
+}
+
+- (NSString *)array
+{
+ return [super stringForKey:@"array"];
+}
+
+- (void)setString:(NSString *)string
+{
+ [super setString:string forKey:@"string"];
+}
+
+- (NSString *)string
+{
+ return [super stringForKey:@"string"];
+}
+
+- (void)setValue:(NSString *)value
+{
+ [super setString:value forKey:@"value"];
+}
+
+- (NSString *)value
+{
+ return [super stringForKey:@"value"];
+}
+
+- (void)setObject:(NSString *)object
+{
+ [super setString:object forKey:@"object"];
+}
+
+- (NSString *)object
+{
+ return [super stringForKey:@"object"];
+}
+
+@end
+
+@implementation TestProtocolDatabaseDummyObject
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+@end
+
+
+@implementation TestProtocolTestParameterBundle
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"columnNames"], @"columnNames");
+ self.columnNames = objcArrayFromPayload<NSString>(payload[@"columnNames"]);
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"notes"], @"notes");
+ self.notes = payload[@"notes"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"timestamp"], @"timestamp");
+ self.timestamp = [payload[@"timestamp"] doubleValue];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"values"], @"values");
+ self.values = payload[@"values"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"payload"], @"payload");
+ self.payload = payload[@"payload"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"error"], @"error");
+ self.error = [[TestProtocolDatabaseError alloc] initWithPayload:payload[@"error"]];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(TestProtocolDatabaseError *)error
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(columnNames, @"columnNames");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(notes, @"notes");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(values, @"values");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload, @"payload");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(error, @"error");
+
+ self.columnNames = columnNames;
+ self.notes = notes;
+ self.timestamp = timestamp;
+ self.values = values;
+ self.payload = payload;
+ self.error = error;
+
+ return self;
+}
+
+- (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
+{
+ [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+}
+
+- (NSArray/*<NSString>*/ *)columnNames
+{
+ return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+}
+
+- (void)setNotes:(NSString *)notes
+{
+ [super setString:notes forKey:@"notes"];
+}
+
+- (NSString *)notes
+{
+ return [super stringForKey:@"notes"];
+}
+
+- (void)setTimestamp:(double)timestamp
+{
+ [super setDouble:timestamp forKey:@"timestamp"];
+}
+
+- (double)timestamp
+{
+ return [super doubleForKey:@"timestamp"];
+}
+
+- (void)setValues:(RWIProtocolJSONObject *)values
+{
+ [super setObject:values forKey:@"values"];
+}
+
+- (RWIProtocolJSONObject *)values
+{
+ return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+}
+
+- (void)setPayload:(RWIProtocolJSONObject *)payload
+{
+ [super setObject:payload forKey:@"payload"];
+}
+
+- (RWIProtocolJSONObject *)payload
+{
+ return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+}
+
+- (void)setError:(TestProtocolDatabaseError *)error
+{
+ [super setObject:error forKey:@"error"];
+}
+
+- (TestProtocolDatabaseError *)error
+{
+ return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+}
+
+@end
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtyperequiringruntimecastsjsonresultfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsexpectedtyperequiringruntimecastsjsonresult"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,1588 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// Test.
+InspectorBackend.registerEnum("Test.UncastedAnimals", {Pigs: "Pigs", Cows: "Cows", Cats: "Cats", Hens: "Hens"});
+InspectorBackend.registerEnum("Test.CastedAnimals", {Ducks: "Ducks", Hens: "Hens", Crows: "Crows", Flamingos: "Flamingos"});
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include "TestProtocolTypes.h"
+#include <inspector/InspectorFrontendRouter.h>
+#include <JavaScriptCore/InspectorBackendDispatcher.h>
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+ void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+ BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+ RefPtr<BackendDispatcher> m_backendDispatcher;
+};
+
+
+
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorBackendDispatcher.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestBackendDispatchers.h"
+
+#include <inspector/InspectorFrontendRouter.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include "TestAlternateBackendDispatchers.h"
+#endif
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include "TestProtocolObjects.h"
+#include <inspector/InspectorValues.h>
+#include <wtf/text/WTFString.h>
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestFrontendDispatchers.h"
+
+#include "InspectorFrontendRouter.h"
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include <inspector/InspectorProtocolTypes.h>
+#include <wtf/Assertions.h>
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+// Forward declarations.
+namespace Test {
+class TypeNeedingCast;
+class RecursiveObject1;
+class RecursiveObject2;
+enum class UncastedAnimals;
+enum class CastedAnimals;
+} // Test
+// End of forward declarations.
+
+
+// Typedefs.
+namespace Test {
+typedef int CastedObjectId;
+typedef int UncastedObjectId;
+} // Test
+// End of typedefs.
+
+namespace TestHelpers {
+
+String getEnumConstantValue(int code);
+
+template<typename T> String getEnumConstantValue(T enumValue)
+{
+ return getEnumConstantValue(static_cast<int>(enumValue));
+}
+
+} // namespace TestHelpers
+
+namespace Test {
+/* A dummy type that requires runtime casts, and forces non-primitive referenced types to also emit runtime cast helpers. */
+class TypeNeedingCast : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ StringSet = 1 << 0,
+ NumberSet = 1 << 1,
+ AnimalsSet = 1 << 2,
+ IdSet = 1 << 3,
+ TreeSet = 1 << 4,
+ AllFieldsSet = (StringSet | NumberSet | AnimalsSet | IdSet | TreeSet)
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*TypeNeedingCast*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class TypeNeedingCast;
+ public:
+
+ Builder<STATE | StringSet>& setString(const String& value)
+ {
+ COMPILE_ASSERT(!(STATE & StringSet), property_string_already_set);
+ m_result->setString(ASCIILiteral("string"), value);
+ return castState<StringSet>();
+ }
+
+ Builder<STATE | NumberSet>& setNumber(int value)
+ {
+ COMPILE_ASSERT(!(STATE & NumberSet), property_number_already_set);
+ m_result->setInteger(ASCIILiteral("number"), value);
+ return castState<NumberSet>();
+ }
+
+ Builder<STATE | AnimalsSet>& setAnimals(Inspector::Protocol::Test::CastedAnimals value)
+ {
+ COMPILE_ASSERT(!(STATE & AnimalsSet), property_animals_already_set);
+ m_result->setString(ASCIILiteral("animals"), Inspector::Protocol::TestHelpers::getEnumConstantValue(value));
+ return castState<AnimalsSet>();
+ }
+
+ Builder<STATE | IdSet>& setId(int value)
+ {
+ COMPILE_ASSERT(!(STATE & IdSet), property_id_already_set);
+ m_result->setInteger(ASCIILiteral("id"), value);
+ return castState<IdSet>();
+ }
+
+ Builder<STATE | TreeSet>& setTree(RefPtr<Inspector::Protocol::Test::RecursiveObject1> value)
+ {
+ COMPILE_ASSERT(!(STATE & TreeSet), property_tree_already_set);
+ m_result->setObject(ASCIILiteral("tree"), value);
+ return castState<TreeSet>();
+ }
+
+ Ref<TypeNeedingCast> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(TypeNeedingCast) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<TypeNeedingCast>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<TypeNeedingCast> result = TypeNeedingCast::create()
+ * .setString(...)
+ * .setNumber(...)
+ * .setAnimals(...)
+ * .setId(...)
+ * .setTree(...)
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+};
+
+/* */
+enum class UncastedAnimals {
+ Pigs = 4,
+ Cows = 5,
+ Cats = 6,
+ Hens = 1,
+}; // enum class UncastedAnimals
+/* */
+enum class CastedAnimals {
+ Ducks = 0,
+ Hens = 1,
+ Crows = 2,
+ Flamingos = 3,
+}; // enum class CastedAnimals
+class RecursiveObject1 : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ AllFieldsSet = 0
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*RecursiveObject1*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class RecursiveObject1;
+ public:
+
+ Ref<RecursiveObject1> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(RecursiveObject1) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<RecursiveObject1>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<RecursiveObject1> result = RecursiveObject1::create()
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+
+ void setObj(RefPtr<Inspector::Protocol::Test::RecursiveObject2> value)
+ {
+ InspectorObjectBase::setObject(ASCIILiteral("obj"), WTFMove(value));
+ }
+};
+
+class RecursiveObject2 : public Inspector::InspectorObjectBase {
+public:
+ enum {
+ NoFieldsSet = 0,
+ AllFieldsSet = 0
+ };
+
+ template<int STATE>
+ class Builder {
+ private:
+ RefPtr<InspectorObject> m_result;
+
+ template<int STEP> Builder<STATE | STEP>& castState()
+ {
+ return *reinterpret_cast<Builder<STATE | STEP>*>(this);
+ }
+
+ Builder(Ref</*RecursiveObject2*/InspectorObject>&& object)
+ : m_result(WTFMove(object))
+ {
+ COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
+ }
+ friend class RecursiveObject2;
+ public:
+
+ Ref<RecursiveObject2> release()
+ {
+ COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
+ COMPILE_ASSERT(sizeof(RecursiveObject2) == sizeof(InspectorObject), cannot_cast);
+
+ Ref<InspectorObject> result = m_result.releaseNonNull();
+ return WTFMove(*reinterpret_cast<Ref<RecursiveObject2>*>(&result));
+ }
+ };
+
+ /*
+ * Synthetic constructor:
+ * Ref<RecursiveObject2> result = RecursiveObject2::create()
+ * .release();
+ */
+ static Builder<NoFieldsSet> create()
+ {
+ return Builder<NoFieldsSet>(InspectorObject::create());
+ }
+
+ void setObj(RefPtr<Inspector::Protocol::Test::RecursiveObject1> value)
+ {
+ InspectorObjectBase::setObject(ASCIILiteral("obj"), WTFMove(value));
+ }
+};
+
+} // Test
+
+template<> struct BindingTraits<Inspector::Protocol::Test::CastedAnimals> {
+#if !ASSERT_DISABLED
+static void assertValueHasExpectedType(Inspector::InspectorValue*);
+#endif // !ASSERT_DISABLED
+};
+template<> struct BindingTraits<Inspector::Protocol::Test::TypeNeedingCast> {
+static RefPtr<Inspector::Protocol::Test::TypeNeedingCast> runtimeCast(RefPtr<Inspector::InspectorValue>&& value);
+#if !ASSERT_DISABLED
+static void assertValueHasExpectedType(Inspector::InspectorValue*);
+#endif // !ASSERT_DISABLED
+};
+template<> struct BindingTraits<Inspector::Protocol::Test::RecursiveObject1> {
+#if !ASSERT_DISABLED
+static void assertValueHasExpectedType(Inspector::InspectorValue*);
+#endif // !ASSERT_DISABLED
+};
+template<> struct BindingTraits<Inspector::Protocol::Test::RecursiveObject2> {
+#if !ASSERT_DISABLED
+static void assertValueHasExpectedType(Inspector::InspectorValue*);
+#endif // !ASSERT_DISABLED
+};
+
+namespace TestHelpers {
+
+template<typename ProtocolEnumType>
+std::optional<ProtocolEnumType> parseEnumValueFromString(const String&);
+
+// Enums in the 'Test' Domain
+template<>
+std::optional<Inspector::Protocol::Test::UncastedAnimals> parseEnumValueFromString<Inspector::Protocol::Test::UncastedAnimals>(const String&);
+template<>
+std::optional<Inspector::Protocol::Test::CastedAnimals> parseEnumValueFromString<Inspector::Protocol::Test::CastedAnimals>(const String&);
+
+} // namespace TestHelpers
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include "config.h"
+#include "TestProtocolObjects.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/CString.h>
+
+namespace Inspector {
+
+namespace Protocol {
+
+namespace TestHelpers {
+
+static const char* const enum_constant_values[] = {
+ "Ducks",
+ "Hens",
+ "Crows",
+ "Flamingos",
+ "Pigs",
+ "Cows",
+ "Cats",
+};
+
+String getEnumConstantValue(int code) {
+ return enum_constant_values[code];
+}
+
+// Enums in the 'Test' Domain
+template<>
+std::optional<Inspector::Protocol::Test::UncastedAnimals> parseEnumValueFromString<Inspector::Protocol::Test::UncastedAnimals>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::Test::UncastedAnimals::Pigs,
+ (size_t)Inspector::Protocol::Test::UncastedAnimals::Cows,
+ (size_t)Inspector::Protocol::Test::UncastedAnimals::Cats,
+ (size_t)Inspector::Protocol::Test::UncastedAnimals::Hens,
+ };
+ for (size_t i = 0; i < 4; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::Test::UncastedAnimals)constantValues[i];
+
+ return std::nullopt;
+}
+
+template<>
+std::optional<Inspector::Protocol::Test::CastedAnimals> parseEnumValueFromString<Inspector::Protocol::Test::CastedAnimals>(const String& protocolString)
+{
+ static const size_t constantValues[] = {
+ (size_t)Inspector::Protocol::Test::CastedAnimals::Ducks,
+ (size_t)Inspector::Protocol::Test::CastedAnimals::Hens,
+ (size_t)Inspector::Protocol::Test::CastedAnimals::Crows,
+ (size_t)Inspector::Protocol::Test::CastedAnimals::Flamingos,
+ };
+ for (size_t i = 0; i < 4; ++i)
+ if (protocolString == enum_constant_values[constantValues[i]])
+ return (Inspector::Protocol::Test::CastedAnimals)constantValues[i];
+
+ return std::nullopt;
+}
+
+
+} // namespace TestHelpers
+
+
+
+#if !ASSERT_DISABLED
+void BindingTraits<Inspector::Protocol::Test::CastedAnimals>::assertValueHasExpectedType(Inspector::InspectorValue* value)
+{
+ ASSERT_ARG(value, value);
+ String result;
+ bool castSucceeded = value->asString(result);
+ ASSERT(castSucceeded);
+ ASSERT(result == "Ducks" || result == "Hens" || result == "Crows" || result == "Flamingos");
+}
+#endif // !ASSERT_DISABLED
+
+#if !ASSERT_DISABLED
+void BindingTraits<Inspector::Protocol::Test::TypeNeedingCast>::assertValueHasExpectedType(Inspector::InspectorValue* value)
+{
+ ASSERT_ARG(value, value);
+ RefPtr<InspectorObject> object;
+ bool castSucceeded = value->asObject(object);
+ ASSERT_UNUSED(castSucceeded, castSucceeded);
+ {
+ InspectorObject::iterator stringPos = object->find(ASCIILiteral("string"));
+ ASSERT(stringPos != object->end());
+ BindingTraits<String>::assertValueHasExpectedType(stringPos->value.get());
+ }
+ {
+ InspectorObject::iterator numberPos = object->find(ASCIILiteral("number"));
+ ASSERT(numberPos != object->end());
+ BindingTraits<int>::assertValueHasExpectedType(numberPos->value.get());
+ }
+ {
+ InspectorObject::iterator animalsPos = object->find(ASCIILiteral("animals"));
+ ASSERT(animalsPos != object->end());
+ BindingTraits<Inspector::Protocol::Test::CastedAnimals>::assertValueHasExpectedType(animalsPos->value.get());
+ }
+ {
+ InspectorObject::iterator idPos = object->find(ASCIILiteral("id"));
+ ASSERT(idPos != object->end());
+ BindingTraits<int>::assertValueHasExpectedType(idPos->value.get());
+ }
+ {
+ InspectorObject::iterator treePos = object->find(ASCIILiteral("tree"));
+ ASSERT(treePos != object->end());
+ BindingTraits<Inspector::Protocol::Test::RecursiveObject1>::assertValueHasExpectedType(treePos->value.get());
+ }
+
+ int foundPropertiesCount = 5;
+ if (foundPropertiesCount != object->size())
+ FATAL("Unexpected properties in object: %s\n", object->toJSONString().ascii().data());
+}
+#endif // !ASSERT_DISABLED
+
+RefPtr<Inspector::Protocol::Test::TypeNeedingCast> BindingTraits<Inspector::Protocol::Test::TypeNeedingCast>::runtimeCast(RefPtr<InspectorValue>&& value)
+{
+ RefPtr<InspectorObject> result;
+ bool castSucceeded = value->asObject(result);
+ ASSERT_UNUSED(castSucceeded, castSucceeded);
+#if !ASSERT_DISABLED
+ BindingTraits<Inspector::Protocol::Test::TypeNeedingCast>::assertValueHasExpectedType(result.get());
+#endif // !ASSERT_DISABLED
+ COMPILE_ASSERT(sizeof(Inspector::Protocol::Test::TypeNeedingCast) == sizeof(InspectorObjectBase), type_cast_problem);
+ return static_cast<Inspector::Protocol::Test::TypeNeedingCast*>(static_cast<InspectorObjectBase*>(result.get()));
+}
+
+
+#if !ASSERT_DISABLED
+void BindingTraits<Inspector::Protocol::Test::RecursiveObject1>::assertValueHasExpectedType(Inspector::InspectorValue* value)
+{
+ ASSERT_ARG(value, value);
+ RefPtr<InspectorObject> object;
+ bool castSucceeded = value->asObject(object);
+ ASSERT_UNUSED(castSucceeded, castSucceeded);
+
+ int foundPropertiesCount = 0;
+ {
+ InspectorObject::iterator objPos = object->find(ASCIILiteral("obj"));
+ if (objPos != object->end()) {
+ BindingTraits<Inspector::Protocol::Test::RecursiveObject2>::assertValueHasExpectedType(objPos->value.get());
+ ++foundPropertiesCount;
+ }
+ }
+ if (foundPropertiesCount != object->size())
+ FATAL("Unexpected properties in object: %s\n", object->toJSONString().ascii().data());
+}
+#endif // !ASSERT_DISABLED
+
+#if !ASSERT_DISABLED
+void BindingTraits<Inspector::Protocol::Test::RecursiveObject2>::assertValueHasExpectedType(Inspector::InspectorValue* value)
+{
+ ASSERT_ARG(value, value);
+ RefPtr<InspectorObject> object;
+ bool castSucceeded = value->asObject(object);
+ ASSERT_UNUSED(castSucceeded, castSucceeded);
+
+ int foundPropertiesCount = 0;
+ {
+ InspectorObject::iterator objPos = object->find(ASCIILiteral("obj"));
+ if (objPos != object->end()) {
+ BindingTraits<Inspector::Protocol::Test::RecursiveObject1>::assertValueHasExpectedType(objPos->value.get());
+ ++foundPropertiesCount;
+ }
+ }
+ if (foundPropertiesCount != object->size())
+ FATAL("Unexpected properties in object: %s\n", object->toJSONString().ascii().data());
+}
+#endif // !ASSERT_DISABLED
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#include <wtf/RetainPtr.h>
+
+
+
+namespace Inspector {
+
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolConfiguration.h"
+
+#import "TestProtocolInternal.h"
+#import "TestProtocolBackendDispatchers.h"
+#import <JavaScriptCore/AlternateDispatchableAgent.h>
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
+#import <JavaScriptCore/InspectorBackendDispatchers.h>
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+ AugmentableInspectorController* _controller;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ ASSERT(controller);
+ _controller = controller;
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <WebInspector/TestProtocol.h>
+
+__attribute__((visibility ("default")))
+@interface TestProtocolConfiguration : NSObject
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolBackendDispatchers.h"
+
+#include "TestProtocolInternal.h"
+#include "TestProtocolTypeConversions.h"
+#include <JavaScriptCore/InspectorValues.h>
+
+namespace Inspector {
+
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <JavaScriptCore/InspectorValues.h>
+
+using namespace Inspector;
+
+
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import <Foundation/Foundation.h>
+
+#import <WebInspector/RWIProtocolJSONObject.h>
+
+
+@class TestProtocolTestTypeNeedingCast;
+@class TestProtocolTestRecursiveObject1;
+@class TestProtocolTestRecursiveObject2;
+
+
+typedef NS_ENUM(NSInteger, TestProtocolTestUncastedAnimals) {
+ TestProtocolTestUncastedAnimalsPigs,
+ TestProtocolTestUncastedAnimalsCows,
+ TestProtocolTestUncastedAnimalsCats,
+ TestProtocolTestUncastedAnimalsHens,
+};
+
+typedef NS_ENUM(NSInteger, TestProtocolTestCastedAnimals) {
+ TestProtocolTestCastedAnimalsDucks,
+ TestProtocolTestCastedAnimalsHens,
+ TestProtocolTestCastedAnimalsCrows,
+ TestProtocolTestCastedAnimalsFlamingos,
+};
+
+
+__attribute__((visibility ("default")))
+@interface TestProtocolTestTypeNeedingCast : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithString:(NSString *)string number:(int)number animals:(TestProtocolTestCastedAnimals)animals identifier:(int)identifier tree:(TestProtocolTestRecursiveObject1 *)tree;
+/* required */ @property (nonatomic, copy) NSString *string;
+/* required */ @property (nonatomic, assign) int number;
+/* required */ @property (nonatomic, assign) TestProtocolTestCastedAnimals animals;
+/* required */ @property (nonatomic, assign) int identifier;
+/* required */ @property (nonatomic, retain) TestProtocolTestRecursiveObject1 *tree;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolTestRecursiveObject1 : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+/* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject2 *obj;
+@end
+
+__attribute__((visibility ("default")))
+@interface TestProtocolTestRecursiveObject2 : RWIProtocolJSONObject
+- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+/* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject1 *obj;
+@end
+
+
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import "TestProtocolJSONObjectPrivate.h"
+#import <JavaScriptCore/AugmentableInspectorController.h>
+#import <JavaScriptCore/InspectorValues.h>
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "TestProtocol.h"
+#import <WebInspector/RWIProtocolArrayConversions.h>
+
+namespace Inspector {
+
+template<typename ObjCEnumType>
+ObjCEnumType fromProtocolString(const String& value);
+
+
+inline String toProtocolString(TestProtocolTestUncastedAnimals value)
+{
+ switch(value) {
+ case TestProtocolTestUncastedAnimalsPigs:
+ return ASCIILiteral("Pigs");
+ case TestProtocolTestUncastedAnimalsCows:
+ return ASCIILiteral("Cows");
+ case TestProtocolTestUncastedAnimalsCats:
+ return ASCIILiteral("Cats");
+ case TestProtocolTestUncastedAnimalsHens:
+ return ASCIILiteral("Hens");
+ }
+}
+
+template<>
+inline TestProtocolTestUncastedAnimals fromProtocolString(const String& value)
+{
+ if (value == "Pigs")
+ return TestProtocolTestUncastedAnimalsPigs;
+ if (value == "Cows")
+ return TestProtocolTestUncastedAnimalsCows;
+ if (value == "Cats")
+ return TestProtocolTestUncastedAnimalsCats;
+ if (value == "Hens")
+ return TestProtocolTestUncastedAnimalsHens;
+ ASSERT_NOT_REACHED();
+ return TestProtocolTestUncastedAnimalsPigs;
+}
+
+inline String toProtocolString(TestProtocolTestCastedAnimals value)
+{
+ switch(value) {
+ case TestProtocolTestCastedAnimalsDucks:
+ return ASCIILiteral("Ducks");
+ case TestProtocolTestCastedAnimalsHens:
+ return ASCIILiteral("Hens");
+ case TestProtocolTestCastedAnimalsCrows:
+ return ASCIILiteral("Crows");
+ case TestProtocolTestCastedAnimalsFlamingos:
+ return ASCIILiteral("Flamingos");
+ }
+}
+
+template<>
+inline TestProtocolTestCastedAnimals fromProtocolString(const String& value)
+{
+ if (value == "Ducks")
+ return TestProtocolTestCastedAnimalsDucks;
+ if (value == "Hens")
+ return TestProtocolTestCastedAnimalsHens;
+ if (value == "Crows")
+ return TestProtocolTestCastedAnimalsCrows;
+ if (value == "Flamingos")
+ return TestProtocolTestCastedAnimalsFlamingos;
+ ASSERT_NOT_REACHED();
+ return TestProtocolTestCastedAnimalsDucks;
+}
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolTypeConversions.h"
+
+#import "TestProtocol.h"
+#import "TestProtocolTypeParser.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+
+using namespace Inspector;
+
+@interface TestProtocolTypeConversions (TestDomain)
+
++ (void)_parseTypeNeedingCast:(TestProtocolTestTypeNeedingCast **)outValue fromPayload:(id)payload;
++ (void)_parseCastedObjectId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseUncastedObjectId:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseUncastedAnimals:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseCastedAnimals:(NSNumber **)outValue fromPayload:(id)payload;
++ (void)_parseRecursiveObject1:(TestProtocolTestRecursiveObject1 **)outValue fromPayload:(id)payload;
++ (void)_parseRecursiveObject2:(TestProtocolTestRecursiveObject2 **)outValue fromPayload:(id)payload;
+
+@end
+
+@implementation TestProtocolTypeConversions (TestDomain)
+
++ (void)_parseTypeNeedingCast:(TestProtocolTestTypeNeedingCast **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolTestTypeNeedingCast alloc] initWithPayload:payload];
+}
+
++ (void)_parseCastedObjectId:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+ *outValue = (NSNumber *)payload;
+}
+
++ (void)_parseUncastedObjectId:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSNumber class]);
+ *outValue = (NSNumber *)payload;
+}
+
++ (void)_parseUncastedAnimals:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = @(Inspector::fromProtocolString<TestProtocolTestUncastedAnimals>(payload));
+}
+
++ (void)_parseCastedAnimals:(NSNumber **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
+ *outValue = @(Inspector::fromProtocolString<TestProtocolTestCastedAnimals>(payload));
+}
+
++ (void)_parseRecursiveObject1:(TestProtocolTestRecursiveObject1 **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolTestRecursiveObject1 alloc] initWithPayload:payload];
+}
+
++ (void)_parseRecursiveObject2:(TestProtocolTestRecursiveObject2 **)outValue fromPayload:(id)payload
+{
+ THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSDictionary class]);
+ *outValue = [[TestProtocolTestRecursiveObject2 alloc] initWithPayload:payload];
+}
+
+@end
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import "config.h"
+#import "TestProtocolInternal.h"
+
+#import "TestProtocolTypeConversions.h"
+#import <WebInspector/RWIProtocolJSONObjectPrivate.h>
+#import <JavaScriptCore/InspectorValues.h>
+#import <wtf/Assertions.h>
+
+using namespace Inspector;
+
+
+@implementation TestProtocolTestTypeNeedingCast
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"string"], @"string");
+ self.string = payload[@"string"];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"number"], @"number");
+ self.number = [payload[@"number"] integerValue];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"animals"], @"animals");
+ self.animals = fromProtocolString<TestProtocolTestCastedAnimals>(payload[@"animals"]);
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"identifier"], @"identifier");
+ self.identifier = [payload[@"id"] integerValue];
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(payload[@"tree"], @"tree");
+ self.tree = [[TestProtocolTestRecursiveObject1 alloc] initWithPayload:payload[@"tree"]];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (instancetype)initWithString:(NSString *)string number:(int)number animals:(TestProtocolTestCastedAnimals)animals identifier:(int)identifier tree:(TestProtocolTestRecursiveObject1 *)tree
+{
+ if (!(self = [super init]))
+ return nil;
+
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(string, @"string");
+ THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(tree, @"tree");
+
+ self.string = string;
+ self.number = number;
+ self.animals = animals;
+ self.identifier = identifier;
+ self.tree = tree;
+
+ return self;
+}
+
+- (void)setString:(NSString *)string
+{
+ [super setString:string forKey:@"string"];
+}
+
+- (NSString *)string
+{
+ return [super stringForKey:@"string"];
+}
+
+- (void)setNumber:(int)number
+{
+ [super setInteger:number forKey:@"number"];
+}
+
+- (int)number
+{
+ return [super integerForKey:@"number"];
+}
+
+- (void)setAnimals:(TestProtocolTestCastedAnimals)animals
+{
+ [super setString:toProtocolString(animals) forKey:@"animals"];
+}
+
+- (TestProtocolTestCastedAnimals)animals
+{
+ return fromProtocolString<TestProtocolTestCastedAnimals>([super stringForKey:@"animals"]);
+}
+
+- (void)setIdentifier:(int)identifier
+{
+ [super setInteger:identifier forKey:@"id"];
+}
+
+- (int)identifier
+{
+ return [super integerForKey:@"id"];
+}
+
+- (void)setTree:(TestProtocolTestRecursiveObject1 *)tree
+{
+ [super setObject:tree forKey:@"tree"];
+}
+
+- (TestProtocolTestRecursiveObject1 *)tree
+{
+ return [[TestProtocolTestRecursiveObject1 alloc] initWithInspectorObject:[[super objectForKey:@"tree"] toInspectorObject].get()];
+}
+
+@end
+
+@implementation TestProtocolTestRecursiveObject1
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ self.obj = [[TestProtocolTestRecursiveObject2 alloc] initWithPayload:payload[@"obj"]];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (void)setObj:(TestProtocolTestRecursiveObject2 *)obj
+{
+ [super setObject:obj forKey:@"obj"];
+}
+
+- (TestProtocolTestRecursiveObject2 *)obj
+{
+ return [[TestProtocolTestRecursiveObject2 alloc] initWithInspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];
+}
+
+@end
+
+@implementation TestProtocolTestRecursiveObject2
+
+- (instancetype)initWithPayload:(nonnull NSDictionary<NSString *, id> *)payload
+{
+ if (!(self = [super init]))
+ return nil;
+
+ self.obj = [[TestProtocolTestRecursiveObject1 alloc] initWithPayload:payload[@"obj"]];
+
+ return self;
+}
+- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+{
+ if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+ return nil;
+
+ return self;
+}
+
+- (void)setObj:(TestProtocolTestRecursiveObject1 *)obj
+{
+ [super setObject:obj forKey:@"obj"];
+}
+
+- (TestProtocolTestRecursiveObject1 *)obj
+{
+ return [[TestProtocolTestRecursiveObject1 alloc] initWithInspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];
+}
+
+@end
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailondomainavailabilityjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailondomainavailabilityjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-availability.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-domain-availability.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-availability.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-availability.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+{
+ "domain": "WebOnly",
+ "availability": "webb",
+ "commands": [
+ {
+ "name": "enable"
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicatecommandcallparameternamesjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatecommandcallparameternamesjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-call-parameter-names.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-call-parameter-names.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-call-parameter-names.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-call-parameter-names.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+{
+ "domain": "Overlay",
+ "commands": [
+ {
+ "name": "processPoints",
+ "parameters": [
+ { "name": "point", "type": "number" },
+ { "name": "point", "type": "number" }
+ ],
+ "returns": [
+ { "name": "result1", "type": "string" },
+ { "name": "result2", "type": "string" }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicatecommandreturnparameternamesjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatecommandreturnparameternamesjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-return-parameter-names.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-command-return-parameter-names.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-return-parameter-names.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-return-parameter-names.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+{
+ "domain": "Overlay",
+ "commands": [
+ {
+ "name": "processPoints",
+ "parameters": [
+ { "name": "point1", "type": "number" },
+ { "name": "point2", "type": "number" }
+ ],
+ "returns": [
+ { "name": "result", "type": "string" },
+ { "name": "result", "type": "string" }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicateeventparameternamesjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicateeventparameternamesjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-event-parameter-names.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-event-parameter-names.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-event-parameter-names.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-event-parameter-names.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+{
+ "domain": "Overlay",
+ "events": [
+ {
+ "name": "processedPoints",
+ "parameters": [
+ { "name": "point", "type": "number" },
+ { "name": "point", "type": "number" }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicatetypedeclarationsjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatetypedeclarationsjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-declarations.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-declarations.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-declarations.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-declarations.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+{
+ "domain": "Runtime",
+ "types": [
+ {
+ "id": "RemoteObjectId",
+ "type": "string",
+ "description": "Unique object identifier."
+ },
+ {
+ "id": "RemoteObjectId",
+ "type": "string",
+ "description": "Unique object identifier."
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonduplicatetypemembernamesjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonduplicatetypemembernamesjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-member-names.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-duplicate-type-member-names.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-member-names.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-member-names.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+[
+{
+ "domain": "OverlayTypes",
+ "types": [
+ {
+ "id": "Point",
+ "type": "object",
+ "properties": [
+ { "name": "x", "type": "integer" },
+ { "name": "x", "type": "integer" }
+ ]
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonenumwithnovaluesjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonenumwithnovaluesjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-enum-with-no-values.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-enum-with-no-values.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-enum-with-no-values.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-enum-with-no-values.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "PrimaryColors",
+ "type": "string",
+ "enum": []
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonnumbertypedoptionalparameterflagjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonnumbertypedoptionalparameterflagjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-parameter-flag.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-parameter-flag.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-parameter-flag.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-parameter-flag.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "DatabaseId",
+ "type": "string",
+ "description": "Unique identifier of Database object."
+ }
+ ],
+ "events": [
+ {
+ "name": "didExecuteOptionalParameters",
+ "parameters": [
+ { "name": "columnNames", "type": "string", "optional": 0 }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonnumbertypedoptionaltypememberjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonnumbertypedoptionaltypememberjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-type-member.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-number-typed-optional-type-member.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-type-member.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-type-member.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+[
+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "Error",
+ "type": "object",
+ "description": "Database error.",
+ "properties": [
+ { "name": "message", "type": "string", "description": "Error message." },
+ { "name": "code", "type": "integer", "description": "Error code.", "optional": 0 }
+ ]
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonstringtypedoptionalparameterflagjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonstringtypedoptionalparameterflagjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-parameter-flag.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-parameter-flag.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-parameter-flag.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-parameter-flag.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "DatabaseId",
+ "type": "string",
+ "description": "Unique identifier of Database object."
+ }
+ ],
+ "events": [
+ {
+ "name": "didExecuteOptionalParameters",
+ "parameters": [
+ { "name": "columnNames", "type": "string", "optional": "true" }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonstringtypedoptionaltypememberjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonstringtypedoptionaltypememberjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-type-member.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-string-typed-optional-type-member.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-type-member.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-type-member.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+[
+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "Error",
+ "type": "object",
+ "description": "Database error.",
+ "properties": [
+ { "name": "message", "type": "string", "description": "Error message." },
+ { "name": "code", "type": "integer", "description": "Error code.", "optional": "false" }
+ ]
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailontypedeclarationusingtypereferencejsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailontypedeclarationusingtypereferencejson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-declaration-using-type-reference.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-declaration-using-type-reference.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-declaration-using-type-reference.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-declaration-using-type-reference.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+[
+{
+ "domain": "Runtime",
+ "types": [
+ {
+ "id": "RemoteObjectId",
+ "type": "object",
+ "$ref": "SomeType",
+ "description": "Unique object identifier."
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailontypereferenceasprimitivetypejsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailontypereferenceasprimitivetypejson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-reference-as-primitive-type.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-reference-as-primitive-type.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-reference-as-primitive-type.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-reference-as-primitive-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "DatabaseId",
+ "type": "string",
+ "description": "Unique identifier of Database object."
+ }
+ ],
+ "events": [
+ {
+ "name": "didExecuteOptionalParameters",
+ "parameters": [
+ { "name": "columnNames", "type": "DatabaseId" }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailontypewithlowercasenamejsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailontypewithlowercasenamejson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-with-lowercase-name.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-type-with-lowercase-name.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-with-lowercase-name.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-with-lowercase-name.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+{
+ "domain": "Database",
+ "types": [
+ {
+ "id": "databaseId",
+ "type": "integer",
+ "description": "Unique identifier of Database object."
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonunknowntypereferenceintypedeclarationjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonunknowntypereferenceintypedeclarationjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-declaration.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-declaration.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-declaration.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-declaration.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+[
+{
+ "domain": "Runtime",
+ "types": [
+ {
+ "id": "RemoteObjectId",
+ "type": "dragon",
+ "description": "Unique object identifier."
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericfailonunknowntypereferenceintypememberjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsfailonunknowntypereferenceintypememberjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-member.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/fail-on-unknown-type-reference-in-type-member.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-member.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-member.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+[
+{
+ "domain": "Fantasy",
+ "types": [
+ {
+ "id": "DragonEgg",
+ "type": "object",
+ "description": "A dragon egg.",
+ "properties": [
+ { "name": "color", "$ref": "Color" }
+ ]
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericgeneratedomainswithfeatureguardsjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsgeneratedomainswithfeatureguardsjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/generate-domains-with-feature-guards.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/generate-domains-with-feature-guards.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/generate-domains-with-feature-guards.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/generate-domains-with-feature-guards.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+[
+{
+ "domain": "Network1",
+ "featureGuard": "PLATFORM(WEB_COMMANDS)",
+ "commands": [
+ {
+ "name": "loadResource",
+ "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
+ }
+ ]
+},
+{
+ "domain": "Network2",
+ "featureGuard": "PLATFORM(WEB_TYPES)",
+ "types": [
+ {
+ "id": "NetworkError",
+ "type": "object",
+ "properties": [
+ { "name": "message", "type": "string", "description": "Error message." },
+ { "name": "code", "type": "integer", "description": "Error code." }
+ ]
+ }
+ ]
+},
+{
+ "domain": "Network3",
+ "featureGuard": "PLATFORM(WEB_EVENTS)",
+ "events": [
+ {
+ "name": "resourceLoaded",
+ "description": "A resource was loaded."
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericsametypeiddifferentdomainjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestssametypeiddifferentdomainjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/same-type-id-different-domain.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/same-type-id-different-domain.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/same-type-id-different-domain.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/same-type-id-different-domain.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+[
+{
+ "domain": "Runtime",
+ "types": [
+ {
+ "id": "RemoteObjectId",
+ "type": "string",
+ "description": "Unique object identifier."
+ }
+ ]
+},
+{
+ "domain": "Runtime2",
+ "types": [
+ {
+ "id": "RemoteObjectId",
+ "type": "string",
+ "description": "Unique object identifier."
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericshadowedoptionaltypesettersjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptstestsshadowedoptionaltypesettersjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/shadowed-optional-type-setters.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/shadowed-optional-type-setters.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/shadowed-optional-type-setters.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/shadowed-optional-type-setters.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+{
+ "domain": "Runtime",
+ "types": [
+ {
+ "id": "KeyPath",
+ "type": "object",
+ "description": "Key path.",
+ "properties": [
+ {
+ "name": "type",
+ "type": "string",
+ "enum": ["null", "string", "array"],
+ "description": "Key path type."
+ },
+ {
+ "name": "string",
+ "type": "string",
+ "optional": true,
+ "description": "String value."
+ },
+ {
+ "name": "array",
+ "type": "array",
+ "optional": true,
+ "items": { "type": "string" },
+ "description": "Array value."
+ }
+ ]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenerictypedeclarationaliasedprimitivetypejsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationaliasedprimitivetypejson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-aliased-primitive-type.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-aliased-primitive-type.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-aliased-primitive-type.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-aliased-primitive-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+{
+ "domain": "Runtime",
+ "types": [
+ {
+ "id": "RemoteObjectId",
+ "type": "integer",
+ "description": "Unique object identifier."
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenerictypedeclarationarraytypejsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationarraytypejson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-array-type.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-array-type.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-array-type.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-array-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+[
+{
+ "domain": "Debugger",
+ "types": [
+ {
+ "id": "BreakpointId",
+ "type": "integer"
+ },
+ {
+ "id": "Reason",
+ "type": "string",
+ "enum": ["Died", "Fainted", "Hungry"]
+ }
+ ]
+},
+{
+ "domain": "Runtime",
+ "types": [
+ {
+ "id": "ObjectId",
+ "type": "integer"
+ },
+ {
+ "id": "LuckyNumbers",
+ "type": "array",
+ "items": { "type": "integer" }
+ },
+ {
+ "id": "BabyNames",
+ "type": "array",
+ "items": { "type": "string" }
+ },
+ {
+ "id": "NewObjects",
+ "type": "array",
+ "items": { "$ref": "ObjectId" }
+ },
+ {
+ "id": "OldObjects",
+ "type": "array",
+ "items": { "$ref": "Debugger.BreakpointId" }
+ },
+ {
+ "id": "StopReasons",
+ "type": "array",
+ "items": { "$ref": "Debugger.Reason" }
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenerictypedeclarationenumtypejsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationenumtypejson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-enum-type.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-enum-type.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-enum-type.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-enum-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+{
+ "domain": "Runtime",
+ "types": [
+ {
+ "id": "FarmAnimals",
+ "type": "string",
+ "enum": ["Pigs", "Cows", "Cats", "Hens"]
+ },
+ {
+ "id": "TwoLeggedAnimals",
+ "type": "string",
+ "enum": ["Ducks", "Hens", "Crows", "Flamingos"]
+ }
+ ]
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenerictypedeclarationobjecttypejsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationobjecttypejson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-object-type.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-object-type.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-object-type.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-object-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,83 @@
</span><ins>+[
+{
+ "domain": "Database",
+ "description": "Test type builder generation of various object types.",
+ "types": [
+ {
+ "id": "Error",
+ "type": "object",
+ "description": "Database error.",
+ "properties": [
+ { "name": "message", "type": "string", "description": "Error message." },
+ { "name": "code", "type": "integer", "description": "Error code." }
+ ]
+ },
+ {
+ "id": "ErrorList",
+ "type": "array",
+ "items": { "$ref": "Error" }
+ },
+ {
+ "id": "OptionalParameterBundle",
+ "type": "object",
+ "properties": [
+ { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
+ { "name": "notes", "type": "string", "optional": true },
+ { "name": "timestamp", "type": "number", "optional": true },
+ { "name": "values", "type": "object", "optional": true },
+ { "name": "payload", "type": "any", "optional": true },
+ { "name": "error", "$ref": "Error", "optional": true },
+ { "name": "errorList", "$ref": "ErrorList", "optional": true }
+ ]
+ },
+ {
+ "id": "ParameterBundle",
+ "type": "object",
+ "properties": [
+ { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+ { "name": "notes", "type": "string" },
+ { "name": "timestamp", "type": "number" },
+ { "name": "values", "type": "object" },
+ { "name": "payload", "type": "any" },
+ { "name": "error", "$ref": "Error" },
+ { "name": "errorList", "$ref": "ErrorList" }
+ ]
+ },
+ {
+ "id": "ObjectWithPropertyNameConflicts",
+ "description": "Conflicted names may cause generated getters/setters to clash with built-in InspectorObject methods.",
+ "type": "object",
+ "properties": [
+ { "name": "integer", "type": "string" },
+ { "name": "array", "type": "string" },
+ { "name": "string", "type": "string" },
+ { "name": "value", "type": "string" },
+ { "name": "object", "type": "string" }
+ ]
+ },
+ {
+ "id": "DummyObject",
+ "description": "An open object that doesn't have any predefined fields.",
+ "type": "object"
+ }
+ ]
+},
+{
+ "domain": "Test",
+ "description": "Test the generation of special behaviors that only apply to specific classes.",
+ "types": [
+ {
+ "id": "ParameterBundle",
+ "type": "object",
+ "properties": [
+ { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+ { "name": "notes", "type": "string" },
+ { "name": "timestamp", "type": "number" },
+ { "name": "values", "type": "object" },
+ { "name": "payload", "type": "any" },
+ { "name": "error", "$ref": "Database.Error" }
+ ]
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenerictyperequiringruntimecastsjsonfromrev210307trunkSourceJavaScriptCoreinspectorscriptsteststyperequiringruntimecastsjson"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-requiring-runtime-casts.json (from rev 210307, trunk/Source/JavaScriptCore/inspector/scripts/tests/type-requiring-runtime-casts.json) (0 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-requiring-runtime-casts.json         (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/type-requiring-runtime-casts.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+[
+{
+ "domain": "Test",
+ "types": [
+ {
+ "id": "TypeNeedingCast",
+ "type": "object",
+ "description": "A dummy type that requires runtime casts, and forces non-primitive referenced types to also emit runtime cast helpers.",
+ "properties": [
+ { "name": "string", "type": "string", "description": "String member." },
+ { "name": "number", "type": "integer", "description": "Number member." },
+ { "name": "animals", "$ref": "CastedAnimals", "description": "Enum member." },
+ { "name": "id", "$ref": "CastedObjectId", "description": "Aliased member." },
+ { "name": "tree", "$ref": "RecursiveObject1", "description": "Recursive object member." }
+ ]
+ },
+ {
+ "id": "CastedObjectId",
+ "type": "integer"
+ },
+ {
+ "id": "UncastedObjectId",
+ "type": "integer"
+ },
+ {
+ "id": "UncastedAnimals",
+ "type": "string",
+ "enum": ["Pigs", "Cows", "Cats", "Hens"]
+ },
+ {
+ "id": "CastedAnimals",
+ "type": "string",
+ "enum": ["Ducks", "Hens", "Crows", "Flamingos"]
+ },
+ {
+ "id": "RecursiveObject1",
+ "type": "object",
+ "properties": [
+ { "name": "obj", "$ref": "RecursiveObject2", "optional": true }
+ ]
+ },
+ {
+ "id": "RecursiveObject2",
+ "type": "object",
+ "properties": [
+ { "name": "obj", "$ref": "RecursiveObject1", "optional": true }
+ ]
+ }
+ ]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestssametypeiddifferentdomainjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/same-type-id-different-domain.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/same-type-id-different-domain.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/same-type-id-different-domain.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,22 +0,0 @@
</span><del>-[
-{
- "domain": "Runtime",
- "types": [
- {
- "id": "RemoteObjectId",
- "type": "string",
- "description": "Unique object identifier."
- }
- ]
-},
-{
- "domain": "Runtime2",
- "types": [
- {
- "id": "RemoteObjectId",
- "type": "string",
- "description": "Unique object identifier."
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsshadowedoptionaltypesettersjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/shadowed-optional-type-setters.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/shadowed-optional-type-setters.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/shadowed-optional-type-setters.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,31 +0,0 @@
</span><del>-{
- "domain": "Runtime",
- "types": [
- {
- "id": "KeyPath",
- "type": "object",
- "description": "Key path.",
- "properties": [
- {
- "name": "type",
- "type": "string",
- "enum": ["null", "string", "array"],
- "description": "Key path type."
- },
- {
- "name": "string",
- "type": "string",
- "optional": true,
- "description": "String value."
- },
- {
- "name": "array",
- "type": "array",
- "optional": true,
- "items": { "type": "string" },
- "description": "Array value."
- }
- ]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationaliasedprimitivetypejson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-aliased-primitive-type.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-aliased-primitive-type.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-aliased-primitive-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-{
- "domain": "Runtime",
- "types": [
- {
- "id": "RemoteObjectId",
- "type": "integer",
- "description": "Unique object identifier."
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationarraytypejson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-array-type.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-array-type.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-array-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,50 +0,0 @@
</span><del>-[
-{
- "domain": "Debugger",
- "types": [
- {
- "id": "BreakpointId",
- "type": "integer"
- },
- {
- "id": "Reason",
- "type": "string",
- "enum": ["Died", "Fainted", "Hungry"]
- }
- ]
-},
-{
- "domain": "Runtime",
- "types": [
- {
- "id": "ObjectId",
- "type": "integer"
- },
- {
- "id": "LuckyNumbers",
- "type": "array",
- "items": { "type": "integer" }
- },
- {
- "id": "BabyNames",
- "type": "array",
- "items": { "type": "string" }
- },
- {
- "id": "NewObjects",
- "type": "array",
- "items": { "$ref": "ObjectId" }
- },
- {
- "id": "OldObjects",
- "type": "array",
- "items": { "$ref": "Debugger.BreakpointId" }
- },
- {
- "id": "StopReasons",
- "type": "array",
- "items": { "$ref": "Debugger.Reason" }
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationenumtypejson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-enum-type.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-enum-type.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-enum-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-{
- "domain": "Runtime",
- "types": [
- {
- "id": "FarmAnimals",
- "type": "string",
- "enum": ["Pigs", "Cows", "Cats", "Hens"]
- },
- {
- "id": "TwoLeggedAnimals",
- "type": "string",
- "enum": ["Ducks", "Hens", "Crows", "Flamingos"]
- }
- ]
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptsteststypedeclarationobjecttypejson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-object-type.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-object-type.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/type-declaration-object-type.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,83 +0,0 @@
</span><del>-[
-{
- "domain": "Database",
- "description": "Test type builder generation of various object types.",
- "types": [
- {
- "id": "Error",
- "type": "object",
- "description": "Database error.",
- "properties": [
- { "name": "message", "type": "string", "description": "Error message." },
- { "name": "code", "type": "integer", "description": "Error code." }
- ]
- },
- {
- "id": "ErrorList",
- "type": "array",
- "items": { "$ref": "Error" }
- },
- {
- "id": "OptionalParameterBundle",
- "type": "object",
- "properties": [
- { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
- { "name": "notes", "type": "string", "optional": true },
- { "name": "timestamp", "type": "number", "optional": true },
- { "name": "values", "type": "object", "optional": true },
- { "name": "payload", "type": "any", "optional": true },
- { "name": "error", "$ref": "Error", "optional": true },
- { "name": "errorList", "$ref": "ErrorList", "optional": true }
- ]
- },
- {
- "id": "ParameterBundle",
- "type": "object",
- "properties": [
- { "name": "columnNames", "type": "array", "items": { "type": "string" } },
- { "name": "notes", "type": "string" },
- { "name": "timestamp", "type": "number" },
- { "name": "values", "type": "object" },
- { "name": "payload", "type": "any" },
- { "name": "error", "$ref": "Error" },
- { "name": "errorList", "$ref": "ErrorList" }
- ]
- },
- {
- "id": "ObjectWithPropertyNameConflicts",
- "description": "Conflicted names may cause generated getters/setters to clash with built-in InspectorObject methods.",
- "type": "object",
- "properties": [
- { "name": "integer", "type": "string" },
- { "name": "array", "type": "string" },
- { "name": "string", "type": "string" },
- { "name": "value", "type": "string" },
- { "name": "object", "type": "string" }
- ]
- },
- {
- "id": "DummyObject",
- "description": "An open object that doesn't have any predefined fields.",
- "type": "object"
- }
- ]
-},
-{
- "domain": "Test",
- "description": "Test the generation of special behaviors that only apply to specific classes.",
- "types": [
- {
- "id": "ParameterBundle",
- "type": "object",
- "properties": [
- { "name": "columnNames", "type": "array", "items": { "type": "string" } },
- { "name": "notes", "type": "string" },
- { "name": "timestamp", "type": "number" },
- { "name": "values", "type": "object" },
- { "name": "payload", "type": "any" },
- { "name": "error", "$ref": "Database.Error" }
- ]
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptsteststyperequiringruntimecastsjson"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/scripts/tests/type-requiring-runtime-casts.json (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/type-requiring-runtime-casts.json        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/type-requiring-runtime-casts.json        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-[
-{
- "domain": "Test",
- "types": [
- {
- "id": "TypeNeedingCast",
- "type": "object",
- "description": "A dummy type that requires runtime casts, and forces non-primitive referenced types to also emit runtime cast helpers.",
- "properties": [
- { "name": "string", "type": "string", "description": "String member." },
- { "name": "number", "type": "integer", "description": "Number member." },
- { "name": "animals", "$ref": "CastedAnimals", "description": "Enum member." },
- { "name": "id", "$ref": "CastedObjectId", "description": "Aliased member." },
- { "name": "tree", "$ref": "RecursiveObject1", "description": "Recursive object member." }
- ]
- },
- {
- "id": "CastedObjectId",
- "type": "integer"
- },
- {
- "id": "UncastedObjectId",
- "type": "integer"
- },
- {
- "id": "UncastedAnimals",
- "type": "string",
- "enum": ["Pigs", "Cows", "Cats", "Hens"]
- },
- {
- "id": "CastedAnimals",
- "type": "string",
- "enum": ["Ducks", "Hens", "Crows", "Flamingos"]
- },
- {
- "id": "RecursiveObject1",
- "type": "object",
- "properties": [
- { "name": "obj", "$ref": "RecursiveObject2", "optional": true }
- ]
- },
- {
- "id": "RecursiveObject2",
- "type": "object",
- "properties": [
- { "name": "obj", "$ref": "RecursiveObject1", "optional": true }
- ]
- }
- ]
-}
-]
</del></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Tools/ChangeLog        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2017-01-03 Brian Burg <bburg@apple.com>
+
+ Web Inspector: teach the protocol generator about platform-specific types, events, and commands
+ https://bugs.webkit.org/show_bug.cgi?id=166003
+ <rdar://problem/28718990>
+
+ Reviewed by Joseph Pecoraro.
+
+ Teach run-inspector-generator-tests to generate test output using the platform name
+ derived from the directory that the test is in. For example, tests in the /generic/
+ subdirectory will pass `--platform generic` to generate-inspector-protocol-bindings.py.
+
+ * Scripts/webkitpy/inspector/main.py:
+ (InspectorGeneratorTests.generate_from_json):
+ (InspectorGeneratorTests.run_tests):
+ (InspectorGeneratorTests.main):
+
</ins><span class="cx"> 2017-01-04 Csaba Osztrogonác <ossy@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed cmake buildfix after r210266.
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyinspectormainpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/inspector/main.py (210307 => 210308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/inspector/main.py        2017-01-05 01:16:30 UTC (rev 210307)
+++ trunk/Tools/Scripts/webkitpy/inspector/main.py        2017-01-05 01:17:07 UTC (rev 210308)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> self.reset_results = reset_results
</span><span class="cx"> self.executive = executive
</span><span class="cx">
</span><del>- def generate_from_json(self, json_file, output_directory):
</del><ins>+ def generate_from_json(self, json_file, platform, output_directory):
</ins><span class="cx"> cmd = ['python',
</span><span class="cx"> 'JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py',
</span><span class="cx"> '--outputDir', output_directory,
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> '--force',
</span><span class="cx"> '--framework', 'Test',
</span><span class="cx"> '--test',
</span><ins>+ '--platform', platform,
</ins><span class="cx"> json_file]
</span><span class="cx">
</span><span class="cx"> exit_code = 0
</span><span class="lines">@@ -87,7 +88,7 @@
</span><span class="cx"> print 'PASS: %s' % output_file
</span><span class="cx"> return changes_found
</span><span class="cx">
</span><del>- def run_tests(self, input_directory, reference_directory):
</del><ins>+ def run_tests(self, platform, input_directory, reference_directory):
</ins><span class="cx"> work_directory = reference_directory
</span><span class="cx">
</span><span class="cx"> passed = True
</span><span class="lines">@@ -100,7 +101,7 @@
</span><span class="cx"> if not self.reset_results:
</span><span class="cx"> work_directory = tempfile.mkdtemp()
</span><span class="cx">
</span><del>- if self.generate_from_json(os.path.join(input_directory, input_file), work_directory):
</del><ins>+ if self.generate_from_json(os.path.join(input_directory, input_file), platform, work_directory):
</ins><span class="cx"> passed = False
</span><span class="cx">
</span><span class="cx"> if self.reset_results:
</span><span class="lines">@@ -120,11 +121,23 @@
</span><span class="cx">
</span><span class="cx"> all_tests_passed = True
</span><span class="cx">
</span><del>- input_directory = os.path.join('JavaScriptCore', 'inspector', 'scripts', 'tests')
- reference_directory = os.path.join('JavaScriptCore', 'inspector', 'scripts', 'tests', 'expected')
- if not self.run_tests(input_directory, reference_directory):
- all_tests_passed = False
</del><ins>+ base_directory = os.path.join('JavaScriptCore', 'inspector', 'scripts', 'tests')
</ins><span class="cx">
</span><ins>+ platform_directories = {
+ 'macos': 'mac',
+ 'ios': 'ios',
+ 'generic': 'generic',
+ 'all': 'all',
+ }
+
+ for platform_name, platform_directory in platform_directories.iteritems():
+ input_directory = os.path.join(base_directory, platform_directory)
+ reference_directory = os.path.join(input_directory, 'expected')
+ if not os.path.isdir(input_directory) or not os.path.isdir(reference_directory):
+ continue
+
+ all_tests_passed = all_tests_passed and self.run_tests(platform_name, input_directory, reference_directory)
+
</ins><span class="cx"> print ''
</span><span class="cx"> if all_tests_passed:
</span><span class="cx"> print 'All tests PASS!'
</span></span></pre>
</div>
</div>
</body>
</html>