| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |