OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 package org.chromium.content.browser.input; | 5 package org.chromium.content.browser.input; |
6 | 6 |
7 import android.content.ClipData; | 7 import android.content.ClipData; |
8 import android.content.ClipboardManager; | 8 import android.content.ClipboardManager; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.res.Configuration; | 10 import android.content.res.Configuration; |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 } | 686 } |
687 | 687 |
688 @Test | 688 @Test |
689 @SmallTest | 689 @SmallTest |
690 @Feature({"TextInput"}) | 690 @Feature({"TextInput"}) |
691 public void testSelectActionBarClearedOnTappingOutsideInput() throws Excepti
on { | 691 public void testSelectActionBarClearedOnTappingOutsideInput() throws Excepti
on { |
692 mRule.commitText("Sample Text", 1); | 692 mRule.commitText("Sample Text", 1); |
693 DOMUtils.longPressNode(mRule.getContentViewCore(), "input_text"); | 693 DOMUtils.longPressNode(mRule.getContentViewCore(), "input_text"); |
694 mRule.assertWaitForKeyboardStatus(true); | 694 mRule.assertWaitForKeyboardStatus(true); |
695 mRule.assertWaitForSelectActionBarStatus(true); | 695 mRule.assertWaitForSelectActionBarStatus(true); |
696 DOMUtils.clickNode(mRule.getContentViewCore(), "plain_text"); | 696 DOMUtils.clickNode(mRule.getContentViewCore(), "input_radio"); |
697 mRule.assertWaitForKeyboardStatus(false); | 697 mRule.assertWaitForKeyboardStatus(false); |
698 mRule.assertWaitForSelectActionBarStatus(false); | 698 mRule.assertWaitForSelectActionBarStatus(false); |
699 } | 699 } |
700 | 700 |
701 @Test | 701 @Test |
702 @SmallTest | 702 @SmallTest |
703 @Feature({"TextInput"}) | 703 @Feature({"TextInput"}) |
704 public void testImeNotShownOnLongPressingDifferentEmptyInputs() throws Excep
tion { | 704 public void testImeNotShownOnLongPressingDifferentEmptyInputs() throws Excep
tion { |
705 DOMUtils.focusNode(mRule.getWebContents(), "input_radio"); | 705 DOMUtils.focusNode(mRule.getWebContents(), "input_radio"); |
706 DOMUtils.longPressNode(mRule.getContentViewCore(), "input_text"); | 706 DOMUtils.longPressNode(mRule.getContentViewCore(), "input_text"); |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1495 }); | 1495 }); |
1496 Assert.assertEquals("abc", mRule.runBlockingOnImeThread(new Callable<Cha
rSequence>() { | 1496 Assert.assertEquals("abc", mRule.runBlockingOnImeThread(new Callable<Cha
rSequence>() { |
1497 @Override | 1497 @Override |
1498 public CharSequence call() throws Exception { | 1498 public CharSequence call() throws Exception { |
1499 return connection.getTextBeforeCursor(5, 0); | 1499 return connection.getTextBeforeCursor(5, 0); |
1500 } | 1500 } |
1501 })); | 1501 })); |
1502 } | 1502 } |
1503 | 1503 |
1504 } | 1504 } |
OLD | NEW |