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

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: none 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.
pdr. 2017/05/08 22:01:49 2017
chrishtr 2017/05/09 04:22:31 Done.
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 = CreateCompositorElementId(1, kPrimary);
15 EXPECT_EQ(1, DomNodeIdFromCompositorElementId(element_id));
16 EXPECT_EQ(kPrimary, SubElementIdFromCompositorElementId(element_id));
17
18 element_id = CreateCompositorElementId(1, kLinkHighlight);
19 EXPECT_EQ(1, DomNodeIdFromCompositorElementId(element_id));
20 EXPECT_EQ(kLinkHighlight, SubElementIdFromCompositorElementId(element_id));
21
22 element_id = CreateCompositorElementId(23, kScroll);
23 EXPECT_EQ(23, DomNodeIdFromCompositorElementId(element_id));
24 EXPECT_EQ(kScroll, SubElementIdFromCompositorElementId(element_id));
25 }
26
27 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698