Add some missing owners for SBClientPhishing.* histograms.
[chromium-blink-merge.git] / sql / BUILD.gn
blob57f1b38efd9874e561e81abb89ef419be3e578c3
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 component("sql") {
8   sources = [
9     "connection.cc",
10     "connection.h",
11     "error_delegate_util.cc",
12     "error_delegate_util.h",
13     "init_status.h",
14     "meta_table.cc",
15     "meta_table.h",
16     "recovery.cc",
17     "recovery.h",
18     "statement.cc",
19     "statement.h",
20     "transaction.cc",
21     "transaction.h",
22   ]
24   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
25   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
27   defines = [ "SQL_IMPLEMENTATION" ]
29   deps = [
30     "//base",
31     "//third_party/sqlite",
32     "//base/third_party/dynamic_annotations",
33   ]
36 source_set("test_support") {
37   testonly = true
38   sources = [
39     "test/error_callback_support.cc",
40     "test/error_callback_support.h",
41     "test/scoped_error_ignorer.cc",
42     "test/scoped_error_ignorer.h",
43     "test/test_helpers.cc",
44     "test/test_helpers.h",
45   ]
47   deps = [
48     ":sql",
49     "//base",
50     "//testing/gtest",
51     "//third_party/sqlite",
52   ]
55 source_set("redirection_header") {
56   # This target exists because we need a way to switch between
57   # "test/sql_test_base.h" and "mojo/sql_test_base.h" at compile time, to allow
58   # us to switch out the gtest vs mojo:apptest frameworks.
59   check_includes = false
61   sources = [
62     "correct_sql_test_base.h",
63   ]
66 # TODO(GYP): Delete this after we've converted everything to GN.
67 # The _run targets exist only for compatibility w/ GYP.
68 group("sql_unittests_run") {
69   testonly = true
70   deps = [
71     ":sql_unittests",
72   ]
75 test("sql_unittests") {
76   sources = [
77     "connection_unittest.cc",
78     "meta_table_unittest.cc",
79     "recovery_unittest.cc",
80     "sqlite_features_unittest.cc",
81     "statement_unittest.cc",
82     "test/paths.cc",
83     "test/paths.h",
84     "test/run_all_unittests.cc",
85     "test/sql_test_base.cc",
86     "test/sql_test_base.h",
87     "test/sql_test_suite.cc",
88     "test/sql_test_suite.h",
89     "transaction_unittest.cc",
90   ]
92   data = [
93     "test/data/",
94   ]
96   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
97   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
99   deps = [
100     ":sql",
101     ":redirection_header",
102     ":test_support",
103     "//base/allocator",
104     "//base/test:test_support",
105     "//testing/gtest",
106     "//third_party/sqlite",
107   ]
109   if (is_android) {
110     isolate_file = "sql_unittests.isolate"
111   }
113   # TODO(GYP)
114   #['OS == "android"', {
115   #  'dependencies': [
116   #    '../testing/android/native_test.gyp:native_test_native_code',
117   #  ],
118   #}],
121 if (is_android) {
122   #TODO(GYP)
123   #'target_name': 'sql_unittests_apk',
124   #'type': 'none',
125   #'dependencies': [
126   #  'sql_unittests',
127   #],
128   #'variables': {
129   #  'test_suite_name': 'sql_unittests',
130   #},
131   #'includes': [ '../build/apk_test.gypi' ],