| 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..3b6f1893e30aac35d13a6fabe06afe4c92497464
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarkerTest.cpp
|
| @@ -0,0 +1,39 @@
|
| +// 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, StyleableMarker::Thickness::kThin,
|
| + Color::kTransparent);
|
| + EXPECT_EQ(DocumentMarker::kActiveSuggestion, marker->GetType());
|
| +}
|
| +
|
| +TEST_F(ActiveSuggestionMarkerTest, IsStyleableMarker) {
|
| + DocumentMarker* marker = new ActiveSuggestionMarker(
|
| + 0, 1, Color::kTransparent, StyleableMarker::Thickness::kThin,
|
| + Color::kTransparent);
|
| + EXPECT_TRUE(IsStyleableMarker(*marker));
|
| +}
|
| +
|
| +TEST_F(ActiveSuggestionMarkerTest, ConstructorAndGetters) {
|
| + ActiveSuggestionMarker* marker = new ActiveSuggestionMarker(
|
| + 0, 1, Color::kDarkGray, StyleableMarker::Thickness::kThin, Color::kGray);
|
| + EXPECT_EQ(Color::kDarkGray, marker->UnderlineColor());
|
| + EXPECT_FALSE(marker->IsThick());
|
| + EXPECT_EQ(Color::kGray, marker->BackgroundColor());
|
| +
|
| + ActiveSuggestionMarker* thick_marker = new ActiveSuggestionMarker(
|
| + 0, 1, Color::kDarkGray, StyleableMarker::Thickness::kThick, Color::kGray);
|
| + EXPECT_EQ(true, thick_marker->IsThick());
|
| +}
|
| +
|
| +} // namespace blink
|
|
|