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

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

Issue 2103663006: Update a comment and fix a possible crash in HTMLSelectElement::setRecalcListItems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSelectElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/HTMLSelectElement.h" 5 #include "core/html/HTMLSelectElement.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/html/HTMLDocument.h" 8 #include "core/html/HTMLDocument.h"
9 #include "core/html/HTMLFormElement.h" 9 #include "core/html/HTMLFormElement.h"
10 #include "core/html/forms/FormController.h" 10 #include "core/html/forms/FormController.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 EXPECT_EQ(String(), select->defaultToolTip()) << "defaultToolTip for SELECT with FORM[novalidate] and required attribute should return null string."; 334 EXPECT_EQ(String(), select->defaultToolTip()) << "defaultToolTip for SELECT with FORM[novalidate] and required attribute should return null string.";
335 EXPECT_EQ(select->defaultToolTip(), option->defaultToolTip()); 335 EXPECT_EQ(select->defaultToolTip(), option->defaultToolTip());
336 EXPECT_EQ(select->defaultToolTip(), optgroup->defaultToolTip()); 336 EXPECT_EQ(select->defaultToolTip(), optgroup->defaultToolTip());
337 337
338 option->remove(); 338 option->remove();
339 optgroup->remove(); 339 optgroup->remove();
340 EXPECT_EQ(String(), option->defaultToolTip()); 340 EXPECT_EQ(String(), option->defaultToolTip());
341 EXPECT_EQ(String(), optgroup->defaultToolTip()); 341 EXPECT_EQ(String(), optgroup->defaultToolTip());
342 } 342 }
343 343
344 TEST_F(HTMLSelectElementTest, SetRecalcListItemsByOptgroupRemoval)
345 {
346 document().documentElement()->setInnerHTML("<select><optgroup><option>sub1</ option><option>sub2</option></optgroup></select>", ASSERT_NO_EXCEPTION);
347 document().view()->updateAllLifecyclePhases();
348 HTMLSelectElement* select = toHTMLSelectElement(document().body()->firstChil d());
349 select->setInnerHTML("", ASSERT_NO_EXCEPTION);
350 // PASS if setInnerHTML didn't have a check failure.
351 }
352
344 } // namespace blink 353 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSelectElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698