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

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

Issue 2923033002: [ActiveSuggestionMarker #2] Add ActiveSuggestionMarker (Closed)
Patch Set: Update comment on ActiveSuggestionMarker.h 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/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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698