OLD | NEW |
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/renderer/render_view_impl.h" | 7 #include "content/renderer/render_view_impl.h" |
8 #include "content/test/render_view_test.h" | 8 #include "content/test/render_view_test.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
12 | 12 |
13 // Tests for the external select popup menu (Mac specific). | 13 // Tests for the external select popup menu (Mac specific). |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const char* const kSelectID = "mySelect"; | 17 const char* const kSelectID = "mySelect"; |
18 const char* const kEmptySelectID = "myEmptySelect"; | 18 const char* const kEmptySelectID = "myEmptySelect"; |
19 | 19 |
20 } // namespace | 20 } // namespace |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // Click the text field once to show the popup. | 136 // Click the text field once to show the popup. |
137 EXPECT_TRUE(SimulateElementClick(kSelectID)); | 137 EXPECT_TRUE(SimulateElementClick(kSelectID)); |
138 | 138 |
139 // Select something, it causes the select to be removed from the page. | 139 // Select something, it causes the select to be removed from the page. |
140 view()->OnSelectPopupMenuItem(0); | 140 view()->OnSelectPopupMenuItem(0); |
141 | 141 |
142 // Just to check the soundness of the test, call SimulateElementClick again. | 142 // Just to check the soundness of the test, call SimulateElementClick again. |
143 // It should return false as the select has been removed. | 143 // It should return false as the select has been removed. |
144 EXPECT_FALSE(SimulateElementClick(kSelectID)); | 144 EXPECT_FALSE(SimulateElementClick(kSelectID)); |
145 } | 145 } |
OLD | NEW |