# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "qr_scanner_view_controller_egtest.mm" ]
  deps = [
    ":eg_test_support+eg2",
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/scanner/ui_bundled:camera_state",
    "//ios/chrome/browser/settings/ui_bundled:eg_test_support+eg2",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//net",
    "//net:test_support",
    "//third_party/ocmock",
    "//ui/base",
  ]
  frameworks = [
    "AVFoundation.framework",
    "UIKit.framework",
  ]
}

source_set("eg_app_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "qr_scanner_app_interface.h",
    "qr_scanner_app_interface.mm",
  ]
  deps = [
    "//base",
    "//components/version_info",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/composebox/coordinator",
    "//ios/chrome/browser/location_bar/ui_bundled",
    "//ios/chrome/browser/location_bar/ui_bundled:protocols",
    "//ios/chrome/browser/qr_scanner/ui",
    "//ios/chrome/browser/scanner/ui_bundled",
    "//ios/chrome/browser/scanner/ui_bundled:camera_state",
    "//ios/chrome/browser/search_engines/model",
    "//ios/chrome/browser/shared/coordinator/scene:scene_state_header",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/url_loading/model",
    "//ios/chrome/test/app:test_support",
    "//ios/testing:nserror_support",
    "//net",
    "//third_party/ocmock",
    "//ui/base",
  ]
}

source_set("eg_test_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true

  sources = [
    "qr_scanner_app_interface.h",
    "qr_scanner_app_interface_stub.mm",
  ]
  deps = [
    "//ios/chrome/browser/scanner/ui_bundled:camera_state",
    "//ios/testing/earl_grey:eg_test_support+eg2",
  ]
}
