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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/CompositionMarkerTest.cpp

Issue 2908643002: [DMC #23] Add CompositionMarker (subclass of DocumentMarker) (Closed)
Patch Set: Attempt to fix Android build by using EXPECT_FALSE() Created 3 years, 6 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 2017 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 "core/editing/markers/CompositionMarker.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace blink {
10
11 class CompositionMarkerTest : public ::testing::Test {};
12
13 TEST_F(CompositionMarkerTest, MarkerType) {
14 DocumentMarker* marker = new CompositionMarker(0, 1, Color::kTransparent,
15 false, Color::kTransparent);
16 EXPECT_EQ(DocumentMarker::kComposition, marker->GetType());
17 }
18
19 TEST_F(CompositionMarkerTest, ConstructorAndGetters) {
20 CompositionMarker* marker =
21 new CompositionMarker(0, 1, Color::kDarkGray, false, Color::kGray);
22 EXPECT_EQ(Color::kDarkGray, marker->UnderlineColor());
23 EXPECT_FALSE(marker->Thick());
24 EXPECT_EQ(Color::kGray, marker->BackgroundColor());
25
26 CompositionMarker* thick_marker =
27 new CompositionMarker(0, 1, Color::kDarkGray, true, Color::kGray);
28 EXPECT_EQ(true, thick_marker->Thick());
29 }
30
31 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698