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/ActiveSuggestionMarker.h" |
| 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 |
| 9 namespace blink { |
| 10 |
| 11 class ActiveSuggestionMarkerTest : public ::testing::Test {}; |
| 12 |
| 13 TEST_F(ActiveSuggestionMarkerTest, MarkerType) { |
| 14 DocumentMarker* marker = new ActiveSuggestionMarker( |
| 15 0, 1, Color::kTransparent, StyleableMarker::Thickness::kThin, |
| 16 Color::kTransparent); |
| 17 EXPECT_EQ(DocumentMarker::kActiveSuggestion, marker->GetType()); |
| 18 } |
| 19 |
| 20 TEST_F(ActiveSuggestionMarkerTest, IsStyleableMarker) { |
| 21 DocumentMarker* marker = new ActiveSuggestionMarker( |
| 22 0, 1, Color::kTransparent, StyleableMarker::Thickness::kThin, |
| 23 Color::kTransparent); |
| 24 EXPECT_TRUE(IsStyleableMarker(*marker)); |
| 25 } |
| 26 |
| 27 TEST_F(ActiveSuggestionMarkerTest, ConstructorAndGetters) { |
| 28 ActiveSuggestionMarker* marker = new ActiveSuggestionMarker( |
| 29 0, 1, Color::kDarkGray, StyleableMarker::Thickness::kThin, Color::kGray); |
| 30 EXPECT_EQ(Color::kDarkGray, marker->UnderlineColor()); |
| 31 EXPECT_FALSE(marker->IsThick()); |
| 32 EXPECT_EQ(Color::kGray, marker->BackgroundColor()); |
| 33 |
| 34 ActiveSuggestionMarker* thick_marker = new ActiveSuggestionMarker( |
| 35 0, 1, Color::kDarkGray, StyleableMarker::Thickness::kThick, Color::kGray); |
| 36 EXPECT_EQ(true, thick_marker->IsThick()); |
| 37 } |
| 38 |
| 39 } // namespace blink |
OLD | NEW |