Commit 944295e2 authored by Adenilson Cavalcanti's avatar Adenilson Cavalcanti Committed by Commit Bot

[zlib] Using relative header paths on unit tests

The idea is to allow building the utests outside of Chromium directory
structure, thus allowing to run the tests as part of AOSP or any other
downstream project.

Bug: 1032721
Change-Id: I21a93b35221a9f5438c8a50908af05725c28022a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2210904Reviewed-by: default avatarChris Blume <cblume@chromium.org>
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771939}
parent dc570cbb
......@@ -3508,7 +3508,7 @@ test("unit_tests") {
"../../base/path_service_unittest.cc",
"../../testing/gtest_mac_unittest.mm",
# Chromium's zlib unit tests
# Chromium's zlib unit tests.
"../../third_party/zlib/contrib/tests/infcover.cc",
"../../third_party/zlib/contrib/tests/infcover.h",
"../../third_party/zlib/contrib/tests/utils_unittest.cc",
......@@ -3517,6 +3517,13 @@ test("unit_tests") {
"../../third_party/zlib/google/zip_unittest.cc",
]
# Required by Chromium's zlib unit tests.
include_dirs = [
"//third_party/googletest/src/googletest/include/gtest",
"//third_party/zlib",
"//third_party/zlib/google",
]
if (enable_downgrade_processing) {
sources += [
"../browser/downgrade/snapshot_manager_unittest.cc",
......
......@@ -407,5 +407,11 @@ if (build_with_chromium) {
"//testing/gtest",
"//testing/gtest:gtest_main",
]
include_dirs = [
"//third_party/googletest/src/googletest/include/gtest",
".",
"google",
]
}
}
......@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the Chromium source repository LICENSE file.
#include "infcover.h"
#include <cstddef>
#include <vector>
#include "infcover.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/zlib/google/compression_utils_portable.h"
#include "compression_utils_portable.h"
#include "gtest.h"
#include "zlib.h"
void TestPayloads(size_t input_size, zlib_internal::WrapperType type) {
......
......@@ -2,4 +2,5 @@ include_rules = [
'+base',
'+build',
'+testing',
"+third_party/zlib/zlib.h",
]
......@@ -5,7 +5,7 @@
* found in the Chromium source repository LICENSE file.
*/
#include "third_party/zlib/google/compression_utils_portable.h"
#include "compression_utils_portable.h"
#include <stddef.h>
#include <stdlib.h>
......
......@@ -9,10 +9,13 @@
#include <stdint.h>
/* TODO(cavalcantii): remove support for Chromium ever building with a system
* zlib.
*/
#if defined(USE_SYSTEM_ZLIB)
#include <zlib.h>
#else
#include "third_party/zlib/zlib.h"
#include "zlib.h"
#endif
namespace zlib_internal {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment