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 // Use this file to assert that *_list.h enums that are meant to do the bridge
6 // from Blink are valid.
8 #include "base/macros.h"
9 #include "cc/animation/animation.h"
10 #include "content/public/common/screen_orientation_values.h"
11 #include "net/base/mime_util.h"
12 #include "third_party/WebKit/public/platform/WebAnimation.h"
13 #include "third_party/WebKit/public/platform/WebMimeRegistry.h"
14 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
18 #define COMPILE_ASSERT_MATCHING_ENUM(expected, actual) \
19 COMPILE_ASSERT(int(expected) == int(actual), mismatching_enums)
21 // ScreenOrientationValues
22 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockDefault
,
24 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitPrimary
,
26 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitSecondary
,
28 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapePrimary
,
30 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapeSecondary
,
32 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockAny
,
34 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscape
,
36 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortrait
,
38 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockNatural
,
42 COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsNotSupported
,
44 COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsSupported
,
46 COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::MayBeSupported
,
50 COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyTransform
,
51 cc::Animation::Transform
);
52 COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyOpacity
,
53 cc::Animation::Opacity
);
54 COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyFilter
,
55 cc::Animation::Filter
);
56 COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyScrollOffset
,
57 cc::Animation::ScrollOffset
);
59 } // namespace content