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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac_unittest.mm

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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) 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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/mac/scoped_nsautorelease_pool.h" 8 #include "base/mac/scoped_nsautorelease_pool.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 // Command-ESC will destroy the view, while the window is still in 317 // Command-ESC will destroy the view, while the window is still in
318 // |-performKeyEquivalent:|. There are other cases where this can 318 // |-performKeyEquivalent:|. There are other cases where this can
319 // happen, Command-ESC is the easiest to trigger. 319 // happen, Command-ESC is the easiest to trigger.
320 [[view->cocoa_view() window] performKeyEquivalent: 320 [[view->cocoa_view() window] performKeyEquivalent:
321 cocoa_test_event_utils::KeyEventWithKeyCode( 321 cocoa_test_event_utils::KeyEventWithKeyCode(
322 53, 27, NSKeyDown, NSCommandKeyMask)]; 322 53, 27, NSKeyDown, NSCommandKeyMask)];
323 observer.Wait(); 323 observer.Wait();
324 } 324 }
325 325
326 TEST_F(RenderWidgetHostViewMacTest, GetFirstRectForCharacterRangeCaretCase) { 326 TEST_F(RenderWidgetHostViewMacTest, GetFirstRectForCharacterRangeCaretCase) {
327 const base::string16 kDummyString = UTF8ToUTF16("hogehoge"); 327 const base::string16 kDummyString = base::UTF8ToUTF16("hogehoge");
328 const size_t kDummyOffset = 0; 328 const size_t kDummyOffset = 0;
329 329
330 gfx::Rect caret_rect(10, 11, 0, 10); 330 gfx::Rect caret_rect(10, 11, 0, 10);
331 gfx::Range caret_range(0, 0); 331 gfx::Range caret_range(0, 0);
332 ViewHostMsg_SelectionBounds_Params params; 332 ViewHostMsg_SelectionBounds_Params params;
333 333
334 NSRect rect; 334 NSRect rect;
335 NSRange actual_range; 335 NSRange actual_range;
336 rwhv_mac_->SelectionChanged(kDummyString, kDummyOffset, caret_range); 336 rwhv_mac_->SelectionChanged(kDummyString, kDummyOffset, caret_range);
337 params.anchor_rect = params.focus_rect = caret_rect; 337 params.anchor_rect = params.focus_rect = caret_rect;
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 host->OnMessageReceived(*response2); 782 host->OnMessageReceived(*response2);
783 783
784 // Check that the view delegate ignored the empty unhandled wheel event. 784 // Check that the view delegate ignored the empty unhandled wheel event.
785 ASSERT_EQ(NO, view_delegate.get().unhandledWheelEventReceived); 785 ASSERT_EQ(NO, view_delegate.get().unhandledWheelEventReceived);
786 786
787 // Clean up. 787 // Clean up.
788 host->Shutdown(); 788 host->Shutdown();
789 } 789 }
790 790
791 } // namespace content 791 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/browser/safe_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698