diff options
author | Adam Lesinski <adamlesinski@google.com> | 2018-02-09 11:02:13 -0800 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2018-02-09 12:43:17 -0800 |
commit | 2a447172a5b8c4fdb8527602144691802c492c2e (patch) | |
tree | abbd3839e76a0c55628c3c905a9b30f90133e56d /libs/androidfw/tests/AssetManager2_test.cpp | |
parent | 56c82be0d4075a434217a0d56be8e6544fb05a96 (diff) |
Revert "libandroidfw: Make sure to set the 'app as lib' flag"
This reverts commit 9ad287c828a116f844e5c03346c618d83727e4ae.
Bug: 73134570
Change-Id: If930d3a7c17fc2f7ffaebd31281ad5a5d120144f
Diffstat (limited to 'libs/androidfw/tests/AssetManager2_test.cpp')
-rw-r--r-- | libs/androidfw/tests/AssetManager2_test.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/libs/androidfw/tests/AssetManager2_test.cpp b/libs/androidfw/tests/AssetManager2_test.cpp index eaf79cb12901..92462a6cfadf 100644 --- a/libs/androidfw/tests/AssetManager2_test.cpp +++ b/libs/androidfw/tests/AssetManager2_test.cpp @@ -59,7 +59,7 @@ class AssetManager2Test : public ::testing::Test { libclient_assets_ = ApkAssets::Load(GetTestDataPath() + "/libclient/libclient.apk"); ASSERT_NE(nullptr, libclient_assets_); - appaslib_assets_ = ApkAssets::LoadAsSharedLibrary(GetTestDataPath() + "/appaslib/appaslib.apk"); + appaslib_assets_ = ApkAssets::Load(GetTestDataPath() + "/appaslib/appaslib.apk"); ASSERT_NE(nullptr, appaslib_assets_); system_assets_ = ApkAssets::Load(GetTestDataPath() + "/system/system.apk", true /*system*/); @@ -233,25 +233,6 @@ TEST_F(AssetManager2Test, FindsBagResourceFromSharedLibrary) { assetmanager.SetApkAssets( {lib_two_assets_.get(), lib_one_assets_.get(), libclient_assets_.get()}); - const ResolvedBag* bag = assetmanager.GetBag(fix_package_id(lib_one::R::style::Theme, 0x03)); - ASSERT_NE(nullptr, bag); - ASSERT_GE(bag->entry_count, 2u); - - // First two attributes come from lib_one. - EXPECT_EQ(1, bag->entries[0].cookie); - EXPECT_EQ(0x03, get_package_id(bag->entries[0].key)); - EXPECT_EQ(1, bag->entries[1].cookie); - EXPECT_EQ(0x03, get_package_id(bag->entries[1].key)); -} - -TEST_F(AssetManager2Test, FindsStyleResourceWithParentFromSharedLibrary) { - AssetManager2 assetmanager; - - // libclient is built with lib_one and then lib_two in order. - // Reverse the order to test that proper package ID re-assignment is happening. - assetmanager.SetApkAssets( - {lib_two_assets_.get(), lib_one_assets_.get(), libclient_assets_.get()}); - const ResolvedBag* bag = assetmanager.GetBag(libclient::R::style::Theme); ASSERT_NE(nullptr, bag); ASSERT_GE(bag->entry_count, 2u); |