charger: Add tests for loading animation resources

Bug: 143907179
Test: run it

Change-Id: I1b1dfe4947210932c674657689e396ae909013c2
diff --git a/healthd/Android.bp b/healthd/Android.bp
index a4300f7..b3de9c4 100644
--- a/healthd/Android.bp
+++ b/healthd/Android.bp
@@ -243,19 +243,22 @@
 
 cc_test {
     name: "libhealthd_charger_test",
-    srcs: ["AnimationParser_test.cpp"],
-    shared_libs: [
-        "liblog",
-        "libbase",
-        "libcutils",
+    defaults: ["charger_defaults"],
+    srcs: [
+        "AnimationParser_test.cpp",
+        "healthd_mode_charger_test.cpp"
     ],
     static_libs: [
-        "libhealthd_charger",
+        "libgmock",
     ],
     test_suites: [
         "general-tests",
         "device-tests",
     ],
+    data: [
+        ":libhealthd_charger_test_data",
+    ],
+    require_root: true,
 }
 
 // /system/etc/res/images/charger/battery_fail.png