| Index: content/renderer/external_popup_menu_browsertest.cc
|
| diff --git a/content/renderer/external_popup_menu_browsertest.cc b/content/renderer/external_popup_menu_browsertest.cc
|
| index f17971c3c8f9ba75263cda098ebccd7721736dcf..1152435f426c98f19776a3166eea88f9c0d1ce11 100644
|
| --- a/content/renderer/external_popup_menu_browsertest.cc
|
| +++ b/content/renderer/external_popup_menu_browsertest.cc
|
| @@ -180,9 +180,21 @@ class ExternalPopupMenuDisplayNoneTest : public ExternalPopupMenuTest {
|
| };
|
|
|
| TEST_F(ExternalPopupMenuDisplayNoneTest, SelectItem) {
|
| + IPC::TestSink& sink = render_thread_->sink();
|
| +
|
| // Click the text field once to show the popup.
|
| EXPECT_TRUE(SimulateElementClick(kSelectID));
|
|
|
| + // Read the message sent to browser to show the popup menu.
|
| + const IPC::Message* message =
|
| + sink.GetUniqueMessageMatching(FrameHostMsg_ShowPopup::ID);
|
| + ASSERT_TRUE(message != NULL);
|
| + Tuple1<FrameHostMsg_ShowPopup_Params> param;
|
| + FrameHostMsg_ShowPopup::Read(message, ¶m);
|
| + // Number of items should match item count minus the number
|
| + // of "display: none" items.
|
| + ASSERT_EQ(5U, param.a.popup_items.size());
|
| +
|
| // Select index 1 item. This should select item with index 2,
|
| // skipping the item with 'display: none'
|
| frame()->OnSelectPopupMenuItem(1);
|
|
|