@@ -56,6 +56,8 @@ interface IChromeUrlTestCase {
56
56
describe ( "iOSDebugService" , ( ) => {
57
57
describe ( "getChromeDebugUrl" , ( ) => {
58
58
const expectedPort = 12345 ;
59
+ const customDevToolsCommit = "customDevToolsCommit" ;
60
+
59
61
const chromUrlTestCases : IChromeUrlTestCase [ ] = [
60
62
// Default CLI behavior:
61
63
{
@@ -128,6 +130,44 @@ describe("iOSDebugService", () => {
128
130
useHttpUrl : true
129
131
} ,
130
132
expectedChromeUrl : `https://chrome-devtools-frontend.appspot.com/serve_file/@02e6bde1bbe34e43b309d4ef774b1168d25fd024/inspector.html?experiments=true&ws=localhost:${ expectedPort } ` ,
133
+ } ,
134
+
135
+ // devToolsCommit tests
136
+ {
137
+ scenarioName : "devToolsCommit defaults to 02e6bde1bbe34e43b309d4ef774b1168d25fd024 and is used in result when useBundledDevTools is not passed" ,
138
+ debugOptions : { } ,
139
+ expectedChromeUrl : `chrome-devtools://devtools/remote/serve_file/@02e6bde1bbe34e43b309d4ef774b1168d25fd024/inspector.html?experiments=true&ws=localhost:${ expectedPort } ` ,
140
+ } ,
141
+ {
142
+ scenarioName : "devToolsCommit is set to passed value when useBundledDevTools is not passed" ,
143
+ debugOptions : {
144
+ devToolsCommit : customDevToolsCommit
145
+ } ,
146
+ expectedChromeUrl : `chrome-devtools://devtools/remote/serve_file/@${ customDevToolsCommit } /inspector.html?experiments=true&ws=localhost:${ expectedPort } ` ,
147
+ } ,
148
+ {
149
+ scenarioName : "devToolsCommit is set to passed value when useBundledDevTools is set to false" ,
150
+ debugOptions : {
151
+ useBundledDevTools : false ,
152
+ devToolsCommit : customDevToolsCommit
153
+ } ,
154
+ expectedChromeUrl : `chrome-devtools://devtools/remote/serve_file/@${ customDevToolsCommit } /inspector.html?experiments=true&ws=localhost:${ expectedPort } ` ,
155
+ } ,
156
+ {
157
+ scenarioName : "devToolsCommit is set to passed value when useHttpUrl is set to true" ,
158
+ debugOptions : {
159
+ useHttpUrl : true ,
160
+ devToolsCommit : customDevToolsCommit
161
+ } ,
162
+ expectedChromeUrl : `https://chrome-devtools-frontend.appspot.com/serve_file/@${ customDevToolsCommit } /inspector.html?experiments=true&ws=localhost:${ expectedPort } ` ,
163
+ } ,
164
+ {
165
+ scenarioName : "devToolsCommit is disregarded when useBundledDevTools is set to true" ,
166
+ debugOptions : {
167
+ useBundledDevTools : true ,
168
+ devToolsCommit : customDevToolsCommit
169
+ } ,
170
+ expectedChromeUrl : `chrome-devtools://devtools/bundled/inspector.html?experiments=true&ws=localhost:${ expectedPort } ` ,
131
171
}
132
172
133
173
] ;
0 commit comments