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 "third_party/blink/renderer/core/editing/markers/spelling_marker.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace blink {
10
11 const char* const kTestDescription = "Test description";
12
13 class SpellingMarkerTest : public testing::Test {};
14
TEST_F(SpellingMarkerTest,MarkerType)15 TEST_F(SpellingMarkerTest, MarkerType) {
16 DocumentMarker* marker =
17 MakeGarbageCollected<SpellingMarker>(0, 1, kTestDescription);
18 EXPECT_EQ(DocumentMarker::kSpelling, marker->GetType());
19 }
20
TEST_F(SpellingMarkerTest,IsSpellCheckMarker)21 TEST_F(SpellingMarkerTest, IsSpellCheckMarker) {
22 DocumentMarker* marker =
23 MakeGarbageCollected<SpellingMarker>(0, 1, kTestDescription);
24 EXPECT_TRUE(IsSpellCheckMarker(*marker));
25 }
26
TEST_F(SpellingMarkerTest,ConstructorAndGetters)27 TEST_F(SpellingMarkerTest, ConstructorAndGetters) {
28 SpellingMarker* marker =
29 MakeGarbageCollected<SpellingMarker>(0, 1, kTestDescription);
30 EXPECT_EQ(kTestDescription, marker->Description());
31 }
32
33 } // namespace blink
34