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

Unified Diff: third_party/WebKit/Source/core/editing/markers/CompositionMarkerTest.cpp

Issue 2922233002: [ActiveSuggestionMarker #1] Introduce abstract StyleableMarker subclass of DocumentMarker (Closed)
Patch Set: Add test for IsStyleableMarker() 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/markers/CompositionMarkerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/CompositionMarkerTest.cpp b/third_party/WebKit/Source/core/editing/markers/CompositionMarkerTest.cpp
index 3db1f7ebd699ff6512ea7a232a377460cc2ea8a3..942e84a6d561aed8fd83b910e3c21b4040490b50 100644
--- a/third_party/WebKit/Source/core/editing/markers/CompositionMarkerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/CompositionMarkerTest.cpp
@@ -12,22 +12,27 @@ class CompositionMarkerTest : public ::testing::Test {};
TEST_F(CompositionMarkerTest, MarkerType) {
DocumentMarker* marker = new CompositionMarker(
- 0, 1, Color::kTransparent, CompositionMarker::Thickness::kThin,
+ 0, 1, Color::kTransparent, StyleableMarker::Thickness::kThin,
Color::kTransparent);
EXPECT_EQ(DocumentMarker::kComposition, marker->GetType());
}
+TEST_F(CompositionMarkerTest, IsStyleableMarker) {
+ DocumentMarker* marker = new CompositionMarker(
+ 0, 1, Color::kTransparent, StyleableMarker::Thickness::kThin,
+ Color::kTransparent);
+ EXPECT_TRUE(IsStyleableMarker(*marker));
+}
+
TEST_F(CompositionMarkerTest, ConstructorAndGetters) {
- CompositionMarker* marker =
- new CompositionMarker(0, 1, Color::kDarkGray,
- CompositionMarker::Thickness::kThin, Color::kGray);
+ CompositionMarker* marker = new CompositionMarker(
+ 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());
- CompositionMarker* thick_marker =
- new CompositionMarker(0, 1, Color::kDarkGray,
- CompositionMarker::Thickness::kThick, Color::kGray);
+ CompositionMarker* thick_marker = new CompositionMarker(
+ 0, 1, Color::kDarkGray, StyleableMarker::Thickness::kThick, Color::kGray);
EXPECT_EQ(true, thick_marker->IsThick());
}

Powered by Google App Engine
This is Rietveld 408576698