OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "web/ExternalPopupMenu.h" | 6 #include "web/ExternalPopupMenu.h" |
7 | 7 |
8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
9 #include "core/frame/FrameHost.h" | 9 #include "core/frame/FrameHost.h" |
10 #include "core/frame/PinchViewport.h" | 10 #include "core/frame/PinchViewport.h" |
11 #include "core/html/HTMLSelectElement.h" | 11 #include "core/html/HTMLSelectElement.h" |
| 12 #include "core/html/forms/PopupMenuClient.h" |
12 #include "core/page/Page.h" | 13 #include "core/page/Page.h" |
13 #include "core/rendering/RenderMenuList.h" | 14 #include "core/rendering/RenderMenuList.h" |
14 #include "core/testing/URLTestHelpers.h" | 15 #include "core/testing/URLTestHelpers.h" |
15 #include "platform/PopupMenu.h" | 16 #include "platform/PopupMenu.h" |
16 #include "platform/PopupMenuClient.h" | |
17 #include "public/platform/Platform.h" | 17 #include "public/platform/Platform.h" |
18 #include "public/platform/WebUnitTestSupport.h" | 18 #include "public/platform/WebUnitTestSupport.h" |
19 #include "public/web/WebExternalPopupMenu.h" | 19 #include "public/web/WebExternalPopupMenu.h" |
20 #include "public/web/WebPopupMenuInfo.h" | 20 #include "public/web/WebPopupMenuInfo.h" |
21 #include "public/web/WebSettings.h" | 21 #include "public/web/WebSettings.h" |
22 #include "web/WebLocalFrameImpl.h" | 22 #include "web/WebLocalFrameImpl.h" |
23 #include "web/tests/FrameTestHelpers.h" | 23 #include "web/tests/FrameTestHelpers.h" |
24 #include <gtest/gtest.h> | 24 #include <gtest/gtest.h> |
25 | 25 |
26 using namespace blink; | 26 using namespace blink; |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 ASSERT_TRUE(menuList->popupIsVisible()); | 257 ASSERT_TRUE(menuList->popupIsVisible()); |
258 | 258 |
259 WebExternalPopupMenuClient* client = static_cast<ExternalPopupMenu*>(menuLis
t->popup()); | 259 WebExternalPopupMenuClient* client = static_cast<ExternalPopupMenu*>(menuLis
t->popup()); |
260 WebVector<int> indices; | 260 WebVector<int> indices; |
261 client->didAcceptIndices(indices); | 261 client->didAcceptIndices(indices); |
262 EXPECT_FALSE(menuList->popupIsVisible()); | 262 EXPECT_FALSE(menuList->popupIsVisible()); |
263 EXPECT_EQ(-1, select->selectedIndex()); | 263 EXPECT_EQ(-1, select->selectedIndex()); |
264 } | 264 } |
265 | 265 |
266 } // namespace | 266 } // namespace |
OLD | NEW |