OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/html/HTMLFormControlElement.h" | 5 #include "core/html/HTMLFormControlElement.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
8 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
9 #include "core/html/HTMLInputElement.h" | 10 #include "core/html/HTMLInputElement.h" |
10 #include "core/layout/LayoutObject.h" | 11 #include "core/layout/LayoutObject.h" |
11 #include "core/loader/EmptyClients.h" | 12 #include "core/loader/EmptyClients.h" |
12 #include "core/testing/DummyPageHolder.h" | 13 #include "core/testing/DummyPageHolder.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 #include <memory> | |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 | 17 |
18 class HTMLFormControlElementTest : public ::testing::Test { | 18 class HTMLFormControlElementTest : public ::testing::Test { |
19 protected: | 19 protected: |
20 void SetUp() override; | 20 void SetUp() override; |
21 | 21 |
22 DummyPageHolder& page() const { return *m_dummyPageHolder; } | 22 DummyPageHolder& page() const { return *m_dummyPageHolder; } |
23 Document& document() const { return *m_document; } | 23 Document& document() const { return *m_document; } |
24 | 24 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 input->setCustomValidity(String()); | 77 input->setCustomValidity(String()); |
78 message = input->validationMessage().stripWhiteSpace(); | 78 message = input->validationMessage().stripWhiteSpace(); |
79 subMessage = input->validationSubMessage().stripWhiteSpace(); | 79 subMessage = input->validationSubMessage().stripWhiteSpace(); |
80 input->findCustomValidationMessageTextDirection(message, messageDir, | 80 input->findCustomValidationMessageTextDirection(message, messageDir, |
81 subMessage, subMessageDir); | 81 subMessage, subMessageDir); |
82 EXPECT_EQ(TextDirection::kLtr, messageDir); | 82 EXPECT_EQ(TextDirection::kLtr, messageDir); |
83 EXPECT_EQ(TextDirection::kRtl, subMessageDir); | 83 EXPECT_EQ(TextDirection::kRtl, subMessageDir); |
84 } | 84 } |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
OLD | NEW |