File tree Expand file tree Collapse file tree
integration_tests/web/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1135,6 +1135,7 @@ Future<void> _runWebUnitTests(String webRenderer) async {
11351135
11361136/// Coarse-grained integration tests running on the Web.
11371137Future <void > _runWebLongRunningTests () async {
1138+ final String engineVersion = File (engineVersionFile).readAsStringSync ().trim ();
11381139 final List <ShardRunner > tests = < ShardRunner > [
11391140 for (String buildMode in _kAllBuildModes) ...< ShardRunner > [
11401141 () => _runFlutterDriverWebTest (
@@ -1228,6 +1229,10 @@ Future<void> _runWebLongRunningTests() async {
12281229 () => _runWebDebugTest ('lib/stack_trace.dart' ),
12291230 () => _runWebDebugTest ('lib/framework_stack_trace.dart' ),
12301231 () => _runWebDebugTest ('lib/web_directory_loading.dart' ),
1232+ () => _runWebDebugTest ('lib/web_resources_cdn_test.dart' ,
1233+ additionalArguments: < String > [
1234+ '--dart-define=TEST_FLUTTER_ENGINE_VERSION=$engineVersion ' ,
1235+ ]),
12311236 () => _runWebDebugTest ('test/test.dart' ),
12321237 () => _runWebDebugTest ('lib/null_safe_main.dart' , enableNullSafety: true ),
12331238 () => _runWebDebugTest ('lib/web_define_loading.dart' ,
Original file line number Diff line number Diff line change 1+ // Copyright 2014 The Flutter Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style license that can be
3+ // found in the LICENSE file.
4+
5+ import 'dart:html' as html;
6+
7+ // Attempt to load CanvasKit resources hosted on gstatic.
8+ Future <void > main () async {
9+ const String engineVersion = String .fromEnvironment ('TEST_FLUTTER_ENGINE_VERSION' );
10+ if (engineVersion.isEmpty) {
11+ print ('--- TEST FAILED ---' );
12+ return ;
13+ }
14+ try {
15+ final html.HttpRequest request = await html.HttpRequest .request (
16+ 'https://www.gstatic.com/flutter-canvaskit/$engineVersion /canvaskit.js' ,
17+ method: 'GET' ,
18+ );
19+ final dynamic response = request.response;
20+ if (response != null ) {
21+ print ('--- TEST SUCCEEDED ---' );
22+ } else {
23+ print ('--- TEST FAILED ---' );
24+ }
25+ } catch (err) {
26+ print (err);
27+ print ('--- TEST FAILED ---' );
28+ }
29+ try {
30+ final html.HttpRequest request = await html.HttpRequest .request (
31+ 'https://www.gstatic.com/flutter-canvaskit/$engineVersion /canvaskit.wasm' ,
32+ method: 'GET' ,
33+ );
34+ final dynamic response = request.response;
35+ if (response != null ) {
36+ print ('--- TEST SUCCEEDED ---' );
37+ } else {
38+ print ('--- TEST FAILED ---' );
39+ }
40+ } catch (err) {
41+ print (err);
42+ print ('--- TEST FAILED ---' );
43+ }
44+ }
You can’t perform that action at this time.
0 commit comments