chromium/chrome/services/sharing/nearby/decoder/BUILD.gn

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

import("//build/config/chromeos/ui_mode.gni")
import("//testing/libfuzzer/fuzzer_test.gni")

assert(is_chromeos_ash)

source_set("decoder") {
  sources = [
    "advertisement_decoder.cc",
    "advertisement_decoder.h",
    "nearby_decoder.cc",
    "nearby_decoder.h",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  public_deps = [
    "//base",
    "//chrome/services/sharing/public/cpp",
    "//chrome/services/sharing/public/proto",
    "//chromeos/ash/services/nearby/public/mojom",
    "//mojo/public/cpp/bindings",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "advertisement_decoder_unittest.cc",
    "nearby_decoder_unittest.cc",
  ]

  deps = [
    ":decoder",
    "//base/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

fuzzer_test("nearby_decoder_decode_advertisement_fuzzer") {
  sources = [ "nearby_decoder_decode_advertisement_fuzzer.cc" ]
  deps = [
    ":decoder",
    "//base",
    "//mojo/core/embedder",
  ]
}

fuzzer_test("nearby_decoder_decode_frame_fuzzer") {
  sources = [ "nearby_decoder_decode_frame_fuzzer.cc" ]
  deps = [
    ":decoder",
    "//base",
    "//mojo/core/embedder",
  ]
}