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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: comments Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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 "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/FrameHost.h" 8 #include "core/frame/FrameHost.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/VisualViewport.h" 10 #include "core/frame/VisualViewport.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ->setInnerHTML("<input type='range' />", ASSERT_NO_EXCEPTION); 112 ->setInnerHTML("<input type='range' />", ASSERT_NO_EXCEPTION);
113 documentWithoutFrame->appendChild(html); 113 documentWithoutFrame->appendChild(html);
114 114
115 std::unique_ptr<DummyPageHolder> pageHolder = DummyPageHolder::create(); 115 std::unique_ptr<DummyPageHolder> pageHolder = DummyPageHolder::create();
116 auto& document = pageHolder->document(); 116 auto& document = pageHolder->document();
117 EXPECT_NE(nullptr, document.frameHost()); 117 EXPECT_NE(nullptr, document.frameHost());
118 118
119 // Put the input element inside a document with frame. 119 // Put the input element inside a document with frame.
120 document.body()->appendChild(documentWithoutFrame->body()->firstChild()); 120 document.body()->appendChild(documentWithoutFrame->body()->firstChild());
121 121
122 // Remove the input element and all refs to it so it gets deleted before the d ocument. 122 // Remove the input element and all refs to it so it gets deleted before the
123 // The assert in |EventHandlerRegistry::updateEventHandlerTargets()| should no t be triggered. 123 // document.
124 // The assert in |EventHandlerRegistry::updateEventHandlerTargets()| should
125 // not be triggered.
124 document.body()->removeChild(document.body()->firstChild()); 126 document.body()->removeChild(document.body()->firstChild());
125 } 127 }
126 128
127 TEST_F(HTMLInputElementTest, DefaultToolTip) { 129 TEST_F(HTMLInputElementTest, DefaultToolTip) {
128 HTMLInputElement* inputWithoutForm = 130 HTMLInputElement* inputWithoutForm =
129 HTMLInputElement::create(document(), nullptr, false); 131 HTMLInputElement::create(document(), nullptr, false);
130 inputWithoutForm->setBooleanAttribute(HTMLNames::requiredAttr, true); 132 inputWithoutForm->setBooleanAttribute(HTMLNames::requiredAttr, true);
131 document().body()->appendChild(inputWithoutForm); 133 document().body()->appendChild(inputWithoutForm);
132 EXPECT_EQ("<<ValidationValueMissing>>", inputWithoutForm->defaultToolTip()); 134 EXPECT_EQ("<<ValidationValueMissing>>", inputWithoutForm->defaultToolTip());
133 135
(...skipping 30 matching lines...) Expand all
164 HTMLInputElement* input = toHTMLInputElement(document().body()->firstChild()); 166 HTMLInputElement* input = toHTMLInputElement(document().body()->firstChild());
165 167
166 DateTimeChooserParameters params; 168 DateTimeChooserParameters params;
167 bool success = input->setupDateTimeChooserParameters(params); 169 bool success = input->setupDateTimeChooserParameters(params);
168 EXPECT_TRUE(success); 170 EXPECT_TRUE(success);
169 EXPECT_EQ("date", params.type); 171 EXPECT_EQ("date", params.type);
170 EXPECT_EQ(IntRect(16, 16, 400, 100), params.anchorRectInScreen); 172 EXPECT_EQ(IntRect(16, 16, 400, 100), params.anchorRectInScreen);
171 } 173 }
172 174
173 } // namespace blink 175 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLKeygenElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698