Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Split helper classes from main example widget.
Browse files Browse the repository at this point in the history
Move the `WebView` and related `WebViewController` classes from the
main.dart into a separate web_view.dart file.
  • Loading branch information
mvanbeusekom committed Sep 20, 2021
1 parent e6ddab6 commit d20e802
Show file tree
Hide file tree
Showing 7 changed files with 638 additions and 614 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>8.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -597,7 +597,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:webview_flutter_wkwebview_example/main.dart';
import 'package:webview_flutter_platform_interface/webview_flutter_platform_interface.dart';
import 'package:integration_test/integration_test.dart';
import 'package:webview_flutter_platform_interface/webview_flutter_platform_interface.dart';
import 'package:webview_flutter_wkwebview_example/navigation_decision.dart';
import 'package:webview_flutter_wkwebview_example/navigation_request.dart';
import 'package:webview_flutter_wkwebview_example/web_view.dart';

void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

// Set to `false` to include all flaky tests in the test run. See also https://github.com/flutter/flutter/issues/86757.
const bool _skipDueIssue86757 = false;
const bool _skipDueToIssue86757 = false;

// TODO(bparrishMines): skipped due to https://github.com/flutter/flutter/issues/86757.
testWidgets('initialUrl', (WidgetTester tester) async {
Expand All @@ -40,7 +42,7 @@ void main() {
final WebViewController controller = await controllerCompleter.future;
final String? currentUrl = await controller.currentUrl();
expect(currentUrl, 'https://flutter.dev/');
}, skip: _skipDueIssue86757);
}, skip: _skipDueToIssue86757);

// TODO(bparrishMines): skipped due to https://github.com/flutter/flutter/issues/86757.
testWidgets('loadUrl', (WidgetTester tester) async {
Expand All @@ -62,7 +64,7 @@ void main() {
await controller.loadUrl('https://www.google.com/');
final String? currentUrl = await controller.currentUrl();
expect(currentUrl, 'https://www.google.com/');
}, skip: _skipDueIssue86757);
}, skip: _skipDueToIssue86757);

testWidgets('loadUrl with headers', (WidgetTester tester) async {
final Completer<WebViewController> controllerCompleter =
Expand Down Expand Up @@ -1184,7 +1186,7 @@ void main() {
await pageLoaded.future;
expect(controller.currentUrl(), completion('https://flutter.dev/'));
},
skip: _skipDueIssue86757,
skip: _skipDueToIssue86757,
);
}

Expand Down
Loading

0 comments on commit d20e802

Please sign in to comment.