Skip to content

Commit 91b8a19

Browse files
authored
Fix global variable isInternalBuild in injected client (#1805)
1 parent 7d0810a commit 91b8a19

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

dwds/lib/dart_web_debug_service.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ class Dwds {
128128
extensionUri: extensionUri,
129129
enableDevtoolsLaunch: enableDevtoolsLaunch,
130130
emitDebugEvents: emitDebugEvents,
131+
isInternalBuild: isInternalBuild,
131132
);
132133

133134
final devHandler = DevHandler(

dwds/lib/src/injected/client.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/test/handlers/injector_test.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,10 @@ void main() {
199199
expect(result.body, contains('\$emitRegisterEvent'));
200200
});
201201

202-
test('the injected client contains a global \$isInternalDartBuild',
203-
() async {
202+
test('the injected client contains a global \$isInternalBuild', () async {
204203
final result = await http.get(Uri.parse(
205204
'http://localhost:${server.port}/dwds/src/injected/client.js'));
206-
expect(result.body, contains('\$isInternalDartBuild'));
205+
expect(result.body, contains('\$isInternalBuild'));
207206
});
208207

209208
test('serves the injected client', () async {

dwds/test/puppeteer/extension_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ void main() async {
8787
expect(debugInfo.appInstanceId, isNotNull);
8888
expect(debugInfo.appOrigin, isNotNull);
8989
expect(debugInfo.appUrl, isNotNull);
90+
expect(debugInfo.isInternalBuild, isNotNull);
9091
await appTab.close();
9192
});
9293

dwds/web/client.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Future<void>? main() {
181181
..appOrigin = window.location.origin
182182
..appUrl = window.location.href
183183
..extensionUrl = windowContext['\$dartExtensionUri']
184-
..isInternalBuild = windowContext['\$isInternalDartBuild'])));
184+
..isInternalBuild = windowContext['\$isInternalBuild'])));
185185

186186
dispatchEvent(CustomEvent('dart-app-ready', detail: debugInfoJson));
187187
}, (error, stackTrace) {
@@ -275,7 +275,7 @@ external set emitDebugEvent(void Function(String, String) func);
275275
@JS(r'$emitRegisterEvent')
276276
external set emitRegisterEvent(void Function(String) func);
277277

278-
@JS(r'$isInternalDartBuild')
279-
external bool get isInternalDartBuild;
278+
@JS(r'$isInternalBuild')
279+
external bool get isInternalBuild;
280280

281281
bool get _isChromium => window.navigator.vendor.contains('Google');

0 commit comments

Comments
 (0)