| # Copyright 2019 The Fuchsia 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/config.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/testing/environments.gni") |
| import("//build/testing/flutter_driver.gni") |
| import("//topaz/runtime/dart/dart_fuchsia_test.gni") |
| import("//topaz/runtime/dart/flutter_test.gni") |
| import("//topaz/runtime/flutter_runner/flutter_app.gni") |
| |
| flutter_app("simple_browser") { |
| main_dart = "lib/main.dart" |
| package_name = "simple_browser" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/simple_browser.cmx") |
| dest = "simple_browser.cmx" |
| }, |
| ] |
| |
| manifest = "pubspec.yaml" |
| |
| sources = [ |
| "main.dart", |
| "src/blocs/tabs_bloc.dart", |
| "src/models/tabs_action.dart", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.intl", |
| "//sdk/fidl/fuchsia.ui.shortcut", |
| "//sdk/fidl/fuchsia.web", |
| "//src/experiences/bin/simple_browser_internationalization:internationalization", |
| "//src/experiences/session_shells/ermine/keyboard_shortcuts", |
| "//third_party/dart-pkg/git/flutter/packages/flutter", |
| "//third_party/dart-pkg/pub/html_unescape", |
| "//third_party/dart-pkg/pub/http", |
| "//third_party/dart/third_party/pkg/intl", |
| "//topaz/public/dart/fuchsia_logger", |
| "//topaz/public/dart/fuchsia_scenic_flutter", |
| "//topaz/public/dart/fuchsia_services", |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("config/keyboard_shortcuts.json") |
| dest = "keyboard_shortcuts.json" |
| }, |
| ] |
| } |
| |
| # fx run-host-tests simple_browser_unittests |
| flutter_test("simple_browser_unittests") { |
| sources = [ |
| "browser_shortcuts_test.dart", |
| "sanitize_url_test.dart", |
| "simple_browser_test.dart", |
| "tabs_bloc_test.dart", |
| "tld_checker_test.dart", |
| "webpage_bloc_test.dart", |
| "widgets/error_page_test.dart", |
| "widgets/history_buttons_test.dart", |
| "widgets/navigation_bar_test.dart", |
| "widgets/navigation_field_test.dart", |
| "widgets/tabs_widget_test.dart", |
| ] |
| |
| deps = [ |
| ":simple_browser_dart_library", |
| "//sdk/fidl/fuchsia.web", |
| "//third_party/dart-pkg/git/flutter/packages/flutter_test", |
| "//third_party/dart-pkg/pub/mockito", |
| "//third_party/dart-pkg/pub/test", |
| ] |
| } |
| |
| # fx run-test simple_browser_target_test |
| dart_fuchsia_test("simple_browser_target_test") { |
| meta = [ |
| { |
| path = rebase_path("meta/simple_browser_target_test.cmx") |
| dest = "simple_browser_target_test.cmx" |
| }, |
| ] |
| |
| sources = [ |
| "simple_browser_target_test.dart", |
| ] |
| |
| deps = [ |
| ":simple_browser_dart_library", |
| "//third_party/dart-pkg/git/flutter/packages/flutter_test", |
| "//third_party/dart-pkg/pub/test", |
| ] |
| |
| environments = basic_envs |
| } |
| |
| config_data("web_engine_config") { |
| for_pkg = "web_engine" |
| |
| outputs = [ |
| "config.json", |
| ] |
| |
| sources = [ |
| "config/web_engine.json", |
| ] |
| } |