|
|
Description[Android] Add unit tests for SelectActionBar appearance
The SelectActionBar currently lacks test coverage. Add several test
cases covering the appearance of the bar when interacting with an input
field.
Committed: https://crrev.com/5818759b61597b65661e521b80eead8448921bb8
Cr-Commit-Position: refs/heads/master@{#292248}
Patch Set 1 #Patch Set 2 : Refined the test case to handle Keyboard status as well. #
Total comments: 4
Patch Set 3 : Fixed nits and review comments. #Messages
Total messages: 27 (0 generated)
ajith.v@samsung.com changed reviewers: + aurimas@chromium.org, jdduke@chromium.org
@jdduke & aurimas PTAL
https://codereview.chromium.org/506423003/diff/20001/content/public/android/j... File content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java (right): https://codereview.chromium.org/506423003/diff/20001/content/public/android/j... content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:187: public void testSelectActionBarClearOnTappingInput() throws Exception { Nit: "ActionBarCleared" instead of "ActionBarClear", also below. https://codereview.chromium.org/506423003/diff/20001/content/public/android/j... content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:188: commitText(mConnection, "Sample Text", 1); These tests aren't really IME-specific. What if we start a new file for testing selection-related behavior, e.g., action bar showing, paste popup, etc..., call it: ContentViewCoreSelectionTest.java
https://codereview.chromium.org/506423003/diff/20001/content/public/android/j... File content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java (right): https://codereview.chromium.org/506423003/diff/20001/content/public/android/j... content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:187: public void testSelectActionBarClearOnTappingInput() throws Exception { On 2014/08/27 18:07:12, jdduke wrote: > Nit: "ActionBarCleared" instead of "ActionBarClear", also below. Done. https://codereview.chromium.org/506423003/diff/20001/content/public/android/j... content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:188: commitText(mConnection, "Sample Text", 1); On 2014/08/27 18:07:12, jdduke wrote: > These tests aren't really IME-specific. What if we start a new file for testing > selection-related behavior, e.g., action bar showing, paste popup, etc..., call > it: > > ContentViewCoreSelectionTest.java Thanks jdduke for the suggestion. Actually I have a plan to create test file for Non-Input Text Selection Action bar functionalities. Since this check is for Input related, I thought to post it here. Future Non-IME test cases I will add in new file. Please share your thoughts.
On 2014/08/27 18:19:41, AKV wrote: > Thanks jdduke for the suggestion. Actually I have a plan to create test file for > Non-Input Text Selection Action bar functionalities. Since this check is for > Input related, I thought to post it here. Future Non-IME test cases I will add > in new file. Please share your thoughts. I don't care too strongly here, I'll defer to aurimas@.
@aurimas PTAL
lgtm
On 2014/08/27 21:11:57, aurimas wrote: > lgtm lgtm
The CQ bit was checked by jdduke@chromium.org
The CQ bit was unchecked by jdduke@chromium.org
The CQ bit was checked by jdduke@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajith.v@samsung.com/506423003/40001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to commit the patch.
The CQ bit was checked by jdduke@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajith.v@samsung.com/506423003/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as 0bc56569817a24acea46748c599d77b59157d84d
Message was sent while issue was closed.
On 2014/08/27 22:28:53, I haz the power (commit-bot) wrote: > Committed patchset #3 (id:40001) as 0bc56569817a24acea46748c599d77b59157d84d Reverting due to failure on http://build.chromium.org/p/chromium.linux/builders/Android%20Builder%20%28db... Log snippet below for reference: ../out/Debug/content_shell_test_apk/gen/org/chromium/content_shell_apk/tests/R.java public/android/javatests/src/org/chromium/content/browser/AddressDetectionTest.java public/android/javatests/src/org/chromium/content/browser/BatteryStatusManagerTest.java public/android/javatests/src/org/chromium/content/browser/BindingManagerImplTest.java public/android/javatests/src/org/chromium/content/browser/BrowserStartupControllerTest.java public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java public/android/javatests/src/org/chromium/content/browser/ClickListenerTest.java public/android/javatests/src/org/chromium/content/browser/ClipboardTest.java public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java public/android/javatests/src/org/chromium/content/browser/ContentDetectionTestBase.java public/android/javatests/src/org/chromium/content/browser/ContentViewCoreFocusTest.java public/android/javatests/src/org/chromium/content/browser/ContentViewCoreInputConnectionTest.java public/android/javatests/src/org/chromium/content/browser/ContentViewLocationTest.java public/android/javatests/src/org/chromium/content/browser/ContentViewPopupZoomerTest.java public/android/javatests/src/org/chromium/content/browser/ContentViewReadbackTest.java public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java public/android/javatests/src/org/chromium/content/browser/ContentViewTestBase.java public/android/javatests/src/org/chromium/content/browser/DeviceSensorsTest.java public/android/javatests/src/org/chromium/content/browser/DownloadInfoTest.java public/android/javatests/src/org/chromium/content/browser/EmailAddressDetectionTest.java public/android/javatests/src/org/chromium/content/browser/EncodeHtmlDataUriTest.java public/android/javatests/src/org/chromium/content/browser/GestureDetectorResetTest.java public/android/javatests/src/org/chromium/content/browser/ImportantFileWriterAndroidTest.java public/android/javatests/src/org/chromium/content/browser/InterstitialPageTest.java public/android/javatests/src/org/chromium/content/browser/JavaBridgeArrayCoercionTest.java public/android/javatests/src/org/chromium/content/browser/JavaBridgeArrayTest.java public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java public/android/javatests/src/org/chromium/content/browser/JavaBridgeChildFrameTest.java public/android/javatests/src/org/chromium/content/browser/JavaBridgeCoercionTest.java public/android/javatests/src/org/chromium/content/browser/JavaBridgeFieldsTest.java public/android/javatests/src/org/chromium/content/browser/JavaBridgeReturnValuesTest.java public/android/javatests/src/org/chromium/content/browser/JavaBridgeTestBase.java public/android/javatests/src/org/chromium/content/browser/LocationProviderTest.java public/android/javatests/src/org/chromium/content/browser/MediaResourceGetterTest.java public/android/javatests/src/org/chromium/content/browser/NavigationTest.java public/android/javatests/src/org/chromium/content/browser/PhoneNumberDetectionTest.java public/android/javatests/src/org/chromium/content/browser/PopupZoomerTest.java public/android/javatests/src/org/chromium/content/browser/PostMessageTest.java public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.java public/android/javatests/src/org/chromium/content/browser/TestsJavaScriptEvalTest.java public/android/javatests/src/org/chromium/content/browser/TracingControllerAndroidTest.java public/android/javatests/src/org/chromium/content/browser/TransitionTest.java public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java public/android/javatests/src/org/chromium/content/browser/ViewportTest.java public/android/javatests/src/org/chromium/content/browser/WebContentsObserverAndroidTest.java public/android/javatests/src/org/chromium/content/browser/crypto/CipherFactoryTest.java public/android/javatests/src/org/chromium/content/browser/input/AdapterInputConnectionTest.java public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java public/android/javatests/src/org/chromium/content/browser/input/InputDialogContainerTest.java public/android/javatests/src/org/chromium/content/browser/input/SelectPopupTest.java public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellPreconditionsTest.java shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellShellManagementTest.java shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java ) public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:210: testSelectActionBarClearedOnTappingInput() is already defined in org.chromium.content.browser.input.ImeTest public void testSelectActionBarClearedOnTappingInput() throws Exception { ^ public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:221: testSelectActionBarClearedOnTappingOutsideInput() is already defined in org.chromium.content.browser.input.ImeTest public void testSelectActionBarClearedOnTappingOutsideInput() throws Exception { ^ 2 errors
Message was sent while issue was closed.
A revert of this CL (patchset #3) has been created in https://codereview.chromium.org/510953003/ by ajwong@chromium.org. The reason for reverting is: See previous review message. .
Message was sent while issue was closed.
On 2014/08/27 22:47:32, awong wrote: > A revert of this CL (patchset #3) has been created in > https://codereview.chromium.org/510953003/ by mailto:ajwong@chromium.org. > > The reason for reverting is: See previous review message. . FYI, it looks like a CQ bug double-committed this patch which is why it failed. My "revert" ended up undoing one of them which I think means your code is still in there. Please take a look at HEAD and see if it looks right to you.
Message was sent while issue was closed.
This appears to be failing to compile: http://build.chromium.org/p/chromium.perf/builders/Android%20Builder/builds/2... public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:210: error: method testSelectActionBarClearedOnTappingInput() is already defined in class ImeTest public void testSelectActionBarClearedOnTappingInput() throws Exception { ^ public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java:221: error: method testSelectActionBarClearedOnTappingOutsideInput() is already defined in class ImeTest public void testSelectActionBarClearedOnTappingOutsideInput() throws Exception { Should I revert?
Message was sent while issue was closed.
Oops, I missed awong's message. Disregard.
Message was sent while issue was closed.
On 2014/08/27 23:06:34, epennerAtGoogle wrote: > Oops, I missed awong's message. Disregard. @awong and epennerAtGoogle - When I build locally and ran UT, I have not observed any error. Also the failed bot is not showing this error in the Trybot. Could you please give more details about the failure ?
Message was sent while issue was closed.
On 2014/08/28 02:26:52, AKV wrote: > On 2014/08/27 23:06:34, epennerAtGoogle wrote: > > Oops, I missed awong's message. Disregard. > > @awong and epennerAtGoogle - When I build locally and ran UT, I have not > observed any error. Also the failed bot is not showing this error in the Trybot. > Could you please give more details about the failure ? Sorry to bother, I got the problem. Double submission happened. One you reverted already. Thanks :)
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/551073003/ by arv@chromium.org. The reason for reverting is: This test fails on Android Tests (dbg) C 850.137s Main [FAIL] org.chromium.content.browser.input.ImeTest#testSelectActionBarClearedOnTappingInput: C 850.137s Main junit.framework.AssertionFailedError C 850.137s Main at org.chromium.content.browser.input.ImeTest.assertWaitForSelectActionBarStatus(ImeTest.java:698) C 850.137s Main at org.chromium.content.browser.input.ImeTest.testSelectActionBarClearedOnTappingInput(ImeTest.java:206) C 850.137s Main at java.lang.reflect.Method.invokeNative(Native Method) C 850.137s Main at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) C 850.137s Main at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) C 850.137s Main at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) C 850.137s Main at org.chromium.content_shell_apk.ContentShellTestBase.runTest(ContentShellTestBase.java:227) C 850.137s Main at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191) C 850.137s Main at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176) C 850.137s Main at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554) C 850.137s Main at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701).
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/93eddfdc3d46fc6e3330e4a987e6e110f703533b Cr-Commit-Position: refs/heads/master@{#292247}
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/5818759b61597b65661e521b80eead8448921bb8 Cr-Commit-Position: refs/heads/master@{#292248} |