forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[multiple_web] Adapt web PlatformView widgets to work slotted. (flutt…
…er#3964) * [url_launcher_web] Make Link take 100% width/height of the PlatformView. * [google_maps_flutter_web] Make Map take 100% width/height of the PlatformView. * [video_player_web] Make Video take 100% width/height of the PlatformView. * [video_player_web] Move tests to integration_test style so they run in CI. * [url_launcher] Add link example
- Loading branch information
Showing
22 changed files
with
222 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Testing | ||
|
||
This package utilizes the `integration_test` package to run its tests in a web browser. | ||
|
||
See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. | ||
|
||
## Running the tests | ||
|
||
Make sure you have updated to the latest Flutter master. | ||
|
||
1. Check what version of Chrome is running on the machine you're running tests on. | ||
|
||
2. Download and install driver for that version from here: | ||
* <https://chromedriver.chromium.org/downloads> | ||
|
||
3. Start the driver using `chromedriver --port=4444` | ||
|
||
4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux): | ||
|
||
* Single: `./run_test.sh integration_test/TEST_NAME.dart` | ||
* All: `./run_test.sh` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/video_player/video_player_web/example/lib/main.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
void main() { | ||
runApp(MyApp()); | ||
} | ||
|
||
/// App for testing | ||
class MyApp extends StatefulWidget { | ||
@override | ||
_MyAppState createState() => _MyAppState(); | ||
} | ||
|
||
class _MyAppState extends State<MyApp> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Directionality( | ||
textDirection: TextDirection.ltr, | ||
child: Text('Testing... Look at the console output for results!'), | ||
); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/video_player/video_player_web/example/pubspec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: connectivity_for_web_integration_tests | ||
publish_to: none | ||
|
||
environment: | ||
sdk: ">=2.12.0 <3.0.0" | ||
flutter: ">=2.2.0" | ||
|
||
dependencies: | ||
video_player_web: | ||
path: ../ | ||
flutter: | ||
sdk: flutter | ||
|
||
dev_dependencies: | ||
flutter_test: | ||
sdk: flutter | ||
flutter_driver: | ||
sdk: flutter | ||
integration_test: | ||
sdk: flutter |
22 changes: 22 additions & 0 deletions
22
packages/video_player/video_player_web/example/run_test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/bash | ||
# Copyright 2013 The Flutter Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
if pgrep -lf chromedriver > /dev/null; then | ||
echo "chromedriver is running." | ||
|
||
if [ $# -eq 0 ]; then | ||
echo "No target specified, running all tests..." | ||
find integration_test/ -iname *_test.dart | xargs -n1 -i -t flutter drive -d web-server --web-port=7357 --browser-name=chrome --driver=test_driver/integration_test.dart --target='{}' | ||
else | ||
echo "Running test target: $1..." | ||
set -x | ||
flutter drive -d web-server --web-port=7357 --browser-name=chrome --driver=test_driver/integration_test.dart --target=$1 | ||
fi | ||
|
||
else | ||
echo "chromedriver is not running." | ||
echo "Please, check the README.md for instructions on how to use run_test.sh" | ||
fi | ||
|
7 changes: 7 additions & 0 deletions
7
packages/video_player/video_player_web/example/test_driver/integration_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'package:integration_test/integration_test_driver.dart'; | ||
|
||
Future<void> main() => integrationDriver(); |
Oops, something went wrong.