OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2230 render_thread_->sink().ClearMessages(); | 2230 render_thread_->sink().ClearMessages(); |
2231 | 2231 |
2232 ExecuteJavaScript("document.getElementById('test2').focus();"); | 2232 ExecuteJavaScript("document.getElementById('test2').focus();"); |
2233 const IPC::Message* msg2 = render_thread_->sink().GetFirstMessageMatching( | 2233 const IPC::Message* msg2 = render_thread_->sink().GetFirstMessageMatching( |
2234 ViewHostMsg_FocusedNodeChanged::ID); | 2234 ViewHostMsg_FocusedNodeChanged::ID); |
2235 EXPECT_TRUE(msg2); | 2235 EXPECT_TRUE(msg2); |
2236 ViewHostMsg_FocusedNodeChanged::Read(msg2, ¶ms); | 2236 ViewHostMsg_FocusedNodeChanged::Read(msg2, ¶ms); |
2237 EXPECT_TRUE(params.a); | 2237 EXPECT_TRUE(params.a); |
2238 render_thread_->sink().ClearMessages(); | 2238 render_thread_->sink().ClearMessages(); |
2239 | 2239 |
2240 view()->webview()->clearFocusedNode(); | 2240 view()->webview()->clearFocusedElement(); |
2241 const IPC::Message* msg3 = render_thread_->sink().GetFirstMessageMatching( | 2241 const IPC::Message* msg3 = render_thread_->sink().GetFirstMessageMatching( |
2242 ViewHostMsg_FocusedNodeChanged::ID); | 2242 ViewHostMsg_FocusedNodeChanged::ID); |
2243 EXPECT_TRUE(msg3); | 2243 EXPECT_TRUE(msg3); |
2244 ViewHostMsg_FocusedNodeChanged::Read(msg3, ¶ms); | 2244 ViewHostMsg_FocusedNodeChanged::Read(msg3, ¶ms); |
2245 EXPECT_FALSE(params.a); | 2245 EXPECT_FALSE(params.a); |
2246 render_thread_->sink().ClearMessages(); | 2246 render_thread_->sink().ClearMessages(); |
2247 } | 2247 } |
2248 | 2248 |
2249 } // namespace content | 2249 } // namespace content |
OLD | NEW |