MockOrientationObserver.java revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package org.chromium.content.browser.test.util;
6
7import org.chromium.content.browser.ScreenOrientationListener.ScreenOrientationObserver;
8
9/**
10 * Mock of an OrientationObserver for tests that need to observe ScreenOrientation changes.
11 */
12public class MockOrientationObserver implements ScreenOrientationObserver {
13
14    public int mOrientation = -1;
15    public boolean mHasChanged = false;
16
17    @Override
18    public void onScreenOrientationChanged(int orientation) {
19        mOrientation = orientation;
20        mHasChanged = true;
21    }
22}
23