| # Copyright 2019 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("//chrome/test/base/js2gtest.gni") |
| import("//third_party/closure_compiler/compile_js.gni") |
| |
| assert(is_chromeos, "Sample System Web App is Chrome OS only") |
| assert(!is_official_build, |
| "Sample System Web App is only built for unofficial builds") |
| |
| static_library("sample_system_web_app_ui") { |
| sources = [ |
| "sample_system_web_app_ui.cc", |
| "sample_system_web_app_ui.h", |
| "url_constants.cc", |
| "url_constants.h", |
| ] |
| |
| deps = [ |
| "//chromeos/constants", |
| "//chromeos/resources:sample_system_web_app_resources", |
| "//content/public/browser", |
| "//ui/webui", |
| ] |
| } |
| |
| js_type_check("closure_compile") { |
| deps = [ ":untrusted" ] |
| } |
| |
| js_library("untrusted") { |
| sources = [ "resources/untrusted.js" ] |
| } |
| |
| js2gtest("browser_tests_js") { |
| test_type = "mojo_lite_webui" |
| |
| sources = [ "test/sample_system_web_app_ui_browsertest.js" ] |
| |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| } |