Lines Matching refs:context
69 void VerifyContextSize(ClassLoaderContext* context, size_t expected_size) { in VerifyContextSize() argument
70 ASSERT_TRUE(context != nullptr); in VerifyContextSize()
71 ASSERT_EQ(expected_size, context->GetParentChainSize()); in VerifyContextSize()
74 void VerifyClassLoaderPCL(ClassLoaderContext* context, in VerifyClassLoaderPCL() argument
78 context, index, ClassLoaderContext::kPathClassLoader, classpath); in VerifyClassLoaderPCL()
81 void VerifyClassLoaderDLC(ClassLoaderContext* context, in VerifyClassLoaderDLC() argument
85 context, index, ClassLoaderContext::kDelegateLastClassLoader, classpath); in VerifyClassLoaderDLC()
88 void VerifyClassLoaderIMC(ClassLoaderContext* context, in VerifyClassLoaderIMC() argument
92 context, index, ClassLoaderContext::kInMemoryDexClassLoader, classpath); in VerifyClassLoaderIMC()
95 void VerifyClassLoaderSharedLibraryPCL(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryPCL() argument
100 context, loader_index, shared_library_index, ClassLoaderContext::kPathClassLoader, in VerifyClassLoaderSharedLibraryPCL()
104 void VerifyClassLoaderSharedLibraryPCLAfter(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryPCLAfter() argument
109 context, loader_index, shared_library_index, ClassLoaderContext::kPathClassLoader, in VerifyClassLoaderSharedLibraryPCLAfter()
113 void VerifyClassLoaderSharedLibraryIMC(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryIMC() argument
118 context, loader_index, shared_library_index, ClassLoaderContext::kInMemoryDexClassLoader, in VerifyClassLoaderSharedLibraryIMC()
122 void VerifySharedLibrariesSize(ClassLoaderContext* context, in VerifySharedLibrariesSize() argument
125 ASSERT_TRUE(context != nullptr); in VerifySharedLibrariesSize()
126 ASSERT_GT(context->GetParentChainSize(), loader_index); in VerifySharedLibrariesSize()
127 const ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(loader_index); in VerifySharedLibrariesSize()
131 void VerifyClassLoaderSharedLibraryDLC(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryDLC() argument
136 context, loader_index, shared_library_index, ClassLoaderContext::kDelegateLastClassLoader, in VerifyClassLoaderSharedLibraryDLC()
140 void VerifyClassLoaderPCLFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderPCLFromTestDex() argument
144 context, index, ClassLoaderContext::kPathClassLoader, test_name); in VerifyClassLoaderPCLFromTestDex()
147 void VerifyClassLoaderDLCFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderDLCFromTestDex() argument
151 context, index, ClassLoaderContext::kDelegateLastClassLoader, test_name); in VerifyClassLoaderDLCFromTestDex()
154 void VerifyClassLoaderIMCFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderIMCFromTestDex() argument
158 context, index, ClassLoaderContext::kInMemoryDexClassLoader, test_name, "<unknown>"); in VerifyClassLoaderIMCFromTestDex()
175 ClassLoaderContext* context, in VerifyOpenDexFiles() argument
180 ASSERT_TRUE(context != nullptr); in VerifyOpenDexFiles()
182 ASSERT_EQ(context->dex_files_state_, in VerifyOpenDexFiles()
185 ASSERT_EQ(context->dex_files_state_, in VerifyOpenDexFiles()
188 ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(index); in VerifyOpenDexFiles()
254 std::unique_ptr<ClassLoaderContext> context(new ClassLoaderContext()); in ParseContextWithChecksums() local
255 if (!context->Parse(context_spec, /*parse_checksums=*/ true)) { in ParseContextWithChecksums()
258 return context; in ParseContextWithChecksums()
261 void VerifyContextForClassLoader(ClassLoaderContext* context) { in VerifyContextForClassLoader() argument
262 ASSERT_TRUE(context != nullptr); in VerifyContextForClassLoader()
263 ASSERT_EQ(context->dex_files_state_, ClassLoaderContext::ContextDexFilesState::kDexFilesOpened); in VerifyContextForClassLoader()
264 ASSERT_FALSE(context->owns_the_dex_files_); in VerifyContextForClassLoader()
285 void PretendContextOpenedDexFiles(ClassLoaderContext* context) { in PretendContextOpenedDexFiles() argument
286 context->dex_files_state_ = ClassLoaderContext::ContextDexFilesState::kDexFilesOpened; in PretendContextOpenedDexFiles()
289 void PretendContextOpenedDexFilesForChecksums(ClassLoaderContext* context) { in PretendContextOpenedDexFilesForChecksums() argument
290 context->dex_files_state_ = ClassLoaderContext::ContextDexFilesState::kDexFilesChecksumsRead; in PretendContextOpenedDexFilesForChecksums()
298 std::unique_ptr<ClassLoaderContext> context = in TestOpenDexFiles() local
303 ASSERT_TRUE(context->OpenDexFiles( in TestOpenDexFiles()
308 VerifyContextSize(context.get(), 2); in TestOpenDexFiles()
315 VerifyOpenDexFiles(context.get(), in TestOpenDexFiles()
321 VerifyOpenDexFiles(context.get(), in TestOpenDexFiles()
345 std::unique_ptr<ClassLoaderContext> context = in TestOpenValidDexFilesRelative() local
350 ASSERT_TRUE(context->OpenDexFiles( in TestOpenValidDexFilesRelative()
354 VerifyContextSize(context.get(), 2); in TestOpenValidDexFilesRelative()
361 VerifyOpenDexFiles(context.get(), in TestOpenValidDexFilesRelative()
368 VerifyOpenDexFiles(context.get(), in TestOpenValidDexFilesRelative()
392 void VerifyClassLoaderInfo(ClassLoaderContext* context, in VerifyClassLoaderInfo() argument
396 ASSERT_TRUE(context != nullptr); in VerifyClassLoaderInfo()
397 ASSERT_GT(context->GetParentChainSize(), index); in VerifyClassLoaderInfo()
398 ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(index); in VerifyClassLoaderInfo()
405 void VerifyClassLoaderInfoSL(ClassLoaderContext* context, in VerifyClassLoaderInfoSL() argument
410 ASSERT_TRUE(context != nullptr); in VerifyClassLoaderInfoSL()
411 ASSERT_GT(context->GetParentChainSize(), loader_index); in VerifyClassLoaderInfoSL()
412 const ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(loader_index); in VerifyClassLoaderInfoSL()
422 void VerifyClassLoaderInfoSLAfter(ClassLoaderContext* context, in VerifyClassLoaderInfoSLAfter() argument
427 ASSERT_TRUE(context != nullptr); in VerifyClassLoaderInfoSLAfter()
428 ASSERT_GT(context->GetParentChainSize(), loader_index); in VerifyClassLoaderInfoSLAfter()
429 const ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(loader_index); in VerifyClassLoaderInfoSLAfter()
440 void VerifyClassLoaderFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderFromTestDex() argument
449 VerifyClassLoaderInfo(context, in VerifyClassLoaderFromTestDex()
453 VerifyOpenDexFiles(context, in VerifyClassLoaderFromTestDex()
461 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(""); in TEST_F() local
463 VerifyContextSize(context.get(), 1); in TEST_F()
464 VerifyClassLoaderPCL(context.get(), 0, ""); in TEST_F()
469 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("&"); in TEST_F() local
470 ASSERT_TRUE(context == nullptr); in TEST_F()
474 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("PCL[a.dex]"); in TEST_F() local
475 VerifyContextSize(context.get(), 1); in TEST_F()
476 VerifyClassLoaderPCL(context.get(), 0, "a.dex"); in TEST_F()
480 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("DLC[a.dex]"); in TEST_F() local
481 VerifyContextSize(context.get(), 1); in TEST_F()
482 VerifyClassLoaderDLC(context.get(), 0, "a.dex"); in TEST_F()
486 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums("IMC[<unknown>*111]"); in TEST_F() local
487 ASSERT_FALSE(context == nullptr); in TEST_F()
493 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("IMC[<unknown>]"); in TEST_F() local
494 ASSERT_TRUE(context == nullptr); in TEST_F()
500 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("IMC[a.dex*111]"); in TEST_F() local
501 ASSERT_TRUE(context == nullptr); in TEST_F()
505 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
507 VerifyContextSize(context.get(), 3); in TEST_F()
508 VerifyClassLoaderPCL(context.get(), 0, "a.dex:b.dex"); in TEST_F()
509 VerifyClassLoaderDLC(context.get(), 1, "c.dex:d.dex"); in TEST_F()
510 VerifyClassLoaderPCL(context.get(), 2, "e.dex"); in TEST_F()
514 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F() local
517 VerifyContextSize(context.get(), 2); in TEST_F()
518 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "s1.dex"); in TEST_F()
519 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 1, "s2.dex:s3.dex"); in TEST_F()
520 VerifyClassLoaderSharedLibraryPCLAfter(context.get(), 0, 0, "s5.dex"); in TEST_F()
521 VerifyClassLoaderSharedLibraryPCLAfter(context.get(), 0, 1, "s6.dex:s7.dex"); in TEST_F()
522 VerifyClassLoaderDLC(context.get(), 1, "c.dex:d.dex"); in TEST_F()
523 VerifyClassLoaderSharedLibraryDLC(context.get(), 1, 0, "s4.dex"); in TEST_F()
527 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F() local
529 VerifyContextSize(context.get(), 1); in TEST_F()
530 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "s1.dex"); in TEST_F()
534 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F() local
536 VerifyContextSize(context.get(), 1); in TEST_F()
537 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "s4.dex"); in TEST_F()
541 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F() local
544 VerifyContextSize(context.get(), 1); in TEST_F()
545 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "s1.dex"); in TEST_F()
546 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 1, "s2.dex"); in TEST_F()
547 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 2, "s3.dex"); in TEST_F()
548 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 3, "s4.dex"); in TEST_F()
549 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 4, "s5.dex"); in TEST_F()
553 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
555 VerifyContextSize(context.get(), 1); in TEST_F()
556 VerifyClassLoaderDLC(context.get(), 0, ""); in TEST_F()
560 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
562 VerifyContextSize(context.get(), 1); in TEST_F()
563 VerifySharedLibrariesSize(context.get(), 0, 0); in TEST_F()
585 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
587 VerifyContextSize(context.get(), 1); in TEST_F()
588 ASSERT_FALSE(context->OpenDexFiles(".")); in TEST_F()
592 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
594 VerifyContextSize(context.get(), 1); in TEST_F()
595 ASSERT_FALSE(context->OpenDexFiles( in TEST_F()
627 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
629 ASSERT_FALSE(context->OpenDexFiles()); in TEST_F()
634 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
636 ASSERT_FALSE(context->OpenDexFiles( in TEST_F()
643 std::unique_ptr<ClassLoaderContext> context; in TEST_F() local
646 context = ParseContextWithChecksums("IMC[<unknown>*111]"); in TEST_F()
647 VerifyContextSize(context.get(), 1); in TEST_F()
648 ASSERT_FALSE(context->OpenDexFiles(".")); in TEST_F()
654 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
659 ASSERT_TRUE(context->OpenDexFiles( in TEST_F()
665 context.get(), in TEST_F()
671 ASSERT_TRUE(context->OpenDexFiles( in TEST_F()
677 context.get(), in TEST_F()
686 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
688 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
695 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
722 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
724 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
730 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
760 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
761 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
769 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
830 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
831 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
839 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
917 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
918 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
926 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
1016 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
1017 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
1025 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
1103 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1111 ASSERT_FALSE(context->RemoveLocationsFromClassPaths(compilation_sources)); in TEST_F()
1112 VerifyClassLoaderPCL(context.get(), 0, "a.dex"); in TEST_F()
1114 ASSERT_TRUE(context->RemoveLocationsFromClassPaths(classpath_dex)); in TEST_F()
1115 VerifyClassLoaderPCL(context.get(), 0, ""); in TEST_F()
1130 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
1131 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
1139 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
1205 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1207 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
1211 std::string encoding = context->EncodeContextForOatFile(""); in TEST_F()
1214 ASSERT_EQ(expected_encoding, context->EncodeContextForOatFile("")); in TEST_F()
1221 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1223 ASSERT_TRUE(context->OpenDexFiles( in TEST_F()
1228 std::string encoding = context->EncodeContextForOatFile(""); in TEST_F()
1231 ASSERT_EQ(expected_encoding, context->EncodeContextForOatFile("")); in TEST_F()
1238 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1239 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
1247 std::string encoding = context->EncodeContextForOatFile(""); in TEST_F()
1250 ASSERT_EQ(expected_encoding, context->EncodeContextForOatFile("")); in TEST_F()
1256 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1258 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
1260 std::string encoding = context->EncodeContextForDex2oat(""); in TEST_F()
1262 ASSERT_EQ(expected_encoding, context->EncodeContextForDex2oat("")); in TEST_F()
1269 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1270 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
1272 std::string encoding = context->EncodeContextForDex2oat(""); in TEST_F()
1274 ASSERT_EQ(expected_encoding, context->EncodeContextForDex2oat("")); in TEST_F()
1279 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1281 ASSERT_TRUE(context->OpenDexFiles()); in TEST_F()
1283 std::string encoding = context->EncodeContextForDex2oat(""); in TEST_F()
1285 ASSERT_EQ(expected_encoding, context->EncodeContextForDex2oat("")); in TEST_F()
1290 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1293 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1300 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1303 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1314 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1317 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1342 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1344 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1355 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1358 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1381 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1384 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1399 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1402 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1502 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F() local
1504 VerifyContextForClassLoader(context.get()); in TEST_F()
1505 VerifyContextSize(context.get(), 4); in TEST_F()
1507 VerifyClassLoaderDLCFromTestDex(context.get(), 0, "ForClassLoaderD"); in TEST_F()
1508 VerifyClassLoaderPCLFromTestDex(context.get(), 1, "ForClassLoaderC"); in TEST_F()
1509 VerifyClassLoaderDLCFromTestDex(context.get(), 2, "ForClassLoaderB"); in TEST_F()
1510 VerifyClassLoaderPCLFromTestDex(context.get(), 3, "ForClassLoaderA"); in TEST_F()
1531 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F() local
1533 VerifyContextForClassLoader(context.get()); in TEST_F()
1534 VerifyContextSize(context.get(), 4); in TEST_F()
1536 VerifyClassLoaderDLCFromTestDex(context.get(), 0, "ForClassLoaderD"); in TEST_F()
1537 VerifyClassLoaderIMCFromTestDex(context.get(), 1, "ForClassLoaderC"); in TEST_F()
1538 VerifyClassLoaderIMCFromTestDex(context.get(), 2, "ForClassLoaderB"); in TEST_F()
1539 VerifyClassLoaderPCLFromTestDex(context.get(), 3, "ForClassLoaderA"); in TEST_F()
1544 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1547 PretendContextOpenedDexFilesForChecksums(context.get()); in TEST_F()
1549 VerifyContextSize(context.get(), 2); in TEST_F()
1550 VerifyClassLoaderPCL(context.get(), 0, "a.dex:b.dex"); in TEST_F()
1551 VerifyClassLoaderDLC(context.get(), 1, "c.dex"); in TEST_F()
1553 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1557 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_class_loader_type), in TEST_F()
1561 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_class_loader_order), in TEST_F()
1565 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_classpath_order), in TEST_F()
1569 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_checksum), in TEST_F()
1573 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_extra_class_loader), in TEST_F()
1577 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_extra_classpath), in TEST_F()
1581 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_spec), in TEST_F()
1587 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1590 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1592 VerifyContextSize(context.get(), 3); in TEST_F()
1593 VerifyClassLoaderPCL(context.get(), 0, "a.dex:b.dex"); in TEST_F()
1594 VerifyClassLoaderDLC(context.get(), 1, "c.dex"); in TEST_F()
1595 VerifyClassLoaderIMC(context.get(), 2, "<unknown>"); in TEST_F()
1597 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1605 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1608 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1610 VerifyContextSize(context.get(), 2); in TEST_F()
1611 VerifyClassLoaderPCL(context.get(), 0, "a.dex:b.dex"); in TEST_F()
1612 VerifyClassLoaderDLC(context.get(), 1, "c.dex"); in TEST_F()
1613 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "d.dex"); in TEST_F()
1614 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 1, "f.dex:g.dex"); in TEST_F()
1616 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1622 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_class_loader_type), in TEST_F()
1628 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_class_loader_order), in TEST_F()
1634 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_classpath_order), in TEST_F()
1640 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_checksum), in TEST_F()
1647 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_extra_class_loader), in TEST_F()
1653 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_extra_classpath), in TEST_F()
1662 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1665 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1667 VerifyContextSize(context.get(), 2); in TEST_F()
1668 VerifyClassLoaderIMC(context.get(), 0, "<unknown>:<unknown>"); in TEST_F()
1669 VerifyClassLoaderDLC(context.get(), 1, "c.dex"); in TEST_F()
1670 VerifyClassLoaderSharedLibraryIMC(context.get(), 0, 0, "<unknown>"); in TEST_F()
1671 VerifyClassLoaderSharedLibraryIMC(context.get(), 0, 1, "<unknown>:<unknown>"); in TEST_F()
1673 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1688 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1689 PretendContextOpenedDexFilesForChecksums(context.get()); in TEST_F()
1695 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec_with_symlinks), in TEST_F()
1705 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F() local
1707 std::string context_with_no_base_dir = context->EncodeContextForOatFile(""); in TEST_F()
1708 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_no_base_dir), in TEST_F()
1716 std::string context_with_base_dir = context->EncodeContextForOatFile(parent); in TEST_F()
1718 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_base_dir), in TEST_F()
1728 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F() local
1730 std::string context_with_no_base_dir = context->EncodeContextForOatFile(""); in TEST_F()
1731 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_no_base_dir), in TEST_F()
1739 std::string context_with_base_dir = context->EncodeContextForOatFile(parent); in TEST_F()
1741 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_base_dir), in TEST_F()
1748 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F() local
1750 std::string context_with_no_base_dir = context->EncodeContextForOatFile(""); in TEST_F()
1751 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_no_base_dir), in TEST_F()
1759 std::string context_with_base_dir = context->EncodeContextForOatFile(parent); in TEST_F()
1761 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_base_dir), in TEST_F()
1780 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1781 ASSERT_TRUE(context != nullptr); in TEST_F()
1783 VerifyClassLoaderPCL(context.get(), 0, dex_files[0]->GetLocation()); in TEST_F()
1785 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, dex_files[0]->GetLocation()); in TEST_F()
1787 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context->EncodeContextForOatFile("")), in TEST_F()
1794 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F() local
1796 std::set<const DexFile*> result = context->CheckForDuplicateDexFiles( in TEST_F()
1802 result = context->CheckForDuplicateDexFiles(dex1_raw); in TEST_F()
1809 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F() local
1813 std::set<const DexFile*> result = context->CheckForDuplicateDexFiles(dex1_raw); in TEST_F()
1814 ASSERT_EQ(1u, result.size()) << context->EncodeContextForOatFile(""); in TEST_F()
1823 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1827 std::set<const DexFile*> result = context->CheckForDuplicateDexFiles(dex1_raw); in TEST_F()