Cleanup dart_runner examples & tests. (flutter/engine#22769)
This commit is contained in:
@@ -1158,24 +1158,6 @@ FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/embedder/shim.dart
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/embedder/snapshot.cc.tmpl
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/embedder/snapshot.dart
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/embedder/snapshot.h
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/goodbye_dart/goodbye_dart.dart
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/goodbye_dart/goodbye_dart_test
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/goodbye_dart/meta/goodbye_dart_aot.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/goodbye_dart/meta/goodbye_dart_jit.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/greeting/greeting.dart
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_app_dart/interfaces/hello.fidl
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_app_dart/main.dart
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_app_dart/meta/hello_app_dart_aot.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_app_dart/meta/hello_app_dart_jit.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_dart/bin/hello_dart.dart
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_dart/meta/hello_dart_aot.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_dart/meta/hello_dart_aot_product.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_dart/meta/hello_dart_debug.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_dart/meta/hello_dart_jit.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/examples/hello_dart/meta/hello_dart_jit_product.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/integration/main.dart
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/integration/meta/dart_aot_runner_test.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/integration/meta/dart_jit_runner_test.cmx
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/kernel/libraries.json
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/logging.h
|
||||
FILE: ../../../flutter/shell/platform/fuchsia/dart_runner/main.cc
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
# 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("//build/testing/environments.gni")
|
||||
import("//topaz/runtime/dart_runner/dart_app.gni")
|
||||
|
||||
dart_jit_app("goodbye_dart_jit") {
|
||||
sources = [ "goodbye_dart.dart" ]
|
||||
main_dart = "goodbye_dart.dart"
|
||||
|
||||
source_dir = "."
|
||||
deps = [
|
||||
"//topaz/public/dart/fidl",
|
||||
"//topaz/public/dart/fuchsia",
|
||||
]
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = "meta/goodbye_dart_jit.cmx"
|
||||
dest = "goodbye_dart_jit.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
dart_aot_app("goodbye_dart_aot") {
|
||||
sources = [ "goodbye_dart.dart" ]
|
||||
main_dart = "goodbye_dart.dart"
|
||||
|
||||
source_dir = "."
|
||||
deps = [
|
||||
"//topaz/public/dart/fidl",
|
||||
"//topaz/public/dart/fuchsia",
|
||||
]
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = "meta/goodbye_dart_aot.cmx"
|
||||
dest = "goodbye_dart_aot.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
copy("copy_goodbye_dart_test") {
|
||||
sources = [ "goodbye_dart_test" ]
|
||||
outputs = [ "${root_build_dir}/goodbye_dart_test" ]
|
||||
}
|
||||
|
||||
package("goodbye_dart_test") {
|
||||
testonly = true
|
||||
tests = [
|
||||
{
|
||||
name = "goodbye_dart_test"
|
||||
environments = basic_envs
|
||||
},
|
||||
]
|
||||
deps = [ ":copy_goodbye_dart_test" ]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# 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.
|
||||
|
||||
include: ../../../../tools/analysis_options.yaml
|
||||
@@ -1,24 +0,0 @@
|
||||
// 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 'dart:async';
|
||||
|
||||
import 'package:fuchsia/fuchsia.dart' as fuchsia;
|
||||
|
||||
// ignore: unused_element
|
||||
Timer _timer;
|
||||
|
||||
void main(List<String> args) {
|
||||
print('Hello, Dart!');
|
||||
|
||||
if (args.isNotEmpty && args.first == '--now') {
|
||||
print('Goodbye now!');
|
||||
fuchsia.exit(23);
|
||||
}
|
||||
|
||||
_timer = Timer(const Duration(seconds: 1), () {
|
||||
print('Goodbye, Dart!');
|
||||
fuchsia.exit(42);
|
||||
});
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/boot/bin/sh
|
||||
|
||||
run fuchsia-pkg://fuchsia.con/goodbye_dart_aot#meta/goodbye_dart_aot.cmx --now
|
||||
if [ $? -ne 23 ]; then
|
||||
echo "goodbye_dart_aot --now failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# run goodbye_dart_jit --now
|
||||
# if [ $? -ne 23 ]; then
|
||||
# echo "goodbye_dart_jit --now failed"
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
run fuchsia-pkg://fuchsia.con/goodbye_dart_aot#meta/goodbye_dart_aot.cmx
|
||||
if [ $? -ne 42 ]; then
|
||||
echo "goodbye_dart_aot failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# run goodbye_dart_jit
|
||||
# if [ $? -ne 42 ]; then
|
||||
# echo "goodbye_dart_jit failed"
|
||||
# exit 1
|
||||
# fi
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/goodbye_dart_aot"
|
||||
},
|
||||
"sandbox": {
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/goodbye_dart_jit"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [
|
||||
"deprecated-ambient-replace-as-executable"
|
||||
],
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# 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.
|
||||
@@ -1,13 +0,0 @@
|
||||
# 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("//build/dart/dart_library.gni")
|
||||
|
||||
dart_library("greeting") {
|
||||
infer_package_name = true
|
||||
|
||||
sources = [ "greeting.dart" ]
|
||||
|
||||
source_dir = "."
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# 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.
|
||||
|
||||
include: ../../../../tools/analysis_options.yaml
|
||||
@@ -1,8 +0,0 @@
|
||||
// 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.
|
||||
|
||||
/// Returns a greeting.
|
||||
String greeting() {
|
||||
return 'Hello';
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# 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.
|
||||
@@ -1,44 +0,0 @@
|
||||
# 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("//topaz/runtime/dart_runner/dart_app.gni")
|
||||
|
||||
dart_jit_app("hello_app_dart_jit") {
|
||||
main_dart = "main.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//topaz/public/dart/fidl",
|
||||
"//topaz/public/dart/fuchsia_services",
|
||||
"//topaz/runtime/dart_runner/examples/hello_app_dart/interfaces:interfaces",
|
||||
]
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = "meta/hello_app_dart_jit.cmx"
|
||||
dest = "hello_app_dart_jit.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
dart_aot_app("hello_app_dart_aot") {
|
||||
main_dart = "main.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//topaz/public/dart/fidl",
|
||||
"//topaz/public/dart/fuchsia_services",
|
||||
"//topaz/runtime/dart_runner/examples/hello_app_dart/interfaces:interfaces",
|
||||
]
|
||||
meta = [
|
||||
{
|
||||
path = "meta/hello_app_dart_aot.cmx"
|
||||
dest = "hello_app_dart_aot.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# 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.
|
||||
|
||||
include: ../../../../tools/analysis_options.yaml
|
||||
@@ -1,11 +0,0 @@
|
||||
# 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("//build/fidl/fidl.gni")
|
||||
|
||||
fidl("interfaces") {
|
||||
name = "fuchsia.examples.hello"
|
||||
|
||||
sources = [ "hello.fidl" ]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// 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.
|
||||
|
||||
library fuchsia.examples.hello;
|
||||
|
||||
[Discoverable]
|
||||
protocol Hello {
|
||||
Say(string request) -> (string response);
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
// 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:fidl/fidl.dart';
|
||||
|
||||
import 'package:fuchsia_services/services.dart';
|
||||
import 'package:fidl_fuchsia_examples_hello/fidl_async.dart';
|
||||
|
||||
class _HelloImpl extends Hello {
|
||||
final HelloBinding _binding = HelloBinding();
|
||||
|
||||
void bind(InterfaceRequest<Hello> request) {
|
||||
_binding.bind(this, request);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String> say(String request) async {
|
||||
return request == 'hello' ? 'hola from Dart!' : 'adios from Dart!';
|
||||
}
|
||||
}
|
||||
|
||||
void main(List<String> args) {
|
||||
StartupContext context = StartupContext.fromStartupInfo();
|
||||
|
||||
context.outgoing
|
||||
.addPublicService(_HelloImpl().bind, Hello.$serviceName);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/hello_app_dart_aot"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [],
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/hello_app_dart_jit"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [
|
||||
"deprecated-ambient-replace-as-executable"
|
||||
],
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# 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.
|
||||
@@ -1,111 +0,0 @@
|
||||
# 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("//topaz/runtime/dart_runner/dart_app.gni")
|
||||
|
||||
dart_jit_app("hello_dart_debug") {
|
||||
main_dart = "bin/hello_dart.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
product = false
|
||||
space_dart = false
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//topaz/public/dart/zircon",
|
||||
"//topaz/runtime/dart_runner/examples/greeting",
|
||||
]
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = "meta/hello_dart_debug.cmx"
|
||||
dest = "hello_dart_debug.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
dart_jit_app("hello_dart_jit") {
|
||||
main_dart = "bin/hello_dart.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
product = false
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//topaz/public/dart/zircon",
|
||||
"//topaz/runtime/dart_runner/examples/greeting",
|
||||
]
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = "meta/hello_dart_jit.cmx"
|
||||
dest = "hello_dart_jit.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
dart_jit_app("hello_dart_jit_product") {
|
||||
main_dart = "bin/hello_dart.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
product = true
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//topaz/public/dart/zircon",
|
||||
"//topaz/runtime/dart_runner/examples/greeting",
|
||||
]
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = "meta/hello_dart_jit_product.cmx"
|
||||
dest = "hello_dart_jit_product.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
dart_aot_app("hello_dart_aot") {
|
||||
main_dart = "bin/hello_dart.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
product = false
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//topaz/public/dart/zircon",
|
||||
"//topaz/runtime/dart_runner/examples/greeting",
|
||||
]
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = "meta/hello_dart_aot.cmx"
|
||||
dest = "hello_dart_aot.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
dart_aot_app("hello_dart_aot_product") {
|
||||
main_dart = "bin/hello_dart.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
product = true
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//topaz/public/dart/zircon",
|
||||
"//topaz/runtime/dart_runner/examples/greeting",
|
||||
]
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = "meta/hello_dart_aot_product.cmx"
|
||||
dest = "hello_dart_aot_product.cmx"
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# 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.
|
||||
|
||||
include: ../../../../tools/analysis_options.yaml
|
||||
@@ -1,9 +0,0 @@
|
||||
// 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:topaz.runtime.dart_runner.examples.greeting/greeting.dart';
|
||||
|
||||
void main(List<String> args) {
|
||||
print('${greeting()}, Dart!');
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/hello_dart_aot"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [],
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/hello_dart_aot_product"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [],
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/hello_dart_debug"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [],
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/hello_dart_jit"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [
|
||||
"deprecated-ambient-replace-as-executable"
|
||||
],
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/hello_dart_jit_product"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [
|
||||
"deprecated-ambient-replace-as-executable"
|
||||
],
|
||||
"services": [
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.sys.Environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# 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.
|
||||
@@ -1,51 +0,0 @@
|
||||
# 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("//topaz/runtime/dart_runner/dart_app.gni")
|
||||
|
||||
dart_jit_app("dart_jit_runner_test") {
|
||||
testonly = true
|
||||
|
||||
main_dart = "main.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = rebase_path("meta/dart_jit_runner_test.cmx")
|
||||
dest = "dart_jit_runner_test.cmx"
|
||||
},
|
||||
]
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/dart-pkg/pub/test",
|
||||
"//topaz/public/dart/fuchsia_services",
|
||||
"//topaz/runtime/dart_runner/examples/hello_app_dart/interfaces:interfaces",
|
||||
"//zircon/system/fidl/fuchsia-io",
|
||||
]
|
||||
}
|
||||
|
||||
dart_aot_app("dart_aot_runner_test") {
|
||||
testonly = true
|
||||
|
||||
main_dart = "main.dart"
|
||||
|
||||
source_dir = "."
|
||||
|
||||
meta = [
|
||||
{
|
||||
path = rebase_path("meta/dart_aot_runner_test.cmx")
|
||||
dest = "dart_aot_runner_test.cmx"
|
||||
},
|
||||
]
|
||||
|
||||
sources = []
|
||||
deps = [
|
||||
"//third_party/dart-pkg/pub/test",
|
||||
"//topaz/public/dart/fuchsia_services",
|
||||
"//topaz/runtime/dart_runner/examples/hello_app_dart/interfaces:interfaces",
|
||||
"//zircon/system/fidl/fuchsia-io",
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# 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.
|
||||
|
||||
include: ../../../tools/analysis_options.yaml
|
||||
@@ -1,62 +0,0 @@
|
||||
// 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 'dart:async';
|
||||
import 'dart:io' as io;
|
||||
|
||||
import 'package:fidl_fuchsia_examples_hello/fidl_async.dart';
|
||||
import 'package:fidl_fuchsia_io/fidl_async.dart';
|
||||
import 'package:fidl_fuchsia_sys/fidl_async.dart';
|
||||
import 'package:fuchsia_services/services.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main(List<String> args) {
|
||||
final StartupContext context = StartupContext.fromStartupInfo();
|
||||
LauncherProxy launcher;
|
||||
|
||||
setUp(() {
|
||||
launcher = LauncherProxy();
|
||||
context.incoming.connectToService(launcher);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
launcher.ctrl.close();
|
||||
launcher = null;
|
||||
});
|
||||
|
||||
// TODO(rosswang): nested environments and determinism
|
||||
|
||||
test('schedule delayed futures',
|
||||
() => Future<Null>.delayed(const Duration(seconds: 1)));
|
||||
|
||||
test('start hello_dart', () async {
|
||||
const LaunchInfo info = LaunchInfo(
|
||||
url:
|
||||
'fuchsia-pkg://fuchsia.com/hello_dart_jit#meta/hello_dart_jit.cmx');
|
||||
await launcher.createComponent(
|
||||
info, ComponentControllerProxy().ctrl.request());
|
||||
});
|
||||
|
||||
test('communicate with a fidl service (hello_app_dart)', () async {
|
||||
final HelloProxy service = HelloProxy();
|
||||
final incoming = Incoming();
|
||||
|
||||
final ComponentControllerProxy actl = ComponentControllerProxy();
|
||||
|
||||
final LaunchInfo info = LaunchInfo(
|
||||
url:
|
||||
'fuchsia-pkg://fuchsia.com/hello_app_dart_jit#meta/hello_app_dart_jit.cmx',
|
||||
directoryRequest: incoming.request().passChannel());
|
||||
await launcher.createComponent(info, actl.ctrl.request());
|
||||
incoming.connectToService(service);
|
||||
|
||||
expect(await service.say('hello'), equals('hola from Dart!'));
|
||||
|
||||
actl.ctrl.close();
|
||||
});
|
||||
|
||||
test('dart:io exit() throws UnsupportedError', () {
|
||||
expect(() => io.exit(-1), throwsUnsupportedError);
|
||||
});
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/dart_aot_runner_test"
|
||||
},
|
||||
"sandbox": {
|
||||
"services": [
|
||||
"fuchsia.cobalt.LoggerFactory",
|
||||
"fuchsia.fonts.Provider",
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.logger.LogSink",
|
||||
"fuchsia.modular.ContextWriter",
|
||||
"fuchsia.modular.ModuleContext",
|
||||
"fuchsia.netstack.Netstack",
|
||||
"fuchsia.sys.Environment",
|
||||
"fuchsia.sys.Launcher",
|
||||
"fuchsia.ui.input.ImeService",
|
||||
"fuchsia.ui.policy.Presenter",
|
||||
"fuchsia.ui.scenic.Scenic",
|
||||
"fuchsia.wlan.service.Wlan"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"program": {
|
||||
"data": "data/dart_jit_runner_test"
|
||||
},
|
||||
"sandbox": {
|
||||
"features": [
|
||||
"deprecated-ambient-replace-as-executable"
|
||||
],
|
||||
"services": [
|
||||
"fuchsia.cobalt.LoggerFactory",
|
||||
"fuchsia.fonts.Provider",
|
||||
"fuchsia.intl.PropertyProvider",
|
||||
"fuchsia.logger.LogSink",
|
||||
"fuchsia.modular.ContextWriter",
|
||||
"fuchsia.modular.ModuleContext",
|
||||
"fuchsia.netstack.Netstack",
|
||||
"fuchsia.sys.Environment",
|
||||
"fuchsia.sys.Launcher",
|
||||
"fuchsia.ui.input.ImeService",
|
||||
"fuchsia.ui.policy.Presenter",
|
||||
"fuchsia.ui.scenic.Scenic",
|
||||
"fuchsia.wlan.service.Wlan"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user