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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/input/TextSuggestionMenuTest.java

Issue 2931443003: Add support for Android spellcheck menu in Chrome/WebViews (Closed)
Patch Set: Respond to latest comments Created 3 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.input;
6
7 import android.support.test.filters.LargeTest;
8 import android.view.View;
9
10 import org.junit.Assert;
11
12 import org.chromium.chrome.browser.ChromeActivity;
13 import org.chromium.chrome.test.ChromeActivityTestCaseBase;
14 import org.chromium.content.R;
15 import org.chromium.content.browser.ContentViewCore;
16 import org.chromium.content.browser.test.util.DOMUtils;
17 import org.chromium.content.browser.test.util.TouchCommon;
18
19 import java.util.concurrent.TimeoutException;
20
21 /**
22 * Integration tests for the text suggestion menu.
23 */
24 public class TextSuggestionMenuTest extends ChromeActivityTestCaseBase<ChromeAct ivity> {
25 private static final String URL =
26 "data:text/html, <div contenteditable id=\"div\">iuvwneaoanls</div>" ;
27
28 public TextSuggestionMenuTest() {
29 super(ChromeActivity.class);
30 }
31
32 @Override
33 public void startMainActivity() throws InterruptedException {
34 startMainActivityOnBlankPage();
35 }
36
37 @LargeTest
38 public void testDeleteMisspelledWord() throws InterruptedException, TimeoutE xception {
39 loadUrl(URL);
40 final ContentViewCore cvc = getActivity().getActivityTab().getContentVie wCore();
41 DOMUtils.focusNode(cvc.getWebContents(), "div");
42 DOMUtils.clickNode(cvc, "div");
43 Thread.sleep(1000);
Theresa 2017/07/20 00:50:33 I just noticed this test file (sorry!). What is th
rlanday 2017/07/20 01:39:20 This is to wait for the popup menu to show (there'
rlanday 2017/07/20 01:39:20 This is to wait for the popup menu to show (there'
44
45 View view = cvc.getTextSuggestionHostForTesting()
46 .getSuggestionsPopupWindowForTesting()
47 .getContentViewForTesting();
48 TouchCommon.singleClickView(view.findViewById(R.id.deleteButton));
49 Assert.assertEquals("", DOMUtils.getNodeContents(cvc.getWebContents(), " div"));
50 }
51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698