| Index: third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarkerTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarkerTest.cpp b/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarkerTest.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..48053fef0ad9fb85f96e0c5873d99f5847116904
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarkerTest.cpp
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "core/editing/markers/ActiveSuggestionMarker.h"
|
| +
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class ActiveSuggestionMarkerTest : public ::testing::Test {};
|
| +
|
| +TEST_F(ActiveSuggestionMarkerTest, MarkerType) {
|
| + DocumentMarker* marker = new ActiveSuggestionMarker(
|
| + 0, 1, Color::kTransparent, ActiveSuggestionMarker::Thickness::kThin,
|
| + Color::kTransparent);
|
| + EXPECT_EQ(DocumentMarker::kActiveSuggestion, marker->GetType());
|
| +}
|
| +
|
| +TEST_F(ActiveSuggestionMarkerTest, IsMarkerWithFormatting) {
|
| + DocumentMarker* marker = new ActiveSuggestionMarker(
|
| + 0, 1, Color::kDarkGray, ActiveSuggestionMarker::Thickness::kThin,
|
| + Color::kGray);
|
| + EXPECT_TRUE(IsMarkerWithFormatting(*marker));
|
| +}
|
| +
|
| +TEST_F(ActiveSuggestionMarkerTest, ConstructorAndGetters) {
|
| + ActiveSuggestionMarker* marker = new ActiveSuggestionMarker(
|
| + 0, 1, Color::kDarkGray, ActiveSuggestionMarker::Thickness::kThin,
|
| + Color::kGray);
|
| + EXPECT_EQ(Color::kDarkGray, marker->UnderlineColor());
|
| + EXPECT_EQ(false, marker->IsThick());
|
| + EXPECT_EQ(Color::kGray, marker->BackgroundColor());
|
| +
|
| + ActiveSuggestionMarker* thick_marker = new ActiveSuggestionMarker(
|
| + 0, 1, Color::kDarkGray, ActiveSuggestionMarker::Thickness::kThick,
|
| + Color::kGray);
|
| + EXPECT_EQ(true, thick_marker->IsThick());
|
| +}
|
| +
|
| +} // namespace blink
|
|
|