Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53e5c05d authored by Erik Kline's avatar Erik Kline
Browse files

DO NOT MERGE ANYWHERE

This reverts a duplicate test method resulting from a bad merge.

Test: as follows
    - built

Change-Id: I8ca7c97a28fbf7d20753bb4d1f942e5c04a4edf8
parent c99ff3a1
Loading
Loading
Loading
Loading
+0 −26
Original line number Original line Diff line number Diff line
@@ -326,32 +326,6 @@ public class TetheringTest {
        verifyNoMoreInteractions(mWifiManager);
        verifyNoMoreInteractions(mWifiManager);
    }
    }


    @Test
    public void testUsbConfiguredBroadcastStartsTethering() throws Exception {
        when(mConnectivityManager.isTetheringSupported()).thenReturn(true);

        // Emulate pressing the USB tethering button in Settings UI.
        mTethering.startTethering(TETHERING_USB, null, false);
        mLooper.dispatchAll();
        verify(mUsbManager, times(1)).setCurrentFunction(UsbManager.USB_FUNCTION_RNDIS, false);

        // Pretend we receive a USB connected broadcast. Here we also pretend
        // that the RNDIS function is somehow enabled, so that we see if we
        // might trip ourselves up.
        sendUsbBroadcast(true, false, true);
        mLooper.dispatchAll();
        // This should produce no activity of any kind.
        verifyNoMoreInteractions(mConnectivityManager);
        verifyNoMoreInteractions(mNMService);

        // Pretend we then receive USB configured broadcast.
        sendUsbBroadcast(true, true, true);
        mLooper.dispatchAll();
        // Now we should see the start of tethering mechanics (in this case:
        // tetherMatchingInterfaces() which starts by fetching all interfaces).
        verify(mNMService, times(1)).listInterfaces();
    }

    @Test
    @Test
    public void failingLocalOnlyHotspotLegacyApBroadcastWithIfaceStatusChanged() throws Exception {
    public void failingLocalOnlyHotspotLegacyApBroadcastWithIfaceStatusChanged() throws Exception {
        failingLocalOnlyHotspotLegacyApBroadcast(true);
        failingLocalOnlyHotspotLegacyApBroadcast(true);