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/HTMLInputElement.h" | 5 #include "core/html/HTMLInputElement.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
8 #include "core/frame/FrameHost.h" | 9 #include "core/frame/FrameHost.h" |
9 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
10 #include "core/frame/VisualViewport.h" | 11 #include "core/frame/VisualViewport.h" |
11 #include "core/html/HTMLBodyElement.h" | 12 #include "core/html/HTMLBodyElement.h" |
12 #include "core/html/HTMLFormElement.h" | 13 #include "core/html/HTMLFormElement.h" |
13 #include "core/html/HTMLHtmlElement.h" | 14 #include "core/html/HTMLHtmlElement.h" |
14 #include "core/html/HTMLOptionElement.h" | 15 #include "core/html/HTMLOptionElement.h" |
15 #include "core/html/forms/DateTimeChooser.h" | 16 #include "core/html/forms/DateTimeChooser.h" |
16 #include "core/testing/DummyPageHolder.h" | 17 #include "core/testing/DummyPageHolder.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 #include <memory> | |
19 | 19 |
20 namespace blink { | 20 namespace blink { |
21 | 21 |
22 class HTMLInputElementTest : public testing::Test { | 22 class HTMLInputElementTest : public testing::Test { |
23 protected: | 23 protected: |
24 Document& document() { return m_pageHolder->document(); } | 24 Document& document() { return m_pageHolder->document(); } |
25 HTMLInputElement& testElement() { | 25 HTMLInputElement& testElement() { |
26 Element* element = document().getElementById("test"); | 26 Element* element = document().getElementById("test"); |
27 DCHECK(element); | 27 DCHECK(element); |
28 return toHTMLInputElement(*element); | 28 return toHTMLInputElement(*element); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 HTMLInputElement* input = toHTMLInputElement(document().body()->firstChild()); | 156 HTMLInputElement* input = toHTMLInputElement(document().body()->firstChild()); |
157 | 157 |
158 DateTimeChooserParameters params; | 158 DateTimeChooserParameters params; |
159 bool success = input->setupDateTimeChooserParameters(params); | 159 bool success = input->setupDateTimeChooserParameters(params); |
160 EXPECT_TRUE(success); | 160 EXPECT_TRUE(success); |
161 EXPECT_EQ("date", params.type); | 161 EXPECT_EQ("date", params.type); |
162 EXPECT_EQ(IntRect(16, 16, 400, 100), params.anchorRectInScreen); | 162 EXPECT_EQ(IntRect(16, 16, 400, 100), params.anchorRectInScreen); |
163 } | 163 } |
164 | 164 |
165 } // namespace blink | 165 } // namespace blink |
OLD | NEW |