OLD | NEW |
(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 |
OLD | NEW |