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

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

Issue 12279015: Mac Chromium style checker cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "content/common/view_messages.h" 6 #include "content/common/view_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_view_impl.h" 8 #include "content/renderer/render_view_impl.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // http://crbug.com/63774 121 // http://crbug.com/63774
122 TEST_F(ExternalPopupMenuTest, EmptySelect) { 122 TEST_F(ExternalPopupMenuTest, EmptySelect) {
123 EXPECT_TRUE(SimulateElementClick(kEmptySelectID)); 123 EXPECT_TRUE(SimulateElementClick(kEmptySelectID));
124 } 124 }
125 125
126 class ExternalPopupMenuRemoveTest : public ExternalPopupMenuTest { 126 class ExternalPopupMenuRemoveTest : public ExternalPopupMenuTest {
127 public: 127 public:
128 ExternalPopupMenuRemoveTest() {} 128 ExternalPopupMenuRemoveTest() {}
129 129
130 protected: 130 protected:
131 virtual bool ShouldRemoveSelectOnChange() const { return true; } 131 virtual bool ShouldRemoveSelectOnChange() const OVERRIDE { return true; }
132 }; 132 };
133 133
134 // Tests that nothing bad happen when the page removes the select when it 134 // Tests that nothing bad happen when the page removes the select when it
135 // changes. (http://crbug.com/61997) 135 // changes. (http://crbug.com/61997)
136 TEST_F(ExternalPopupMenuRemoveTest, RemoveOnChange) { 136 TEST_F(ExternalPopupMenuRemoveTest, RemoveOnChange) {
137 // Click the text field once to show the popup. 137 // Click the text field once to show the popup.
138 EXPECT_TRUE(SimulateElementClick(kSelectID)); 138 EXPECT_TRUE(SimulateElementClick(kSelectID));
139 139
140 // Select something, it causes the select to be removed from the page. 140 // Select something, it causes the select to be removed from the page.
141 view()->OnSelectPopupMenuItem(0); 141 view()->OnSelectPopupMenuItem(0);
142 142
143 // Just to check the soundness of the test, call SimulateElementClick again. 143 // Just to check the soundness of the test, call SimulateElementClick again.
144 // It should return false as the select has been removed. 144 // It should return false as the select has been removed.
145 EXPECT_FALSE(SimulateElementClick(kSelectID)); 145 EXPECT_FALSE(SimulateElementClick(kSelectID));
146 } 146 }
147 147
148 } // namespace content 148 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698