summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joshua Tsuji <tsuji@google.com> 2019-08-20 11:37:44 -0400
committer Joshua Tsuji <tsuji@google.com> 2019-08-21 11:30:56 -0400
commitd3c44b51f981ce2985eefb10b1e5c62a8d50c138 (patch)
tree219c025c0c7773b16e219bb7004f68f1d2d3479d
parentce81d325256c391ebcaf96a95c5ddaddc49a36f7 (diff)
Delete FalsingManager tests that are very flaky.
ag/9211998 attempted to ignore these, but presubmit ran into unexplained errors, so we're going to try deleting them to unblock development. Test: much better after this CL I imagine Change-Id: Id00215dfae7eb1096f51ff54259690f72043cc92
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java103
1 files changed, 0 insertions, 103 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java b/packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java
deleted file mode 100644
index 7ea6493da83d..000000000000
--- a/packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.classifier;
-
-import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHTLINE_FALSING_MANAGER_ENABLED;
-
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.junit.Assert.assertThat;
-
-import android.os.Handler;
-import android.provider.DeviceConfig;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.classifier.brightline.BrightLineFalsingManager;
-import com.android.systemui.shared.plugins.PluginManager;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@SmallTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-public class FalsingManagerProxyTest extends SysuiTestCase {
- @Mock
- PluginManager mPluginManager;
- private boolean mDefaultConfigValue;
- private Handler mHandler;
- private TestableLooper mTestableLooper;
-
- @Before
- public void setup() {
- MockitoAnnotations.initMocks(this);
- mTestableLooper = TestableLooper.get(this);
- mHandler = new Handler(mTestableLooper.getLooper());
- mDefaultConfigValue = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI,
- BRIGHTLINE_FALSING_MANAGER_ENABLED, false);
- // In case it runs on a device where it's been set to true, set it to false by hand.
- DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
- BRIGHTLINE_FALSING_MANAGER_ENABLED, "false", false);
- }
-
- @After
- public void tearDown() {
- DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
- BRIGHTLINE_FALSING_MANAGER_ENABLED, mDefaultConfigValue ? "true" : "false", false);
- }
-
- @Test
- public void test_brightLineFalsingManagerDisabled() {
- FalsingManagerProxy proxy = new FalsingManagerProxy(getContext(), mPluginManager, mHandler);
-
- assertThat(proxy.getInternalFalsingManager(), instanceOf(FalsingManagerImpl.class));
- }
-
- @Test
- public void test_brightLineFalsingManagerEnabled() {
- DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
- BRIGHTLINE_FALSING_MANAGER_ENABLED, "true", false);
- FalsingManagerProxy proxy = new FalsingManagerProxy(getContext(), mPluginManager, mHandler);
-
- assertThat(proxy.getInternalFalsingManager(), instanceOf(BrightLineFalsingManager.class));
- }
-
- @Test
- public void test_brightLineFalsingManagerToggled() {
- FalsingManagerProxy proxy = new FalsingManagerProxy(getContext(), mPluginManager, mHandler);
- assertThat(proxy.getInternalFalsingManager(), instanceOf(FalsingManagerImpl.class));
-
- DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
- BRIGHTLINE_FALSING_MANAGER_ENABLED, "true", false);
- mTestableLooper.processAllMessages();
- proxy.setupFalsingManager(getContext());
- assertThat(proxy.getInternalFalsingManager(), instanceOf(BrightLineFalsingManager.class));
-
- DeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
- BRIGHTLINE_FALSING_MANAGER_ENABLED, "false", false);
- mTestableLooper.processAllMessages();
- proxy.setupFalsingManager(getContext());
- assertThat(proxy.getInternalFalsingManager(), instanceOf(FalsingManagerImpl.class));
- }
-}