xref: /aosp_15_r20/external/cronet/base/win/win_includes_unittest.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2014 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // This file ensures that these header files don't include Windows.h and can
6 // compile without including Windows.h. This helps to improve compile times.
7 
8 #include "base/atomicops.h"
9 #include "base/files/file_util.h"
10 #include "base/files/platform_file.h"
11 #include "base/process/process_handle.h"
12 #include "base/synchronization/condition_variable.h"
13 #include "base/synchronization/lock.h"
14 #include "base/threading/platform_thread.h"
15 #include "base/threading/thread_local_storage.h"
16 #include "base/win/registry.h"
17 #include "base/win/scoped_handle.h"
18 #include "base/win/win_util.h"
19 #include "partition_alloc/partition_alloc-inl.h"
20 #include "partition_alloc/partition_tls.h"
21 #include "partition_alloc/spinning_mutex.h"
22 
23 #ifdef _WINDOWS_
24 #error Windows.h was included inappropriately.
25 #endif
26 
27 // Make sure windows.h can be included after windows_types.h
28 #include "base/win/windows_types.h"
29 
30 // windows.h must be included before objidl.h
31 #include <windows.h>  // NOLINT(build/include_order)
32 
33 #include <objidl.h>  // NOLINT(build/include_order)
34 
35 // Check that type sizes match.
36 static_assert(sizeof(CHROME_CONDITION_VARIABLE) == sizeof(CONDITION_VARIABLE),
37               "Definition mismatch.");
38 static_assert(sizeof(CHROME_SRWLOCK) == sizeof(SRWLOCK),
39               "Definition mismatch.");
40 static_assert(sizeof(CHROME_WIN32_FIND_DATA) == sizeof(WIN32_FIND_DATA),
41               "Definition mismatch.");
42 static_assert(sizeof(CHROME_FORMATETC) == sizeof(FORMATETC),
43               "Definition mismatch.");
44 static_assert(sizeof(CHROME_LUID) == sizeof(LUID), "Definition mismatch.");
45 static_assert(sizeof(CHROME_MSG) == sizeof(MSG), "Definition mismatch.");
46