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

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

Issue 8227018: mac: Almost fix Lion accented character bubble input in web contents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whoopsies Created 9 years, 2 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) 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/basictypes.h" 5 #include "base/basictypes.h"
6 6
7 #include "base/shared_memory.h" 7 #include "base/shared_memory.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/test/base/render_view_test.h" 10 #include "chrome/test/base/render_view_test.h"
11 #include "content/common/native_web_keyboard_event.h" 11 #include "content/common/native_web_keyboard_event.h"
12 #include "content/common/view_messages.h" 12 #include "content/common/view_messages.h"
13 #include "content/renderer/render_view_impl.h" 13 #include "content/renderer/render_view_impl.h"
14 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
19 #include "ui/base/keycodes/keyboard_codes.h" 19 #include "ui/base/keycodes/keyboard_codes.h"
20 #include "ui/base/range/range.h"
20 #include "ui/gfx/codec/jpeg_codec.h" 21 #include "ui/gfx/codec/jpeg_codec.h"
21 #include "webkit/glue/web_io_operators.h" 22 #include "webkit/glue/web_io_operators.h"
22 23
23 using WebKit::WebFrame; 24 using WebKit::WebFrame;
24 using WebKit::WebString; 25 using WebKit::WebString;
25 using WebKit::WebTextDirection; 26 using WebKit::WebTextDirection;
26 using WebKit::WebURLError; 27 using WebKit::WebURLError;
27 28
28 class RenderViewImplTest : public RenderViewTest { 29 class RenderViewImplTest : public RenderViewTest {
29 public: 30 public:
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 case IME_SETCOMPOSITION: 438 case IME_SETCOMPOSITION:
438 view()->OnImeSetComposition( 439 view()->OnImeSetComposition(
439 WideToUTF16Hack(ime_message->ime_string), 440 WideToUTF16Hack(ime_message->ime_string),
440 std::vector<WebKit::WebCompositionUnderline>(), 441 std::vector<WebKit::WebCompositionUnderline>(),
441 ime_message->selection_start, 442 ime_message->selection_start,
442 ime_message->selection_end); 443 ime_message->selection_end);
443 break; 444 break;
444 445
445 case IME_CONFIRMCOMPOSITION: 446 case IME_CONFIRMCOMPOSITION:
446 view()->OnImeConfirmComposition( 447 view()->OnImeConfirmComposition(
447 WideToUTF16Hack(ime_message->ime_string)); 448 WideToUTF16Hack(ime_message->ime_string),
449 ui::Range::InvalidRange());
448 break; 450 break;
449 451
450 case IME_CANCELCOMPOSITION: 452 case IME_CANCELCOMPOSITION:
451 view()->OnImeSetComposition( 453 view()->OnImeSetComposition(
452 string16(), 454 string16(),
453 std::vector<WebKit::WebCompositionUnderline>(), 455 std::vector<WebKit::WebCompositionUnderline>(),
454 0, 0); 456 0, 0);
455 break; 457 break;
456 } 458 }
457 459
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 expected_page_id_2 = view()->page_id_; 1078 expected_page_id_2 = view()->page_id_;
1077 EXPECT_GT(expected_page_id_2, expected_page_id); 1079 EXPECT_GT(expected_page_id_2, expected_page_id);
1078 view()->OnSetHistoryLengthAndPrune(2, -1); 1080 view()->OnSetHistoryLengthAndPrune(2, -1);
1079 EXPECT_EQ(4, view()->history_list_length_); 1081 EXPECT_EQ(4, view()->history_list_length_);
1080 EXPECT_EQ(3, view()->history_list_offset_); 1082 EXPECT_EQ(3, view()->history_list_offset_);
1081 EXPECT_EQ(-1, view()->history_page_ids_[0]); 1083 EXPECT_EQ(-1, view()->history_page_ids_[0]);
1082 EXPECT_EQ(-1, view()->history_page_ids_[1]); 1084 EXPECT_EQ(-1, view()->history_page_ids_[1]);
1083 EXPECT_EQ(expected_page_id, view()->history_page_ids_[2]); 1085 EXPECT_EQ(expected_page_id, view()->history_page_ids_[2]);
1084 EXPECT_EQ(expected_page_id_2, view()->history_page_ids_[3]); 1086 EXPECT_EQ(expected_page_id_2, view()->history_page_ids_[3]);
1085 } 1087 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698