# Copyright 2016 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("//mojo/public/tools/bindings/mojom.gni")

mojom("payment_request") {
  sources = [
    "payment_request.mojom",
  ]

  public_deps = [
    "//mojo/common:common_custom_types",
  ]
}

mojom("payment_app") {
  sources = [
    "payment_app.mojom",
  ]

  public_deps = [
    "//mojo/common:common_custom_types",
  ]
}

static_library("payment_validation") {
  sources = [
    "payment_details_validation.cc",
    "payment_details_validation.h",
    "payments_validators.cc",
    "payments_validators.h",
  ]

  deps = [
    ":payment_request",
    "//base",
    "//third_party/re2:re2",
    "//url:url",
  ]
}

static_library("unit_tests") {
  testonly = true
  sources = [
    "payments_validators_test.cc",
  ]

  deps = [
    ":payment_validation",
    "//testing/gtest",
  ]
}
