| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/html/HTMLSelectElement.h" | 6 #include "core/html/HTMLSelectElement.h" |
| 7 | 7 |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/html/HTMLDocument.h" | 9 #include "core/html/HTMLDocument.h" |
| 10 #include "core/html/forms/FormController.h" | 10 #include "core/html/forms/FormController.h" |
| 11 #include "core/loader/EmptyClients.h" | 11 #include "core/loader/EmptyClients.h" |
| 12 #include "core/testing/DummyPageHolder.h" | 12 #include "core/testing/DummyPageHolder.h" |
| 13 #include <gtest/gtest.h> | 13 #include <gtest/gtest.h> |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class HTMLSelectElementTest : public::testing::Test { | 17 class HTMLSelectElementTest : public::testing::Test { |
| 18 protected: | 18 protected: |
| 19 virtual void SetUp() OVERRIDE; | 19 virtual void SetUp() override; |
| 20 HTMLDocument& document() const { return *m_document; } | 20 HTMLDocument& document() const { return *m_document; } |
| 21 | 21 |
| 22 private: | 22 private: |
| 23 OwnPtr<DummyPageHolder> m_dummyPageHolder; | 23 OwnPtr<DummyPageHolder> m_dummyPageHolder; |
| 24 RefPtrWillBePersistent<HTMLDocument> m_document; | 24 RefPtrWillBePersistent<HTMLDocument> m_document; |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 void HTMLSelectElementTest::SetUp() | 27 void HTMLSelectElementTest::SetUp() |
| 28 { | 28 { |
| 29 Page::PageClients pageClients; | 29 Page::PageClients pageClients; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 ASSERT_FALSE(opt3->selected()); | 96 ASSERT_FALSE(opt3->selected()); |
| 97 | 97 |
| 98 // Restore | 98 // Restore |
| 99 select->restoreFormControlState(selectState); | 99 select->restoreFormControlState(selectState); |
| 100 EXPECT_FALSE(opt0->selected()); | 100 EXPECT_FALSE(opt0->selected()); |
| 101 EXPECT_TRUE(opt2->selected()); | 101 EXPECT_TRUE(opt2->selected()); |
| 102 EXPECT_TRUE(opt3->selected()); | 102 EXPECT_TRUE(opt3->selected()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |