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

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

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // Command-ESC will destroy the view, while the window is still in 311 // Command-ESC will destroy the view, while the window is still in
312 // |-performKeyEquivalent:|. There are other cases where this can 312 // |-performKeyEquivalent:|. There are other cases where this can
313 // happen, Command-ESC is the easiest to trigger. 313 // happen, Command-ESC is the easiest to trigger.
314 [[view->cocoa_view() window] performKeyEquivalent: 314 [[view->cocoa_view() window] performKeyEquivalent:
315 cocoa_test_event_utils::KeyEventWithKeyCode( 315 cocoa_test_event_utils::KeyEventWithKeyCode(
316 53, 27, NSKeyDown, NSCommandKeyMask)]; 316 53, 27, NSKeyDown, NSCommandKeyMask)];
317 observer.Wait(); 317 observer.Wait();
318 } 318 }
319 319
320 TEST_F(RenderWidgetHostViewMacTest, GetFirstRectForCharacterRangeCaretCase) { 320 TEST_F(RenderWidgetHostViewMacTest, GetFirstRectForCharacterRangeCaretCase) {
321 const string16 kDummyString = UTF8ToUTF16("hogehoge"); 321 const base::string16 kDummyString = UTF8ToUTF16("hogehoge");
322 const size_t kDummyOffset = 0; 322 const size_t kDummyOffset = 0;
323 323
324 gfx::Rect caret_rect(10, 11, 0, 10); 324 gfx::Rect caret_rect(10, 11, 0, 10);
325 gfx::Range caret_range(0, 0); 325 gfx::Range caret_range(0, 0);
326 ViewHostMsg_SelectionBounds_Params params; 326 ViewHostMsg_SelectionBounds_Params params;
327 327
328 NSRect rect; 328 NSRect rect;
329 NSRange actual_range; 329 NSRange actual_range;
330 rwhv_mac_->SelectionChanged(kDummyString, kDummyOffset, caret_range); 330 rwhv_mac_->SelectionChanged(kDummyString, kDummyOffset, caret_range);
331 params.anchor_rect = params.focus_rect = caret_rect; 331 params.anchor_rect = params.focus_rect = caret_rect;
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 host->OnMessageReceived(*response2); 776 host->OnMessageReceived(*response2);
777 777
778 // Check that the view delegate ignored the empty unhandled wheel event. 778 // Check that the view delegate ignored the empty unhandled wheel event.
779 ASSERT_EQ(NO, view_delegate.get().unhandledWheelEventReceived); 779 ASSERT_EQ(NO, view_delegate.get().unhandledWheelEventReceived);
780 780
781 // Clean up. 781 // Clean up.
782 host->Shutdown(); 782 host->Shutdown();
783 } 783 }
784 784
785 } // namespace content 785 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698