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

Unified Diff: content/renderer/render_view_browsertest.cc

Issue 1150953003: Remove IME API interface usage from Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_browsertest.cc
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index b7898f597251f84a01e8aee3bdd9cef0b400d259..b29bb7d43ba9aef5542246fb5e90f02d70123db6 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -2156,44 +2156,6 @@ TEST_F(SuppressErrorPageTest, MAYBE_DoesNotSuppress) {
base::UTF16ToASCII(web_frame->contentAsText(kMaxOutputCharacters)));
}
-// Tests if IME API's candidatewindow* events sent from browser are handled
-// in renderer.
-TEST_F(RenderViewImplTest, SendCandidateWindowEvents) {
- // Sends an HTML with an <input> element and scripts to the renderer.
- // The script handles all 3 of candidatewindow* events for an
- // InputMethodContext object and once it received 'show', 'update', 'hide'
- // should appear in the result div.
- LoadHTML("<input id='test'>"
- "<div id='result'>Result: </div>"
- "<script>"
- "window.onload = function() {"
- " var result = document.getElementById('result');"
- " var test = document.getElementById('test');"
- " test.focus();"
- " var context = test.inputMethodContext;"
- " if (context) {"
- " context.oncandidatewindowshow = function() {"
- " result.innerText += 'show'; };"
- " context.oncandidatewindowupdate = function(){"
- " result.innerText += 'update'; };"
- " context.oncandidatewindowhide = function(){"
- " result.innerText += 'hide'; };"
- " }"
- "};"
- "</script>");
-
- // Fire candidatewindow events.
- view()->OnCandidateWindowShown();
- view()->OnCandidateWindowUpdated();
- view()->OnCandidateWindowHidden();
-
- // Retrieve the content and check if it is expected.
- const int kMaxOutputCharacters = 50;
- std::string output = base::UTF16ToUTF8(
- GetMainFrame()->contentAsText(kMaxOutputCharacters));
- EXPECT_EQ(output, "\nResult:showupdatehide");
-}
-
// Ensure the render view sends favicon url update events correctly.
TEST_F(RenderViewImplTest, SendFaviconURLUpdateEvent) {
// An event should be sent when a favicon url exists.
« no previous file with comments | « no previous file | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698