Lines Matching refs:ClassLoaderContext
45 void VerifyContextSize(ClassLoaderContext* context, size_t expected_size) { in VerifyContextSize()
50 void VerifyClassLoaderPCL(ClassLoaderContext* context, in VerifyClassLoaderPCL()
54 context, index, ClassLoaderContext::kPathClassLoader, classpath); in VerifyClassLoaderPCL()
57 void VerifyClassLoaderDLC(ClassLoaderContext* context, in VerifyClassLoaderDLC()
61 context, index, ClassLoaderContext::kDelegateLastClassLoader, classpath); in VerifyClassLoaderDLC()
64 void VerifyClassLoaderIMC(ClassLoaderContext* context, in VerifyClassLoaderIMC()
68 context, index, ClassLoaderContext::kInMemoryDexClassLoader, classpath); in VerifyClassLoaderIMC()
71 void VerifyClassLoaderSharedLibraryPCL(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryPCL()
76 context, loader_index, shared_library_index, ClassLoaderContext::kPathClassLoader, in VerifyClassLoaderSharedLibraryPCL()
80 void VerifyClassLoaderSharedLibraryIMC(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryIMC()
85 context, loader_index, shared_library_index, ClassLoaderContext::kInMemoryDexClassLoader, in VerifyClassLoaderSharedLibraryIMC()
89 void VerifySharedLibrariesSize(ClassLoaderContext* context, in VerifySharedLibrariesSize()
94 const ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(loader_index); in VerifySharedLibrariesSize()
98 void VerifyClassLoaderSharedLibraryDLC(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryDLC()
103 context, loader_index, shared_library_index, ClassLoaderContext::kDelegateLastClassLoader, in VerifyClassLoaderSharedLibraryDLC()
107 void VerifyClassLoaderPCLFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderPCLFromTestDex()
111 context, index, ClassLoaderContext::kPathClassLoader, test_name); in VerifyClassLoaderPCLFromTestDex()
114 void VerifyClassLoaderDLCFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderDLCFromTestDex()
118 context, index, ClassLoaderContext::kDelegateLastClassLoader, test_name); in VerifyClassLoaderDLCFromTestDex()
121 void VerifyClassLoaderIMCFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderIMCFromTestDex()
125 context, index, ClassLoaderContext::kInMemoryDexClassLoader, test_name, "<unknown>"); in VerifyClassLoaderIMCFromTestDex()
142 ClassLoaderContext* context, in VerifyOpenDexFiles()
149 ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(index); in VerifyOpenDexFiles()
179 std::unique_ptr<ClassLoaderContext> CreateContextForClassLoader(jobject class_loader) { in CreateContextForClassLoader()
180 return ClassLoaderContext::CreateContextForClassLoader(class_loader, nullptr); in CreateContextForClassLoader()
183 std::unique_ptr<ClassLoaderContext> ParseContextWithChecksums(const std::string& context_spec) { in ParseContextWithChecksums()
184 std::unique_ptr<ClassLoaderContext> context(new ClassLoaderContext()); in ParseContextWithChecksums()
191 void VerifyContextForClassLoader(ClassLoaderContext* context) { in VerifyContextForClassLoader()
217 void PretendContextOpenedDexFiles(ClassLoaderContext* context) { in PretendContextOpenedDexFiles()
223 void VerifyClassLoaderInfo(ClassLoaderContext* context, in VerifyClassLoaderInfo()
225 ClassLoaderContext::ClassLoaderType type, in VerifyClassLoaderInfo()
229 ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(index); in VerifyClassLoaderInfo()
236 void VerifyClassLoaderInfoSL(ClassLoaderContext* context, in VerifyClassLoaderInfoSL()
239 ClassLoaderContext::ClassLoaderType type, in VerifyClassLoaderInfoSL()
243 const ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(loader_index); in VerifyClassLoaderInfoSL()
245 const ClassLoaderContext::ClassLoaderInfo& sl = in VerifyClassLoaderInfoSL()
253 void VerifyClassLoaderFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderFromTestDex()
255 ClassLoaderContext::ClassLoaderType type, in VerifyClassLoaderFromTestDex()
274 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(""); in TEST_F()
281 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("&"); in TEST_F()
287 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("PCL[a.dex]"); in TEST_F()
293 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("DLC[a.dex]"); in TEST_F()
299 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums("IMC[<unknown>*111]"); in TEST_F()
306 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("IMC[<unknown>]"); in TEST_F()
313 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("IMC[a.dex*111]"); in TEST_F()
318 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
319 ClassLoaderContext::Create("PCL[a.dex:b.dex];DLC[c.dex:d.dex];PCL[e.dex]"); in TEST_F()
327 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F()
337 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F()
344 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F()
351 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F()
363 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
364 ClassLoaderContext::Create("DLC[]"); in TEST_F()
370 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
371 ClassLoaderContext::Create("DLC[]{}"); in TEST_F()
377 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
378 ClassLoaderContext::Create(OatFile::kSpecialSharedLibrary); in TEST_F()
383 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("ABC[a.dex]")); in TEST_F()
384 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL")); in TEST_F()
385 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL[a.dex")); in TEST_F()
386 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCLa.dex]")); in TEST_F()
387 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL{a.dex}")); in TEST_F()
388 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL[a.dex];DLC[b.dex")); in TEST_F()
389 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL[a.dex]{ABC};DLC[b.dex")); in TEST_F()
390 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL[a.dex]{};DLC[b.dex")); in TEST_F()
391 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("DLC[s4.dex]}")); in TEST_F()
392 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("DLC[s4.dex]{")); in TEST_F()
393 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("DLC{DLC[s4.dex]}")); in TEST_F()
394 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL{##}")); in TEST_F()
395 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL{PCL[s4.dex]#}")); in TEST_F()
396 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL{PCL[s4.dex]##}")); in TEST_F()
397 ASSERT_TRUE(nullptr == ClassLoaderContext::Create("PCL{PCL[s4.dex]{PCL[s3.dex]}#}")); in TEST_F()
401 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
402 ClassLoaderContext::Create("PCL[does_not_exist.dex]"); in TEST_F()
413 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
414 ClassLoaderContext::Create( in TEST_F()
463 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
464 ClassLoaderContext::Create( in TEST_F()
497 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
498 ClassLoaderContext::Create( in TEST_F()
518 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
519 ClassLoaderContext::Create("PCL[does_not_exist.dex];DLC[" + dex_name + "]"); in TEST_F()
524 std::unique_ptr<ClassLoaderContext> context; in TEST_F()
534 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
535 ClassLoaderContext::Create("PCL[" + dex_name + "]"); in TEST_F()
571 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
572 ClassLoaderContext::Create(""); in TEST_F()
598 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("&"); in TEST_F()
637 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F()
707 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F()
795 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F()
895 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F()
983 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
984 ClassLoaderContext::Create("PCL[a.dex]"); in TEST_F()
1010 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F()
1086 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
1087 ClassLoaderContext::Create("PCL[" + dex1_name + ":" + dex2_name + "]"); in TEST_F()
1102 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F()
1118 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
1119 ClassLoaderContext::Create("PCL[" + dex1_name + ":" + dex2_name + "]"); in TEST_F()
1131 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F()
1141 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
1151 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
1165 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
1193 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F()
1206 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
1232 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
1250 std::unique_ptr<ClassLoaderContext> context = in TEST_F()
1263 ClassLoaderContext::EncodeClassPathContextsForClassLoader(class_loader); in TEST_F()
1282 empty, ClassLoaderContext::EncodeClassPathContextsForClassLoader(CreateForeignClassLoader())); in TEST_F()
1288 ClassLoaderContext::EncodeClassPathContextsForClassLoader(class_loader); in TEST_F()
1291 ClassLoaderContext::kUnsupportedClassLoaderContextEncoding, in TEST_F()
1299 ClassLoaderContext::EncodeClassPathContextsForClassLoader(class_loader); in TEST_F()
1302 ClassLoaderContext::kUnsupportedClassLoaderContextEncoding, in TEST_F()
1305 ClassLoaderContext::kUnsupportedClassLoaderContextEncoding, in TEST_F()
1312 ClassLoaderContext::EncodeClassPathContextsForClassLoader(class_loader); in TEST_F()
1315 ClassLoaderContext::kUnsupportedClassLoaderContextEncoding, in TEST_F()
1320 ASSERT_TRUE(ClassLoaderContext::IsValidEncoding("PCL[]")); in TEST_F()
1321 ASSERT_TRUE(ClassLoaderContext::IsValidEncoding("PCL[foo.dex]")); in TEST_F()
1322 ASSERT_TRUE(ClassLoaderContext::IsValidEncoding("PCL[foo.dex];PCL[bar.dex]")); in TEST_F()
1323 ASSERT_TRUE(ClassLoaderContext::IsValidEncoding("DLC[];PCL[bar.dex]")); in TEST_F()
1325 ClassLoaderContext::IsValidEncoding( in TEST_F()
1326 ClassLoaderContext::kUnsupportedClassLoaderContextEncoding)); in TEST_F()
1327 ASSERT_FALSE(ClassLoaderContext::IsValidEncoding("not_valid")); in TEST_F()
1328 ASSERT_FALSE(ClassLoaderContext::IsValidEncoding("[]")); in TEST_F()
1329 ASSERT_FALSE(ClassLoaderContext::IsValidEncoding("FCL[]")); in TEST_F()
1330 ASSERT_FALSE(ClassLoaderContext::IsValidEncoding("foo.dex:bar.dex")); in TEST_F()
1352 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F()
1381 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F()
1394 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F()
1399 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1404 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F()
1414 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1418 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1422 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1426 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1430 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1434 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1438 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1442 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1447 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F()
1458 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1463 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F()
1469 ClassLoaderContext::VerificationResult::kForcedToSkipChecks); in TEST_F()
1476 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F()
1488 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1494 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1500 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1506 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1512 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1519 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1525 ClassLoaderContext::VerificationResult::kMismatch); in TEST_F()
1533 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F()
1545 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1554 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F()
1558 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1568 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1577 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F()
1581 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1591 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1597 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F()
1601 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1611 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1629 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F()
1637 ClassLoaderContext::VerificationResult::kVerifies); in TEST_F()
1643 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F()
1658 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F()
1672 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F()