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

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

Issue 23264032: Fix content browser test failure by enabling WebRuntimeFeatures::enableInputModeAttribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/common/ssl_status_serialization.h" 10 #include "content/common/ssl_status_serialization.h"
(...skipping 16 matching lines...) Expand all
27 #include "net/cert/cert_status_flags.h" 27 #include "net/cert/cert_status_flags.h"
28 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
29 #include "third_party/WebKit/public/platform/WebData.h" 29 #include "third_party/WebKit/public/platform/WebData.h"
30 #include "third_party/WebKit/public/platform/WebHTTPBody.h" 30 #include "third_party/WebKit/public/platform/WebHTTPBody.h"
31 #include "third_party/WebKit/public/platform/WebString.h" 31 #include "third_party/WebKit/public/platform/WebString.h"
32 #include "third_party/WebKit/public/platform/WebURLError.h" 32 #include "third_party/WebKit/public/platform/WebURLError.h"
33 #include "third_party/WebKit/public/platform/WebURLResponse.h" 33 #include "third_party/WebKit/public/platform/WebURLResponse.h"
34 #include "third_party/WebKit/public/web/WebDataSource.h" 34 #include "third_party/WebKit/public/web/WebDataSource.h"
35 #include "third_party/WebKit/public/web/WebFrame.h" 35 #include "third_party/WebKit/public/web/WebFrame.h"
36 #include "third_party/WebKit/public/web/WebHistoryItem.h" 36 #include "third_party/WebKit/public/web/WebHistoryItem.h"
37 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
37 #include "third_party/WebKit/public/web/WebView.h" 38 #include "third_party/WebKit/public/web/WebView.h"
38 #include "third_party/WebKit/public/web/WebWindowFeatures.h" 39 #include "third_party/WebKit/public/web/WebWindowFeatures.h"
39 #include "ui/base/keycodes/keyboard_codes.h" 40 #include "ui/base/keycodes/keyboard_codes.h"
40 #include "ui/base/range/range.h" 41 #include "ui/base/range/range.h"
41 #include "ui/gfx/codec/jpeg_codec.h" 42 #include "ui/gfx/codec/jpeg_codec.h"
42 43
43 #if defined(OS_LINUX) && !defined(USE_AURA) 44 #if defined(OS_LINUX) && !defined(USE_AURA)
44 #include "ui/base/gtk/event_synthesis_gtk.h" 45 #include "ui/base/gtk/event_synthesis_gtk.h"
45 #endif 46 #endif
46 47
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 view()->OnNavigate(params_B); 765 view()->OnNavigate(params_B);
765 ProcessPendingMessages(); 766 ProcessPendingMessages();
766 767
767 EXPECT_EQ(2, view()->history_list_length_); 768 EXPECT_EQ(2, view()->history_list_length_);
768 EXPECT_EQ(0, view()->history_list_offset_); 769 EXPECT_EQ(0, view()->history_list_offset_);
769 EXPECT_EQ(2, view()->history_page_ids_[0]); 770 EXPECT_EQ(2, view()->history_page_ids_[0]);
770 } 771 }
771 772
772 // Test that our IME backend sends a notification message when the input focus 773 // Test that our IME backend sends a notification message when the input focus
773 // changes. 774 // changes.
774 // crbug.com/276821: 775 TEST_F(RenderViewImplTest, OnImeTypeChanged) {
775 // Because Blink change cause this test failed, we first disabled this test and 776 // This test depends on Blink flag InputModeAttribute, which is enabled under
776 // fix later. 777 // only test. Content browser test doesn't enable the features so we need
777 TEST_F(RenderViewImplTest, DISABLED_OnImeTypeChanged) { 778 // enable manually.
779 WebKit::WebRuntimeFeatures::enableTestOnlyFeatures(true);
kochi 2013/08/22 04:00:22 Can you enable only InputMode, and not in test fun
yoichio 2013/08/22 06:00:46 Done.
778 // Enable our IME backend code. 780 // Enable our IME backend code.
779 view()->OnSetInputMethodActive(true); 781 view()->OnSetInputMethodActive(true);
780 782
781 // Load an HTML page consisting of two input fields. 783 // Load an HTML page consisting of two input fields.
782 view()->set_send_content_state_immediately(true); 784 view()->set_send_content_state_immediately(true);
783 LoadHTML("<html>" 785 LoadHTML("<html>"
784 "<head>" 786 "<head>"
785 "</head>" 787 "</head>"
786 "<body>" 788 "<body>"
787 "<input id=\"test1\" type=\"text\" value=\"some text\"></input>" 789 "<input id=\"test1\" type=\"text\" value=\"some text\"></input>"
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status)); 1936 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status));
1935 1937
1936 const_cast<WebKit::WebURLResponse&>(frame->dataSource()->response()). 1938 const_cast<WebKit::WebURLResponse&>(frame->dataSource()->response()).
1937 setSecurityInfo( 1939 setSecurityInfo(
1938 SerializeSecurityInfo(0, net::CERT_STATUS_ALL_ERRORS, 0, 0)); 1940 SerializeSecurityInfo(0, net::CERT_STATUS_ALL_ERRORS, 0, 0));
1939 ssl_status = view()->GetSSLStatusOfFrame(frame); 1941 ssl_status = view()->GetSSLStatusOfFrame(frame);
1940 EXPECT_TRUE(net::IsCertStatusError(ssl_status.cert_status)); 1942 EXPECT_TRUE(net::IsCertStatusError(ssl_status.cert_status));
1941 } 1943 }
1942 1944
1943 } // namespace content 1945 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698