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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/PopupZoomerTest.java

Issue 2779033004: [Android] Focus/Blur contents when window focus changes (Closed)
Patch Set: Address comments Created 3 years, 8 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.graphics.Canvas; 9 import android.graphics.Canvas;
10 import android.graphics.Rect; 10 import android.graphics.Rect;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 mPopupZoomer.show(new Rect(0, 0, 5, 5)); 215 mPopupZoomer.show(new Rect(0, 0, 5, 5));
216 216
217 // Wait for the animation to finish. 217 // Wait for the animation to finish.
218 mPopupZoomer.finishPendingDraws(); 218 mPopupZoomer.finishPendingDraws();
219 219
220 // The view should be visible. 220 // The view should be visible.
221 assertEquals(View.VISIBLE, mPopupZoomer.getVisibility()); 221 assertEquals(View.VISIBLE, mPopupZoomer.getVisibility());
222 assertTrue(mPopupZoomer.isShowing()); 222 assertTrue(mPopupZoomer.isShowing());
223 223
224 // Simulate losing the focus. 224 // Simulate losing the focus.
225 mContentViewCore.onFocusChanged(false, true); 225 mContentViewCore.onFocusChangedInternal(true, false, true);
226 226
227 // Wait for the hide animation to finish. 227 // Wait for the hide animation to finish.
228 mPopupZoomer.finishPendingDraws(); 228 mPopupZoomer.finishPendingDraws();
229 229
230 // Now that another view has been focused, the view should be invisible. 230 // Now that another view has been focused, the view should be invisible.
231 assertEquals(View.INVISIBLE, mPopupZoomer.getVisibility()); 231 assertEquals(View.INVISIBLE, mPopupZoomer.getVisibility());
232 assertFalse(mPopupZoomer.isShowing()); 232 assertFalse(mPopupZoomer.isShowing());
233 } 233 }
234 } 234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698