|
|
Created:
6 years, 4 months ago by mlamouri (slow - plz ping) Modified:
6 years, 4 months ago CC:
chromium-reviews, darin-cc_chromium.org, jam Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionRe-enable ScreenOrientationListenerTest.java and run locking on UI thread.
BUG=356483, 354553
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287112
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287225
Patch Set 1 #
Total comments: 4
Patch Set 2 : review comments #
Total comments: 4
Patch Set 3 : review comments #Patch Set 4 : fix assert #Patch Set 5 : forgot one wrapping #Patch Set 6 : remove useless tests #Patch Set 7 : #
Total comments: 6
Patch Set 8 : review comment #
Messages
Total messages: 25 (0 generated)
Jared, I moved this out of the older CL so I can re-enable that test before re-enabling the other. WDYT?
On 2014/07/31 17:19:10, Mounir Lamouri wrote: > Jared, I moved this out of the older CL so I can re-enable that test before > re-enabling the other. > > WDYT? Also, I applied your comments except two: I'm not checking that the criteria return true because there might be valid situation where it does not.
https://codereview.chromium.org/434693002/diff/1/content/public/android/javat... File content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java (right): https://codereview.chromium.org/434693002/diff/1/content/public/android/javat... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:71: final int orientationForThread = orientation; I don't think you need this intermediate variable if the method argument is already final. https://codereview.chromium.org/434693002/diff/1/content/public/android/javat... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:82: CriteriaHelper.pollForCriteria(criteria); Will the criteria be satisifed synchronously with respect to the |lockOrientation| call? If not, you'll probably want to use runOnUiThreadBlocking(), then do pollForCriteria on the test thread (outside of the Runnable).
https://codereview.chromium.org/434693002/diff/1/content/public/android/javat... File content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java (right): https://codereview.chromium.org/434693002/diff/1/content/public/android/javat... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:71: final int orientationForThread = orientation; On 2014/07/31 17:37:11, jdduke wrote: > I don't think you need this intermediate variable if the method argument is > already final. Done. https://codereview.chromium.org/434693002/diff/1/content/public/android/javat... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:82: CriteriaHelper.pollForCriteria(criteria); On 2014/07/31 17:37:11, jdduke wrote: > Will the criteria be satisifed synchronously with respect to the > |lockOrientation| call? If not, you'll probably want to use > runOnUiThreadBlocking(), then do pollForCriteria on the test thread (outside of > the Runnable). I'm not sure I entirely understood what you meant. Let me know if the update matches.
lgtm assuming it passes (modulo a couple thoughts) :) https://codereview.chromium.org/434693002/diff/20001/content/public/android/j... File content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java (right): https://codereview.chromium.org/434693002/diff/20001/content/public/android/j... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:55: ThreadUtils.runOnUiThreadBlocking(runnable); This should work, though I don't believe the waitForIdleSync() call is necessary given the criteria poller. https://codereview.chromium.org/434693002/diff/20001/content/public/android/j... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:71: OrientationChangeObserverCriteria criteria = Maybe move this down below where it's used?
The CQ bit was checked by mlamouri@chromium.org
https://codereview.chromium.org/434693002/diff/20001/content/public/android/j... File content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java (right): https://codereview.chromium.org/434693002/diff/20001/content/public/android/j... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:55: ThreadUtils.runOnUiThreadBlocking(runnable); On 2014/07/31 17:56:31, jdduke wrote: > This should work, though I don't believe the waitForIdleSync() call is necessary > given the criteria poller. Honestly, if that can decrease flakyness... https://codereview.chromium.org/434693002/diff/20001/content/public/android/j... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:71: OrientationChangeObserverCriteria criteria = On 2014/07/31 17:56:31, jdduke wrote: > Maybe move this down below where it's used? Done.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/434693002/40001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tri...) win_chromium_compile_dbg on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tri...)
The CQ bit was checked by mlamouri@chromium.org
The CQ bit was unchecked by mlamouri@chromium.org
The CQ bit was checked by mlamouri@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/434693002/80001
The CQ bit was checked by mlamouri@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/434693002/100001
Message was sent while issue was closed.
Change committed as 287112
Message was sent while issue was closed.
A revert of this CL has been created in https://codereview.chromium.org/431083005/ by peter@chromium.org. The reason for reverting is: This broke the following test on the contentshell_instrumentation_tests on the Android Tests (dbg): ScreenOrientationListenerTest.testConfigurationListenerFlipLandscape http://build.chromium.org/p/chromium.webkit/builders/Android%20Tests%20%28dbg....
The failure came from a 4.3 bot that was running the ConfigurationListener test but got a result I would expect from a DisplayListener. What likely happened is that the bot was already with a DisplayListener and injecting the other listener did not work. Given that: - we have already wasted too much time on this; - injecting a listener is only use for tests; - the other listener will be able to pass those test when we will land the "accurate" mode. I think we should just no longer bother injecting listener and simplify all of this. Peter, can you have a look? Thanks :)
lgtm % comments https://codereview.chromium.org/434693002/diff/120001/content/public/android/... File content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java (right): https://codereview.chromium.org/434693002/diff/120001/content/public/android/... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:54: private void runOnUiThreadAndWait(Runnable runnable) { This is only used once, can we move it in lockOrientationAndWait? https://codereview.chromium.org/434693002/diff/120001/content/public/android/... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:121: public void testVariousChanges() throws Exception { +configuration? could have a somewhat clearer name https://codereview.chromium.org/434693002/diff/120001/content/public/android/... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:165: lockOrientationAndWait(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); Should we perhaps do this in setUp()?
The CQ bit was checked by mlamouri@chromium.org
https://codereview.chromium.org/434693002/diff/120001/content/public/android/... File content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java (right): https://codereview.chromium.org/434693002/diff/120001/content/public/android/... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:54: private void runOnUiThreadAndWait(Runnable runnable) { On 2014/08/02 17:06:24, Peter Beverloo wrote: > This is only used once, can we move it in lockOrientationAndWait? Done. https://codereview.chromium.org/434693002/diff/120001/content/public/android/... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:121: public void testVariousChanges() throws Exception { On 2014/08/02 17:06:24, Peter Beverloo wrote: > +configuration? could have a somewhat clearer name Done. https://codereview.chromium.org/434693002/diff/120001/content/public/android/... content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java:165: lockOrientationAndWait(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); On 2014/08/02 17:06:24, Peter Beverloo wrote: > Should we perhaps do this in setUp()? Done.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/434693002/140001
Message was sent while issue was closed.
Change committed as 287225 |