Roll src/third_party/WebKit 9301d6f:4619053 (svn 201058:201059)
[chromium-blink-merge.git] / sql / correct_sql_test_base.h
blob7056dea19abf76e74b68fe00fc5bbc5c47b94fb0
1 // Copyright 2015 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 #ifndef SQL_CORRECT_SQL_TEST_BASE_H_
6 #define SQL_CORRECT_SQL_TEST_BASE_H_
8 // This header exists to get around gn check. We want to use the same testing
9 // code in both the sql_unittests target (which uses gtest and targets the
10 // filesystem directly) and sql_apptests.mojo (which uses mojo:apptest and
11 // proxies the additional filesystem access to mojo:filesystem). Both of these
12 // files define a class named sql::SQLTestBase and have the same interface.
14 // Unfortunately, gn check does not understand preprocessor directives. If it
15 // did, the following code would be gn check clean, but since it isn't, we
16 // stuff this redirection header in its own file, give it its own source_set
17 // target, and then set check_includes to false.
19 // This work around was suggested by brettw@.
20 #if defined(MOJO_APPTEST_IMPL)
21 #include "sql/mojo/sql_test_base.h"
22 #else
23 #include "sql/test/sql_test_base.h"
24 #endif
26 #endif // SQL_CORRECT_SQL_TEST_BASE_H_