Add integration test for platform interaction (#11580)
diff --git a/dev/devicelab/bin/tasks/platform_interaction_test.dart b/dev/devicelab/bin/tasks/platform_interaction_test.dart new file mode 100644 index 0000000..79e7f5f --- /dev/null +++ b/dev/devicelab/bin/tasks/platform_interaction_test.dart
@@ -0,0 +1,14 @@ +// Copyright 2017 The Chromium 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 'dart:async'; + +import 'package:flutter_devicelab/framework/adb.dart'; +import 'package:flutter_devicelab/framework/framework.dart'; +import 'package:flutter_devicelab/tasks/integration_tests.dart'; + +Future<Null> main() async { + deviceOperatingSystem = DeviceOperatingSystem.android; + await task(createPlatformInteractionTest()); +}
diff --git a/dev/devicelab/bin/tasks/platform_interaction_test_ios.dart b/dev/devicelab/bin/tasks/platform_interaction_test_ios.dart new file mode 100644 index 0000000..189ffef --- /dev/null +++ b/dev/devicelab/bin/tasks/platform_interaction_test_ios.dart
@@ -0,0 +1,14 @@ +// Copyright 2017 The Chromium 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 'dart:async'; + +import 'package:flutter_devicelab/framework/adb.dart'; +import 'package:flutter_devicelab/framework/framework.dart'; +import 'package:flutter_devicelab/tasks/integration_tests.dart'; + +Future<Null> main() async { + deviceOperatingSystem = DeviceOperatingSystem.ios; + await task(createPlatformInteractionTest()); +}
diff --git a/dev/devicelab/lib/tasks/integration_tests.dart b/dev/devicelab/lib/tasks/integration_tests.dart index 557e245..b5aea30 100644 --- a/dev/devicelab/lib/tasks/integration_tests.dart +++ b/dev/devicelab/lib/tasks/integration_tests.dart
@@ -16,6 +16,13 @@ ); } +TaskFunction createPlatformInteractionTest() { + return new DriverTest( + '${flutterDirectory.path}/dev/integration_tests/platform_interaction', + 'lib/main.dart', + ); +} + TaskFunction createPlatformChannelSampleTest() { return new DriverTest( '${flutterDirectory.path}/examples/platform_channel',
diff --git a/dev/devicelab/manifest.yaml b/dev/devicelab/manifest.yaml index 4cc1422..c06e442 100644 --- a/dev/devicelab/manifest.yaml +++ b/dev/devicelab/manifest.yaml
@@ -65,6 +65,12 @@ stage: devicelab required_agent_capabilities: ["has-android-device"] + platform_interaction_test: + description: > + Checks platform interaction on Android. + stage: devicelab + required_agent_capabilities: ["has-android-device"] + platform_channel_sample_test: description: > Runs a driver test on the Platform Channel sample app on Android. @@ -161,6 +167,12 @@ stage: devicelab_ios required_agent_capabilities: ["has-ios-device"] + platform_interaction_test_ios: + description: > + Checks platform interaction on iOS. + stage: devicelab_ios + required_agent_capabilities: ["has-ios-device"] + platform_channel_sample_test_ios: description: > Runs a driver test on the Platform Channel sample app on iOS.
diff --git a/dev/integration_tests/channels/ios/Runner.xcodeproj/project.pbxproj b/dev/integration_tests/channels/ios/Runner.xcodeproj/project.pbxproj index f5c72c6..8318015 100644 --- a/dev/integration_tests/channels/ios/Runner.xcodeproj/project.pbxproj +++ b/dev/integration_tests/channels/ios/Runner.xcodeproj/project.pbxproj
@@ -91,7 +91,6 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, ); sourceTree = "<group>"; };
diff --git a/dev/integration_tests/platform_interaction/.gitignore b/dev/integration_tests/platform_interaction/.gitignore new file mode 100644 index 0000000..eb15c3d --- /dev/null +++ b/dev/integration_tests/platform_interaction/.gitignore
@@ -0,0 +1,10 @@ +.DS_Store +.atom/ +.idea +.packages +.pub/ +build/ +ios/.generated/ +packages +pubspec.lock +.flutter-plugins
diff --git a/dev/integration_tests/platform_interaction/README.md b/dev/integration_tests/platform_interaction/README.md new file mode 100644 index 0000000..0544232 --- /dev/null +++ b/dev/integration_tests/platform_interaction/README.md
@@ -0,0 +1,3 @@ +# platform_interaction + +Integration test of platform interaction.
diff --git a/dev/integration_tests/platform_interaction/android/.gitignore b/dev/integration_tests/platform_interaction/android/.gitignore new file mode 100644 index 0000000..3caaa44 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/.gitignore
@@ -0,0 +1,13 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +GeneratedPluginRegistrant.java + +gradle-wrapper.jar +/gradlew +/gradlew.bat
diff --git a/dev/integration_tests/platform_interaction/android/app/build.gradle b/dev/integration_tests/platform_interaction/android/app/build.gradle new file mode 100644 index 0000000..40c3dca --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/app/build.gradle
@@ -0,0 +1,58 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withInputStream { stream -> + localProperties.load(stream) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 25 + buildToolsVersion '25.0.3' + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + minSdkVersion 16 + targetSdkVersion 25 + versionCode 1 + versionName "0.0.1" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } + + aaptOptions { + // TODO(goderbauer): remove when https://github.com/flutter/flutter/issues/8986 is resolved. + if(System.getenv("FLUTTER_CI_WIN")) { + println "AAPT cruncher disabled when running on Win CI." + cruncherEnabled false + } + } +} + +flutter { + source '../..' +} + +dependencies { + androidTestCompile 'com.android.support:support-annotations:25.4.0' + androidTestCompile 'com.android.support.test:runner:0.5' + androidTestCompile 'com.android.support.test:rules:0.5' +}
diff --git a/dev/integration_tests/platform_interaction/android/app/src/main/AndroidManifest.xml b/dev/integration_tests/platform_interaction/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..03a3104 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,28 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.yourcompany.platforminteraction"> + + <!-- The INTERNET permission is required for development. Specifically, + flutter needs it to communicate with the running application + to allow setting breakpoints, to provide hot reload, etc. + --> + <uses-permission android:name="android.permission.INTERNET"/> + + <!-- io.flutter.app.FlutterApplication is an android.app.Application that + calls FlutterMain.startInitialization(this); in its onCreate method. + In most cases you can leave this as-is, but you if you want to provide + additional functionality it is fine to subclass or reimplement + FlutterApplication and put your custom class here. --> + <application android:name="io.flutter.app.FlutterApplication" android:label="Platform Interaction" android:icon="@mipmap/ic_launcher"> + <activity android:name="com.yourcompany.platforminteraction.MainActivity" + android:launchMode="singleTop" + android:theme="@android:style/Theme.Black.NoTitleBar" + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection" + android:hardwareAccelerated="true" + android:windowSoftInputMode="adjustResize"> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> + </intent-filter> + </activity> + </application> +</manifest>
diff --git a/dev/integration_tests/platform_interaction/android/app/src/main/java/com/yourcompany/platforminteraction/MainActivity.java b/dev/integration_tests/platform_interaction/android/app/src/main/java/com/yourcompany/platforminteraction/MainActivity.java new file mode 100644 index 0000000..2722283 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/app/src/main/java/com/yourcompany/platforminteraction/MainActivity.java
@@ -0,0 +1,24 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package com.yourcompany.platforminteraction; + +import android.os.Bundle; + +import io.flutter.app.FlutterActivity; +import io.flutter.plugin.common.*; +import io.flutter.plugins.GeneratedPluginRegistrant; + +public class MainActivity extends FlutterActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + GeneratedPluginRegistrant.registerWith(this); + } + public void finish() { + BasicMessageChannel channel = + new BasicMessageChannel<>(getFlutterView(), "navigation-test", StringCodec.INSTANCE); + channel.send("ping"); + } +}
diff --git a/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/android/build.gradle b/dev/integration_tests/platform_interaction/android/build.gradle new file mode 100644 index 0000000..77cbd09 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/build.gradle
@@ -0,0 +1,31 @@ +buildscript { + repositories { + jcenter() + maven { + url "https://maven.google.com" + } + } + + dependencies { + classpath 'com.android.tools.build:gradle:2.3.3' + } +} + +allprojects { + repositories { + jcenter() + maven { + url "https://maven.google.com" + } + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +}
diff --git a/dev/integration_tests/platform_interaction/android/gradle.properties b/dev/integration_tests/platform_interaction/android/gradle.properties new file mode 100644 index 0000000..8bd86f6 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/gradle.properties
@@ -0,0 +1 @@ +org.gradle.jvmargs=-Xmx1536M
diff --git a/dev/integration_tests/platform_interaction/android/gradle/wrapper/gradle-wrapper.properties b/dev/integration_tests/platform_interaction/android/gradle/wrapper/gradle-wrapper.properties new file mode 100755 index 0000000..45e7f14 --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/dev/integration_tests/platform_interaction/android/settings.gradle b/dev/integration_tests/platform_interaction/android/settings.gradle new file mode 100644 index 0000000..115da6c --- /dev/null +++ b/dev/integration_tests/platform_interaction/android/settings.gradle
@@ -0,0 +1,15 @@ +include ':app' + +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + +def plugins = new Properties() +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') +if (pluginsFile.exists()) { + pluginsFile.withInputStream { stream -> plugins.load(stream) } +} + +plugins.each { name, path -> + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() + include ":$name" + project(":$name").projectDir = pluginDirectory +}
diff --git a/dev/integration_tests/platform_interaction/ios/.gitignore b/dev/integration_tests/platform_interaction/ios/.gitignore new file mode 100644 index 0000000..38864ee --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/.gitignore
@@ -0,0 +1,41 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/app.flx +/Flutter/app.zip +/Flutter/App.framework +/Flutter/Flutter.framework +/Flutter/Generated.xcconfig +/ServiceDefinitions.json + +Pods/
diff --git a/dev/integration_tests/platform_interaction/ios/Flutter/AppFrameworkInfo.plist b/dev/integration_tests/platform_interaction/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..6c2de80 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleExecutable</key> + <string>App</string> + <key>CFBundleIdentifier</key> + <string>io.flutter.flutter.app</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>App</string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>UIRequiredDeviceCapabilities</key> + <array> + <string>arm64</string> + </array> + <key>MinimumOSVersion</key> + <string>8.0</string> +</dict> +</plist>
diff --git a/dev/integration_tests/platform_interaction/ios/Flutter/Debug.xcconfig b/dev/integration_tests/platform_interaction/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@ +#include "Generated.xcconfig"
diff --git a/dev/integration_tests/platform_interaction/ios/Flutter/Release.xcconfig b/dev/integration_tests/platform_interaction/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@ +#include "Generated.xcconfig"
diff --git a/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/project.pbxproj b/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..8c4972e --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,429 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 2D11032A1F3B34710058E41B /* TestNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D1103291F3B34710058E41B /* TestNavigationController.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; + 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; + 9740EEBB1CF902C7004384FC /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; }; + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; + 2D1103281F3B345C0058E41B /* TestNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestNavigationController.h; sourceTree = "<group>"; }; + 2D1103291F3B34710058E41B /* TestNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestNavigationController.m; sourceTree = "<group>"; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; + 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; + 9740EEB71CF902C7004384FC /* app.flx */ = {isa = PBXFileReference; lastKnownFileType = file; name = app.flx; path = Flutter/app.flx; sourceTree = "<group>"; }; + 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 9740EEB71CF902C7004384FC /* app.flx */, + 3B80C3931E831B6300D905FE /* App.framework */, + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEBA1CF902C7004384FC /* Flutter.framework */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = "<group>"; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = "<group>"; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 97C147021CF9000F007C117D /* Info.plist */, + 2D1103281F3B345C0058E41B /* TestNavigationController.h */, + 2D1103291F3B34710058E41B /* TestNavigationController.m */, + ); + path = Runner; + sourceTree = "<group>"; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 97C146F21CF9000F007C117D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "The Chromium Authors"; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9740EEBB1CF902C7004384FC /* app.flx in Resources */, + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, + 2D11032A1F3B34710058E41B /* TestNavigationController.m in Sources */, + 97C146F31CF9000F007C117D /* main.m in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = "<group>"; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ARCHS = arm64; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.platforminteraction; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ARCHS = arm64; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.platforminteraction; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +}
diff --git a/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "group:Runner.xcodeproj"> + </FileRef> +</Workspace>
diff --git a/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..1c95807 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0830" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "97C146ED1CF9000F007C117D" + BuildableName = "Runner.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> + <Testables> + </Testables> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "97C146ED1CF9000F007C117D" + BuildableName = "Runner.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </MacroExpansion> + <AdditionalOptions> + </AdditionalOptions> + </TestAction> + <LaunchAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + <BuildableProductRunnable + runnableDebuggingMode = "0"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "97C146ED1CF9000F007C117D" + BuildableName = "Runner.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildableProductRunnable> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + buildConfiguration = "Release" + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES"> + <BuildableProductRunnable + runnableDebuggingMode = "0"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "97C146ED1CF9000F007C117D" + BuildableName = "Runner.app" + BlueprintName = "Runner" + ReferencedContainer = "container:Runner.xcodeproj"> + </BuildableReference> + </BuildableProductRunnable> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme>
diff --git a/dev/integration_tests/platform_interaction/ios/Runner.xcworkspace/contents.xcworkspacedata b/dev/integration_tests/platform_interaction/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "group:Runner.xcodeproj"> + </FileRef> +</Workspace>
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/AppDelegate.h b/dev/integration_tests/platform_interaction/ios/Runner/AppDelegate.h new file mode 100644 index 0000000..138b680 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/AppDelegate.h
@@ -0,0 +1,10 @@ +// Copyright 2017 The Chromium 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 <UIKit/UIKit.h> +#import <Flutter/Flutter.h> + +@interface AppDelegate : FlutterAppDelegate + +@end
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/AppDelegate.m b/dev/integration_tests/platform_interaction/ios/Runner/AppDelegate.m new file mode 100644 index 0000000..dfa4361 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/AppDelegate.m
@@ -0,0 +1,15 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "AppDelegate.h" +#include "GeneratedPluginRegistrant.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [GeneratedPluginRegistrant registerWithRegistry:self]; + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +@end
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d22f10b --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,116 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +}
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d0e1f58 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png Binary files differ
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Base.lproj/LaunchScreen.storyboard b/dev/integration_tests/platform_interaction/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..ebf48f6 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM"> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="EHf-IW-A2E"> + <objects> + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="53" y="375"/> + </scene> + </scenes> +</document>
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Base.lproj/Main.storyboard b/dev/integration_tests/platform_interaction/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..08685c4 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="hIq-15-ITu"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <!--Flutter View Controller--> + <scene sceneID="tne-QT-ifu"> + <objects> + <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> + <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </view> + <navigationItem key="navigationItem" id="GUu-dA-3Cs"/> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="1055.2" y="123.68815592203899"/> + </scene> + <!--Test Navigation Controller--> + <scene sceneID="dG3-WE-vKQ"> + <objects> + <navigationController automaticallyAdjustsScrollViewInsets="NO" id="hIq-15-ITu" customClass="TestNavigationController" sceneMemberID="viewController"> + <toolbarItems/> + <navigationBar key="navigationBar" contentMode="scaleToFill" id="Tam-uN-fcI"> + <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> + <autoresizingMask key="autoresizingMask"/> + </navigationBar> + <nil name="viewControllers"/> + <connections> + <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="0aD-1I-Wci"/> + </connections> + </navigationController> + <placeholder placeholderIdentifier="IBFirstResponder" id="8XK-Xi-qiO" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="189.59999999999999" y="777.66116941529242"/> + </scene> + </scenes> +</document>
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/Info.plist b/dev/integration_tests/platform_interaction/ios/Runner/Info.plist new file mode 100644 index 0000000..6efc899 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/Info.plist
@@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>platforminteraction</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>UILaunchStoryboardName</key> + <string>LaunchScreen</string> + <key>UIMainStoryboardFile</key> + <string>Main</string> + <key>UIRequiredDeviceCapabilities</key> + <array> + <string>arm64</string> + </array> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UIViewControllerBasedStatusBarAppearance</key> + <false/> +</dict> +</plist>
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/TestNavigationController.h b/dev/integration_tests/platform_interaction/ios/Runner/TestNavigationController.h new file mode 100644 index 0000000..64de4b9 --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/TestNavigationController.h
@@ -0,0 +1,9 @@ +// Copyright 2017 The Chromium 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 <UIKit/UIKit.h> + +@interface TestNavigationController: UINavigationController + +@end
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/TestNavigationController.m b/dev/integration_tests/platform_interaction/ios/Runner/TestNavigationController.m new file mode 100644 index 0000000..45c58da --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/TestNavigationController.m
@@ -0,0 +1,27 @@ +// Copyright 2017 The Chromium 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 <Foundation/Foundation.h> +#import "TestNavigationController.h" +#import <Flutter/Flutter.h> + +@implementation TestNavigationController + +- (void) viewWillAppear:(BOOL)animated { + [self setNavigationBarHidden:YES animated:NO]; + [super viewWillAppear:animated]; +} + +- (nullable UIViewController *)popViewControllerAnimated:(BOOL)animated { + FlutterViewController* root = (FlutterViewController*)[self.viewControllers objectAtIndex:0]; + + FlutterBasicMessageChannel* messageChannel = + [FlutterBasicMessageChannel messageChannelWithName:@"navigation-test" + binaryMessenger:root + codec:[FlutterStringCodec sharedInstance]]; + [messageChannel sendMessage:@"ping"]; + return root; +} + +@end
diff --git a/dev/integration_tests/platform_interaction/ios/Runner/main.m b/dev/integration_tests/platform_interaction/ios/Runner/main.m new file mode 100644 index 0000000..945818b --- /dev/null +++ b/dev/integration_tests/platform_interaction/ios/Runner/main.m
@@ -0,0 +1,14 @@ +// Copyright 2017 The Chromium 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 <UIKit/UIKit.h> +#import <Flutter/Flutter.h> +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, + NSStringFromClass([AppDelegate class])); + } +}
diff --git a/dev/integration_tests/platform_interaction/lib/main.dart b/dev/integration_tests/platform_interaction/lib/main.dart new file mode 100644 index 0000000..5a10cc9 --- /dev/null +++ b/dev/integration_tests/platform_interaction/lib/main.dart
@@ -0,0 +1,74 @@ +// Copyright 2017 The Chromium 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 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_driver/driver_extension.dart'; + +import 'src/system_navigation.dart'; +import 'src/test_step.dart'; + +void main() { + enableFlutterDriverExtension(); + runApp(new TestApp()); +} + +class TestApp extends StatefulWidget { + @override + _TestAppState createState() => new _TestAppState(); +} + +class _TestAppState extends State<TestApp> { + static final List<TestStep> steps = <TestStep>[ + () => systemNavigatorPop(), + ]; + Future<TestStepResult> _result; + int _step = 0; + + @override + void initState() { + super.initState(); + } + + void _executeNextStep() { + setState(() { + if (_step < steps.length) + _result = steps[_step++](); + else + _result = new Future<TestStepResult>.value(TestStepResult.complete); + }); + } + + Widget _buildTestResultWidget( + BuildContext context, + AsyncSnapshot<TestStepResult> snapshot, + ) { + return new TestStepResult.fromSnapshot(snapshot).asWidget(context); + } + + @override + Widget build(BuildContext context) { + return new MaterialApp( + title: 'Platform Interaction Test', + home: new Scaffold( + appBar: new AppBar( + title: const Text('Platform Interaction Test'), + ), + body: new Padding( + padding: const EdgeInsets.all(20.0), + child: new FutureBuilder<TestStepResult>( + future: _result, + builder: _buildTestResultWidget, + ), + ), + floatingActionButton: new FloatingActionButton( + key: const ValueKey<String>('step'), + onPressed: _executeNextStep, + child: const Icon(Icons.navigate_next), + ), + ), + ); + } +}
diff --git a/dev/integration_tests/platform_interaction/lib/src/system_navigation.dart b/dev/integration_tests/platform_interaction/lib/src/system_navigation.dart new file mode 100644 index 0000000..3a02b00 --- /dev/null +++ b/dev/integration_tests/platform_interaction/lib/src/system_navigation.dart
@@ -0,0 +1,24 @@ +// Copyright 2017 The Chromium 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 'dart:async'; +import 'package:flutter/services.dart'; +import 'test_step.dart'; + +Future<TestStepResult> systemNavigatorPop() { + const BasicMessageChannel<String> channel = const BasicMessageChannel<String>( + 'navigation-test', + const StringCodec(), + ); + + final Completer<TestStepResult> completer = new Completer<TestStepResult>(); + + channel.setMessageHandler((String message) async { + completer.complete( + new TestStepResult('System navigation pop', '', TestStatus.ok)); + return ''; + }); + SystemNavigator.pop(); + return completer.future; +}
diff --git a/dev/integration_tests/platform_interaction/lib/src/test_step.dart b/dev/integration_tests/platform_interaction/lib/src/test_step.dart new file mode 100644 index 0000000..3ed5523 --- /dev/null +++ b/dev/integration_tests/platform_interaction/lib/src/test_step.dart
@@ -0,0 +1,64 @@ +// Copyright 2017 The Chromium 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 'dart:async'; + +import 'package:flutter/material.dart'; + +enum TestStatus { ok, pending, failed, complete } + +typedef Future<TestStepResult> TestStep(); + +const String nothing = '-'; + +class TestStepResult { + static const TextStyle bold = const TextStyle(fontWeight: FontWeight.bold); + static const TestStepResult complete = const TestStepResult( + 'Test complete', + nothing, + TestStatus.complete, + ); + + const TestStepResult(this.name, this.description, this.status); + + factory TestStepResult.fromSnapshot(AsyncSnapshot<TestStepResult> snapshot) { + switch (snapshot.connectionState) { + case ConnectionState.none: + return const TestStepResult('Not started', nothing, TestStatus.ok); + case ConnectionState.waiting: + return const TestStepResult('Executing', nothing, TestStatus.pending); + case ConnectionState.done: + if (snapshot.hasData) { + return snapshot.data; + } else { + final TestStepResult result = snapshot.error; + return result; + } + break; + default: + throw 'Unsupported state ${snapshot.connectionState}'; + } + } + + final String name; + final String description; + final TestStatus status; + + Widget asWidget(BuildContext context) { + return new Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: <Widget>[ + new Text('Step: $name', style: bold), + new Text(description), + const Text(' '), + new Text( + status.toString().substring('TestStatus.'.length), + key: new ValueKey<String>( + status == TestStatus.pending ? 'nostatus' : 'status'), + style: bold, + ), + ], + ); + } +}
diff --git a/dev/integration_tests/platform_interaction/pubspec.yaml b/dev/integration_tests/platform_interaction/pubspec.yaml new file mode 100644 index 0000000..1fecbc9 --- /dev/null +++ b/dev/integration_tests/platform_interaction/pubspec.yaml
@@ -0,0 +1,10 @@ +name: platform_interaction +description: Integration test for platform interactions. + +dependencies: + flutter: + sdk: flutter + flutter_driver: + sdk: flutter +flutter: + uses-material-design: true
diff --git a/dev/integration_tests/platform_interaction/test_driver/main_test.dart b/dev/integration_tests/platform_interaction/test_driver/main_test.dart new file mode 100644 index 0000000..1048c69 --- /dev/null +++ b/dev/integration_tests/platform_interaction/test_driver/main_test.dart
@@ -0,0 +1,34 @@ +// Copyright 2017 The Chromium 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_driver/flutter_driver.dart'; +import 'package:test/test.dart'; + +void main() { + group('channel suite', () { + FlutterDriver driver; + + setUpAll(() async { + driver = await FlutterDriver.connect(); + }); + + test('step through', () async { + final SerializableFinder stepButton = find.byValueKey('step'); + final SerializableFinder statusField = find.byValueKey('status'); + int step = 0; + while (await driver.getText(statusField) == 'ok') { + await driver.tap(stepButton); + step++; + } + final String status = await driver.getText(statusField); + if (status != 'complete') { + fail('Failed at step $step with status $status'); + } + }); + + tearDownAll(() async { + driver?.close(); + }); + }); +}