TEST_F(HTMLSelectElementTest, SetRecalcListItemsByOptgroupRemoval)
{
    document().documentElement()->setInnerHTML("<select><optgroup><option>sub1</option><option>sub2</option></optgroup></select>", ASSERT_NO_EXCEPTION);
    document().view()->updateAllLifecyclePhases();
    HTMLSelectElement* select = toHTMLSelectElement(document().body()->firstChild());
    select->setInnerHTML("", ASSERT_NO_EXCEPTION);
    // PASS if setInnerHTML didn't have a check failure.
}
 void SetUp() override
 {
     m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600));
     HTMLSelectElement* element = HTMLSelectElement::create(m_dummyPageHolder->document());
     // Set the 4th an 5th items to have "display: none" property
     element->setInnerHTML("<option><option><option><option style='display:none;'><option style='display:none;'><option><option>", ASSERT_NO_EXCEPTION);
     m_dummyPageHolder->document().body()->appendChild(element, ASSERT_NO_EXCEPTION);
     m_ownerElement = element;
     m_dummyPageHolder->document().updateStyleAndLayoutIgnorePendingStylesheets();
 }