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

Commit 8feaad72 authored by Neil Fuller's avatar Neil Fuller Committed by Gerrit Code Review
Browse files

Merge "Re-enable some test cases"

parents 24a2adfa 29ff71ba
Loading
Loading
Loading
Loading
+38 −40
Original line number Diff line number Diff line
@@ -198,26 +198,25 @@ public class PackageTrackerTest {
        mFakeIntentHelper.assertReliabilityTriggeringDisabled();
    }

    // TODO(nfuller): Uncomment or delete when it's clear what will happen with http://b/35995024
    // @Test
    // public void trackingEnabled_updateAppNotPrivileged() throws Exception {
    //     // Set up device configuration.
    //     configureTrackingEnabled();
    //     configureReliabilityConfigSettingsOk();
    //     configureUpdateAppPackageNotPrivileged(UPDATE_APP_PACKAGE_NAME);
    //     configureDataAppPackageOk(DATA_APP_PACKAGE_NAME);
    //
    //     try {
    //         // Initialize the tracker.
    //         mPackageTracker.start();
    //         fail();
    //     } catch (RuntimeException expected) {}
    //
    //     mFakeIntentHelper.assertNotInitialized();
    //
    //     // Check reliability triggering state.
    //     mFakeIntentHelper.assertReliabilityTriggeringDisabled();
    // }
    @Test
    public void trackingEnabled_updateAppNotPrivileged() throws Exception {
        // Set up device configuration.
        configureTrackingEnabled();
        configureReliabilityConfigSettingsOk();
        configureUpdateAppPackageNotPrivileged(UPDATE_APP_PACKAGE_NAME);
        configureDataAppPackageOk(DATA_APP_PACKAGE_NAME);

        try {
            // Initialize the tracker.
            mPackageTracker.start();
            fail();
        } catch (RuntimeException expected) {}

        mFakeIntentHelper.assertNotInitialized();

        // Check reliability triggering state.
        mFakeIntentHelper.assertReliabilityTriggeringDisabled();
    }

    @Test
    public void trackingEnabled_dataAppConfigMissing() throws Exception {
@@ -239,26 +238,25 @@ public class PackageTrackerTest {
        mFakeIntentHelper.assertReliabilityTriggeringDisabled();
    }

    // TODO(nfuller): Uncomment or delete when it's clear what will happen with http://b/35995024
    // @Test
    // public void trackingEnabled_dataAppNotPrivileged() throws Exception {
    //     // Set up device configuration.
    //     configureTrackingEnabled();
    //     configureReliabilityConfigSettingsOk();
    //     configureUpdateAppPackageOk(UPDATE_APP_PACKAGE_NAME);
    //     configureDataAppPackageNotPrivileged(DATA_APP_PACKAGE_NAME);
    //
    //     try {
    //         // Initialize the tracker.
    //         mPackageTracker.start();
    //         fail();
    //     } catch (RuntimeException expected) {}
    //
    //     mFakeIntentHelper.assertNotInitialized();
    //
    //     // Check reliability triggering state.
    //     mFakeIntentHelper.assertReliabilityTriggeringDisabled();
    // }
    @Test
    public void trackingEnabled_dataAppNotPrivileged() throws Exception {
        // Set up device configuration.
        configureTrackingEnabled();
        configureReliabilityConfigSettingsOk();
        configureUpdateAppPackageOk(UPDATE_APP_PACKAGE_NAME);
        configureDataAppPackageNotPrivileged(DATA_APP_PACKAGE_NAME);

        try {
            // Initialize the tracker.
            mPackageTracker.start();
            fail();
        } catch (RuntimeException expected) {}

        mFakeIntentHelper.assertNotInitialized();

        // Check reliability triggering state.
        mFakeIntentHelper.assertReliabilityTriggeringDisabled();
     }

    @Test
    public void trackingEnabled_packageUpdate_badUpdateAppManifestEntry() throws Exception {