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

Unified Diff: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/OrientationChangeObserverCriteria.java

Issue 2361633002: android: Introduce DisplayAndroid (Closed)
Patch Set: test comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/OrientationChangeObserverCriteria.java
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/OrientationChangeObserverCriteria.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/OrientationChangeObserverCriteria.java
deleted file mode 100644
index 9ef5aa841b003d3347debb722b385be3734e3046..0000000000000000000000000000000000000000
--- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/OrientationChangeObserverCriteria.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.content.browser.test.util;
-
-/**
- * Criteria used to know when an orientation change happens.
- */
-public class OrientationChangeObserverCriteria extends Criteria {
-
- private final MockOrientationObserver mObserver;
- private final int mTarget;
- private final boolean mCheckTarget;
-
- // Constructor to be used when the criteria is that there is an
- // orientation change but the new orientation value does not matter.
- public OrientationChangeObserverCriteria(MockOrientationObserver observer) {
- mObserver = observer;
- mObserver.mHasChanged = false;
-
- mCheckTarget = false;
- mTarget = -1;
- }
-
- // Constructor to be used when the criteria cares about a change
- // happening to a specific orientation value.
- public OrientationChangeObserverCriteria(MockOrientationObserver observer, int target) {
- mObserver = observer;
- mObserver.mHasChanged = false;
-
- mTarget = target;
- mCheckTarget = true;
- }
-
- @Override
- public boolean isSatisfied() {
- if (!mObserver.mHasChanged) return false;
-
- return !mCheckTarget || mObserver.mOrientation == mTarget;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698