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 <memory> |
7 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
8 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
9 #include "core/html/HTMLFormElement.h" | 10 #include "core/html/HTMLFormElement.h" |
10 #include "core/html/forms/FormController.h" | 11 #include "core/html/forms/FormController.h" |
11 #include "core/loader/EmptyClients.h" | 12 #include "core/loader/EmptyClients.h" |
12 #include "core/testing/DummyPageHolder.h" | 13 #include "core/testing/DummyPageHolder.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 #include <memory> | |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 | 17 |
18 class HTMLSelectElementTest : public ::testing::Test { | 18 class HTMLSelectElementTest : public ::testing::Test { |
19 protected: | 19 protected: |
20 void SetUp() override; | 20 void SetUp() override; |
21 Document& document() const { return *m_document; } | 21 Document& document() const { return *m_document; } |
22 | 22 |
23 private: | 23 private: |
24 std::unique_ptr<DummyPageHolder> m_dummyPageHolder; | 24 std::unique_ptr<DummyPageHolder> m_dummyPageHolder; |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 "<select><optgroup><option>sub1</option><option>sub2</option></" | 473 "<select><optgroup><option>sub1</option><option>sub2</option></" |
474 "optgroup></select>"); | 474 "optgroup></select>"); |
475 document().view()->updateAllLifecyclePhases(); | 475 document().view()->updateAllLifecyclePhases(); |
476 HTMLSelectElement* select = | 476 HTMLSelectElement* select = |
477 toHTMLSelectElement(document().body()->firstChild()); | 477 toHTMLSelectElement(document().body()->firstChild()); |
478 select->setInnerHTML(""); | 478 select->setInnerHTML(""); |
479 // PASS if setInnerHTML didn't have a check failure. | 479 // PASS if setInnerHTML didn't have a check failure. |
480 } | 480 } |
481 | 481 |
482 } // namespace blink | 482 } // namespace blink |
OLD | NEW |