| 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/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 Loading... |
| 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 |
| OLD | NEW |