Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: content/renderer/external_popup_menu_browsertest.cc

Issue 1274813005: Revert of Disable ExternalPopupMenuRemoveTest.RemoveOnChange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "content/common/frame_messages.h" 6 #include "content/common/frame_messages.h"
7 #include "content/public/test/render_view_test.h" 7 #include "content/public/test/render_view_test.h"
8 #include "content/renderer/render_frame_impl.h" 8 #include "content/renderer/render_frame_impl.h"
9 #include "content/renderer/render_view_impl.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 class ExternalPopupMenuRemoveTest : public ExternalPopupMenuTest { 131 class ExternalPopupMenuRemoveTest : public ExternalPopupMenuTest {
132 public: 132 public:
133 ExternalPopupMenuRemoveTest() {} 133 ExternalPopupMenuRemoveTest() {}
134 134
135 protected: 135 protected:
136 bool ShouldRemoveSelectOnChange() const override { return true; } 136 bool ShouldRemoveSelectOnChange() const override { return true; }
137 }; 137 };
138 138
139 // Tests that nothing bad happen when the page removes the select when it 139 // Tests that nothing bad happen when the page removes the select when it
140 // changes. (http://crbug.com/61997) 140 // changes. (http://crbug.com/61997)
141 // TODO(tkent): Change event becomes asynchronous. crbug.com/516945 141 TEST_F(ExternalPopupMenuRemoveTest, RemoveOnChange) {
142 TEST_F(ExternalPopupMenuRemoveTest, DISABLED_RemoveOnChange) {
143 // Click the text field once to show the popup. 142 // Click the text field once to show the popup.
144 EXPECT_TRUE(SimulateElementClick(kSelectID)); 143 EXPECT_TRUE(SimulateElementClick(kSelectID));
145 144
146 // Select something, it causes the select to be removed from the page. 145 // Select something, it causes the select to be removed from the page.
147 frame()->OnSelectPopupMenuItem(0); 146 frame()->OnSelectPopupMenuItem(0);
148 147
149 // Just to check the soundness of the test, call SimulateElementClick again. 148 // Just to check the soundness of the test, call SimulateElementClick again.
150 // It should return false as the select has been removed. 149 // It should return false as the select has been removed.
151 EXPECT_FALSE(SimulateElementClick(kSelectID)); 150 EXPECT_FALSE(SimulateElementClick(kSelectID));
152 } 151 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ASSERT_EQ(5U, base::get<0>(param).popup_items.size()); 196 ASSERT_EQ(5U, base::get<0>(param).popup_items.size());
198 197
199 // Select index 1 item. This should select item with index 2, 198 // Select index 1 item. This should select item with index 2,
200 // skipping the item with 'display: none' 199 // skipping the item with 'display: none'
201 frame()->OnSelectPopupMenuItem(1); 200 frame()->OnSelectPopupMenuItem(1);
202 201
203 EXPECT_EQ(2, GetSelectedIndex()); 202 EXPECT_EQ(2, GetSelectedIndex());
204 } 203 }
205 204
206 } // namespace content 205 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698