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

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

Issue 177863007: Replace WebDocument::clearfocusedNode to clearFocusedElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased with latest Created 6 years, 9 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
OLDNEW
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
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, &params); 2236 ViewHostMsg_FocusedNodeChanged::Read(msg2, &params);
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, &params); 2244 ViewHostMsg_FocusedNodeChanged::Read(msg3, &params);
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
OLDNEW
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility_complete.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698