Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/CompositorElementIdTest.cpp

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: Merge branch 'master' into secondaryid Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #include "platform/graphics/CompositorElementId.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace blink {
10
11 class CompositorElementIdTest : public ::testing::Test {};
12
13 TEST_F(CompositorElementIdTest, EncodeDecode) {
14 CompositorElementId element_id =
15 CreateCompositorElementId(1, CompositorSubElementId::kPrimary);
16 EXPECT_EQ(1u, DomNodeIdFromCompositorElementId(element_id));
17 EXPECT_EQ(CompositorSubElementId::kPrimary,
18 SubElementIdFromCompositorElementId(element_id));
19
20 element_id =
21 CreateCompositorElementId(1, CompositorSubElementId::kLinkHighlight);
22 EXPECT_EQ(1u, DomNodeIdFromCompositorElementId(element_id));
23 EXPECT_EQ(CompositorSubElementId::kLinkHighlight,
24 SubElementIdFromCompositorElementId(element_id));
25
26 element_id = CreateCompositorElementId(23, CompositorSubElementId::kScroll);
27 EXPECT_EQ(23u, DomNodeIdFromCompositorElementId(element_id));
28 EXPECT_EQ(CompositorSubElementId::kScroll,
29 SubElementIdFromCompositorElementId(element_id));
30 }
31
32 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698