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

Skip to content
Commit 39ed1b0a authored by Mehdi Alizadeh's avatar Mehdi Alizadeh
Browse files

Use client context to pass ShortcutManager tests

Uses client context in unit tests to pass the shortcut package name
check.

Before applying this change unit tests were failing with this error:

STACKTRACE:
junit.framework.AssertionFailedError: Expected exception type was
  java.lang.IllegalArgumentException but caught
  java.lang.SecurityException: Shortcut package name mismatch (message=)
at junit.framework.Assert.fail(Assert.java:50) at
junit.framework.Assert.assertTrue(Assert.java:20) at
com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils
  .assertExpectException(ShortcutManagerTestUtils.java:429) at
com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils
  .assertExpectException(ShortcutManagerTestUtils.java:410) at
com.android.server.pm.ShortcutManagerTest2
  .testShortcutInfoMissingMandatoryFields(ShortcutManagerTest2.java:154)

Test: atest com.android.server.pm.ShortcutManagerTest1
Test: atest com.android.server.pm.ShortcutManagerTest2
Test: atest com.android.server.pm.ShortcutManagerTest3
Test: atest com.android.server.pm.ShortcutManagerTest4
Test: atest com.android.server.pm.ShortcutManagerTest5
Test: atest com.android.server.pm.ShortcutManagerTest6
Test: atest com.android.server.pm.ShortcutManagerTest7
Test: atest com.android.server.pm.ShortcutManagerTest8
Test: atest com.android.server.pm.ShortcutManagerTest9
Test: atest com.android.server.pm.ShortcutManagerTest10
Change-Id: I93e306dbcec206557da3f4c40cb12576e1ec8383
parent 05fa5e1c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment