Lines Matching refs:context
45 void VerifyContextSize(ClassLoaderContext* context, size_t expected_size) { in VerifyContextSize() argument
46 ASSERT_TRUE(context != nullptr); in VerifyContextSize()
47 ASSERT_EQ(expected_size, context->GetParentChainSize()); in VerifyContextSize()
50 void VerifyClassLoaderPCL(ClassLoaderContext* context, in VerifyClassLoaderPCL() argument
54 context, index, ClassLoaderContext::kPathClassLoader, classpath); in VerifyClassLoaderPCL()
57 void VerifyClassLoaderDLC(ClassLoaderContext* context, in VerifyClassLoaderDLC() argument
61 context, index, ClassLoaderContext::kDelegateLastClassLoader, classpath); in VerifyClassLoaderDLC()
64 void VerifyClassLoaderIMC(ClassLoaderContext* context, in VerifyClassLoaderIMC() argument
68 context, index, ClassLoaderContext::kInMemoryDexClassLoader, classpath); in VerifyClassLoaderIMC()
71 void VerifyClassLoaderSharedLibraryPCL(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryPCL() argument
76 context, loader_index, shared_library_index, ClassLoaderContext::kPathClassLoader, in VerifyClassLoaderSharedLibraryPCL()
80 void VerifyClassLoaderSharedLibraryIMC(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryIMC() argument
85 context, loader_index, shared_library_index, ClassLoaderContext::kInMemoryDexClassLoader, in VerifyClassLoaderSharedLibraryIMC()
89 void VerifySharedLibrariesSize(ClassLoaderContext* context, in VerifySharedLibrariesSize() argument
92 ASSERT_TRUE(context != nullptr); in VerifySharedLibrariesSize()
93 ASSERT_GT(context->GetParentChainSize(), loader_index); in VerifySharedLibrariesSize()
94 const ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(loader_index); in VerifySharedLibrariesSize()
98 void VerifyClassLoaderSharedLibraryDLC(ClassLoaderContext* context, in VerifyClassLoaderSharedLibraryDLC() argument
103 context, loader_index, shared_library_index, ClassLoaderContext::kDelegateLastClassLoader, in VerifyClassLoaderSharedLibraryDLC()
107 void VerifyClassLoaderPCLFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderPCLFromTestDex() argument
111 context, index, ClassLoaderContext::kPathClassLoader, test_name); in VerifyClassLoaderPCLFromTestDex()
114 void VerifyClassLoaderDLCFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderDLCFromTestDex() argument
118 context, index, ClassLoaderContext::kDelegateLastClassLoader, test_name); in VerifyClassLoaderDLCFromTestDex()
121 void VerifyClassLoaderIMCFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderIMCFromTestDex() argument
125 context, index, ClassLoaderContext::kInMemoryDexClassLoader, test_name, "<unknown>"); in VerifyClassLoaderIMCFromTestDex()
142 ClassLoaderContext* context, in VerifyOpenDexFiles() argument
146 ASSERT_TRUE(context != nullptr); in VerifyOpenDexFiles()
147 ASSERT_TRUE(context->dex_files_open_attempted_); in VerifyOpenDexFiles()
148 ASSERT_TRUE(context->dex_files_open_result_); in VerifyOpenDexFiles()
149 ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(index); in VerifyOpenDexFiles()
184 std::unique_ptr<ClassLoaderContext> context(new ClassLoaderContext()); in ParseContextWithChecksums() local
185 if (!context->Parse(context_spec, /*parse_checksums=*/ true)) { in ParseContextWithChecksums()
188 return context; in ParseContextWithChecksums()
191 void VerifyContextForClassLoader(ClassLoaderContext* context) { in VerifyContextForClassLoader() argument
192 ASSERT_TRUE(context != nullptr); in VerifyContextForClassLoader()
193 ASSERT_TRUE(context->dex_files_open_attempted_); in VerifyContextForClassLoader()
194 ASSERT_TRUE(context->dex_files_open_result_); in VerifyContextForClassLoader()
195 ASSERT_FALSE(context->owns_the_dex_files_); in VerifyContextForClassLoader()
196 ASSERT_FALSE(context->special_shared_library_); in VerifyContextForClassLoader()
217 void PretendContextOpenedDexFiles(ClassLoaderContext* context) { in PretendContextOpenedDexFiles() argument
218 context->dex_files_open_attempted_ = true; in PretendContextOpenedDexFiles()
219 context->dex_files_open_result_ = true; in PretendContextOpenedDexFiles()
223 void VerifyClassLoaderInfo(ClassLoaderContext* context, in VerifyClassLoaderInfo() argument
227 ASSERT_TRUE(context != nullptr); in VerifyClassLoaderInfo()
228 ASSERT_GT(context->GetParentChainSize(), index); in VerifyClassLoaderInfo()
229 ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(index); in VerifyClassLoaderInfo()
236 void VerifyClassLoaderInfoSL(ClassLoaderContext* context, in VerifyClassLoaderInfoSL() argument
241 ASSERT_TRUE(context != nullptr); in VerifyClassLoaderInfoSL()
242 ASSERT_GT(context->GetParentChainSize(), loader_index); in VerifyClassLoaderInfoSL()
243 const ClassLoaderContext::ClassLoaderInfo& info = *context->GetParent(loader_index); in VerifyClassLoaderInfoSL()
253 void VerifyClassLoaderFromTestDex(ClassLoaderContext* context, in VerifyClassLoaderFromTestDex() argument
262 VerifyClassLoaderInfo(context, in VerifyClassLoaderFromTestDex()
266 VerifyOpenDexFiles(context, in VerifyClassLoaderFromTestDex()
274 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(""); in TEST_F() local
276 VerifyContextSize(context.get(), 1); in TEST_F()
277 VerifyClassLoaderPCL(context.get(), 0, ""); in TEST_F()
281 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("&"); in TEST_F() local
283 VerifyContextSize(context.get(), 0); in TEST_F()
287 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("PCL[a.dex]"); in TEST_F() local
288 VerifyContextSize(context.get(), 1); in TEST_F()
289 VerifyClassLoaderPCL(context.get(), 0, "a.dex"); in TEST_F()
293 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("DLC[a.dex]"); in TEST_F() local
294 VerifyContextSize(context.get(), 1); in TEST_F()
295 VerifyClassLoaderDLC(context.get(), 0, "a.dex"); in TEST_F()
299 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums("IMC[<unknown>*111]"); in TEST_F() local
300 ASSERT_FALSE(context == nullptr); in TEST_F()
306 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("IMC[<unknown>]"); in TEST_F() local
307 ASSERT_TRUE(context == nullptr); in TEST_F()
313 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("IMC[a.dex*111]"); in TEST_F() local
314 ASSERT_TRUE(context == nullptr); in TEST_F()
318 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
320 VerifyContextSize(context.get(), 3); in TEST_F()
321 VerifyClassLoaderPCL(context.get(), 0, "a.dex:b.dex"); in TEST_F()
322 VerifyClassLoaderDLC(context.get(), 1, "c.dex:d.dex"); in TEST_F()
323 VerifyClassLoaderPCL(context.get(), 2, "e.dex"); in TEST_F()
327 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F() local
329 VerifyContextSize(context.get(), 2); in TEST_F()
330 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "s1.dex"); in TEST_F()
331 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 1, "s2.dex:s3.dex"); in TEST_F()
332 VerifyClassLoaderDLC(context.get(), 1, "c.dex:d.dex"); in TEST_F()
333 VerifyClassLoaderSharedLibraryDLC(context.get(), 1, 0, "s4.dex"); in TEST_F()
337 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F() local
339 VerifyContextSize(context.get(), 1); in TEST_F()
340 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "s1.dex"); in TEST_F()
344 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F() local
346 VerifyContextSize(context.get(), 1); in TEST_F()
347 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "s4.dex"); in TEST_F()
351 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create( in TEST_F() local
354 VerifyContextSize(context.get(), 1); in TEST_F()
355 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "s1.dex"); in TEST_F()
356 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 1, "s2.dex"); in TEST_F()
357 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 2, "s3.dex"); in TEST_F()
358 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 3, "s4.dex"); in TEST_F()
359 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 4, "s5.dex"); in TEST_F()
363 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
365 VerifyContextSize(context.get(), 1); in TEST_F()
366 VerifyClassLoaderDLC(context.get(), 0, ""); in TEST_F()
370 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
372 VerifyContextSize(context.get(), 1); in TEST_F()
373 VerifySharedLibrariesSize(context.get(), 0, 0); in TEST_F()
377 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
379 VerifyContextSize(context.get(), 0); in TEST_F()
401 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
403 VerifyContextSize(context.get(), 1); in TEST_F()
404 ASSERT_FALSE(context->OpenDexFiles(InstructionSet::kArm, ".")); in TEST_F()
413 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
418 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, /*classpath_dir=*/ "")); in TEST_F()
420 VerifyContextSize(context.get(), 2); in TEST_F()
427 VerifyOpenDexFiles(context.get(), 0, &all_dex_files0); in TEST_F()
430 VerifyOpenDexFiles(context.get(), 1, &all_dex_files1); in TEST_F()
463 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
468 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, /*classpath_dir=*/ "")); in TEST_F()
475 VerifyOpenDexFiles(context.get(), 0, &all_dex_files0); in TEST_F()
478 VerifyOpenDexFiles(context.get(), 1, &all_dex_files1); in TEST_F()
497 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
502 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, cwd_buf)); in TEST_F()
504 VerifyContextSize(context.get(), 2); in TEST_F()
510 VerifyOpenDexFiles(context.get(), 0, &all_dex_files0); in TEST_F()
513 VerifyOpenDexFiles(context.get(), 1, &all_dex_files1); in TEST_F()
518 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
520 ASSERT_FALSE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
524 std::unique_ptr<ClassLoaderContext> context; in TEST_F() local
527 context = ParseContextWithChecksums("IMC[<unknown>*111]"); in TEST_F()
528 VerifyContextSize(context.get(), 1); in TEST_F()
529 ASSERT_FALSE(context->OpenDexFiles(InstructionSet::kArm, ".")); in TEST_F()
534 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
536 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
543 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
571 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
573 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
579 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
598 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create("&"); in TEST_F() local
600 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
606 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
637 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
638 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
646 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
707 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
708 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
716 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
795 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
796 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
804 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
895 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
896 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
904 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
983 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
991 ASSERT_FALSE(context->RemoveLocationsFromClassPaths(compilation_sources)); in TEST_F()
992 VerifyClassLoaderPCL(context.get(), 0, "a.dex"); in TEST_F()
994 ASSERT_TRUE(context->RemoveLocationsFromClassPaths(classpath_dex)); in TEST_F()
995 VerifyClassLoaderPCL(context.get(), 0, ""); in TEST_F()
1010 std::unique_ptr<ClassLoaderContext> context = ClassLoaderContext::Create(context_spec); in TEST_F() local
1011 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
1019 jobject jclass_loader = context->CreateClassLoader(compilation_sources_raw); in TEST_F()
1086 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1088 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
1092 std::string encoding = context->EncodeContextForOatFile(""); in TEST_F()
1095 ASSERT_EQ(expected_encoding, context->EncodeContextForOatFile("")); in TEST_F()
1102 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1103 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
1109 std::string encoding = context->EncodeContextForOatFile(""); in TEST_F()
1112 ASSERT_EQ(expected_encoding, context->EncodeContextForOatFile("")); in TEST_F()
1118 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1120 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
1122 std::string encoding = context->EncodeContextForDex2oat(""); in TEST_F()
1124 ASSERT_EQ(expected_encoding, context->EncodeContextForDex2oat("")); in TEST_F()
1131 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1132 ASSERT_TRUE(context->OpenDexFiles(InstructionSet::kArm, "")); in TEST_F()
1134 std::string encoding = context->EncodeContextForDex2oat(""); in TEST_F()
1136 ASSERT_EQ(expected_encoding, context->EncodeContextForDex2oat("")); in TEST_F()
1141 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1144 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1151 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1154 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1165 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1168 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1193 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1195 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1206 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1209 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1232 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1235 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1250 std::unique_ptr<ClassLoaderContext> context = in TEST_F() local
1253 std::map<std::string, std::string> encodings = context->EncodeClassPathContexts(""); in TEST_F()
1352 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F() local
1354 VerifyContextForClassLoader(context.get()); in TEST_F()
1355 VerifyContextSize(context.get(), 4); in TEST_F()
1357 VerifyClassLoaderDLCFromTestDex(context.get(), 0, "ForClassLoaderD"); in TEST_F()
1358 VerifyClassLoaderPCLFromTestDex(context.get(), 1, "ForClassLoaderC"); in TEST_F()
1359 VerifyClassLoaderDLCFromTestDex(context.get(), 2, "ForClassLoaderB"); in TEST_F()
1360 VerifyClassLoaderPCLFromTestDex(context.get(), 3, "ForClassLoaderA"); in TEST_F()
1381 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F() local
1383 VerifyContextForClassLoader(context.get()); in TEST_F()
1384 VerifyContextSize(context.get(), 4); in TEST_F()
1386 VerifyClassLoaderDLCFromTestDex(context.get(), 0, "ForClassLoaderD"); in TEST_F()
1387 VerifyClassLoaderIMCFromTestDex(context.get(), 1, "ForClassLoaderC"); in TEST_F()
1388 VerifyClassLoaderIMCFromTestDex(context.get(), 2, "ForClassLoaderB"); in TEST_F()
1389 VerifyClassLoaderPCLFromTestDex(context.get(), 3, "ForClassLoaderA"); in TEST_F()
1394 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1395 ASSERT_TRUE(context != nullptr); in TEST_F()
1396 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1398 ASSERT_EQ(context->VerifyClassLoaderContextMatch(OatFile::kSpecialSharedLibrary), in TEST_F()
1404 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1407 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1409 VerifyContextSize(context.get(), 2); in TEST_F()
1410 VerifyClassLoaderPCL(context.get(), 0, "a.dex:b.dex"); in TEST_F()
1411 VerifyClassLoaderDLC(context.get(), 1, "c.dex"); in TEST_F()
1413 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1417 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_class_loader_type), in TEST_F()
1421 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_class_loader_order), in TEST_F()
1425 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_classpath_order), in TEST_F()
1429 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_checksum), in TEST_F()
1433 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_extra_class_loader), in TEST_F()
1437 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_extra_classpath), in TEST_F()
1441 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_spec), in TEST_F()
1447 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1450 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1452 VerifyContextSize(context.get(), 3); in TEST_F()
1453 VerifyClassLoaderPCL(context.get(), 0, "a.dex:b.dex"); in TEST_F()
1454 VerifyClassLoaderDLC(context.get(), 1, "c.dex"); in TEST_F()
1455 VerifyClassLoaderIMC(context.get(), 2, "<unknown>"); in TEST_F()
1457 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1463 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1466 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1468 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1476 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1479 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1481 VerifyContextSize(context.get(), 2); in TEST_F()
1482 VerifyClassLoaderPCL(context.get(), 0, "a.dex:b.dex"); in TEST_F()
1483 VerifyClassLoaderDLC(context.get(), 1, "c.dex"); in TEST_F()
1484 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, "d.dex"); in TEST_F()
1485 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 1, "f.dex:g.dex"); in TEST_F()
1487 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1493 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_class_loader_type), in TEST_F()
1499 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_class_loader_order), in TEST_F()
1505 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_classpath_order), in TEST_F()
1511 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_checksum), in TEST_F()
1518 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_extra_class_loader), in TEST_F()
1524 ASSERT_EQ(context->VerifyClassLoaderContextMatch(wrong_extra_classpath), in TEST_F()
1533 std::unique_ptr<ClassLoaderContext> context = ParseContextWithChecksums(context_spec); in TEST_F() local
1536 PretendContextOpenedDexFiles(context.get()); in TEST_F()
1538 VerifyContextSize(context.get(), 2); in TEST_F()
1539 VerifyClassLoaderIMC(context.get(), 0, "<unknown>:<unknown>"); in TEST_F()
1540 VerifyClassLoaderDLC(context.get(), 1, "c.dex"); in TEST_F()
1541 VerifyClassLoaderSharedLibraryIMC(context.get(), 0, 0, "<unknown>"); in TEST_F()
1542 VerifyClassLoaderSharedLibraryIMC(context.get(), 0, 1, "<unknown>:<unknown>"); in TEST_F()
1544 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_spec), in TEST_F()
1554 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F() local
1556 std::string context_with_no_base_dir = context->EncodeContextForOatFile(""); in TEST_F()
1557 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_no_base_dir), in TEST_F()
1565 std::string context_with_base_dir = context->EncodeContextForOatFile(parent); in TEST_F()
1567 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_base_dir), in TEST_F()
1577 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_d); in TEST_F() local
1579 std::string context_with_no_base_dir = context->EncodeContextForOatFile(""); in TEST_F()
1580 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_no_base_dir), in TEST_F()
1588 std::string context_with_base_dir = context->EncodeContextForOatFile(parent); in TEST_F()
1590 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_base_dir), in TEST_F()
1597 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F() local
1599 std::string context_with_no_base_dir = context->EncodeContextForOatFile(""); in TEST_F()
1600 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_no_base_dir), in TEST_F()
1608 std::string context_with_base_dir = context->EncodeContextForOatFile(parent); in TEST_F()
1610 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context_with_base_dir), in TEST_F()
1629 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1630 ASSERT_TRUE(context != nullptr); in TEST_F()
1632 VerifyClassLoaderPCL(context.get(), 0, dex_files[0]->GetLocation()); in TEST_F()
1634 VerifyClassLoaderSharedLibraryPCL(context.get(), 0, 0, dex_files[0]->GetLocation()); in TEST_F()
1636 ASSERT_EQ(context->VerifyClassLoaderContextMatch(context->EncodeContextForOatFile("")), in TEST_F()
1643 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F() local
1645 std::set<const DexFile*> result = context->CheckForDuplicateDexFiles( in TEST_F()
1651 result = context->CheckForDuplicateDexFiles(dex1_raw); in TEST_F()
1658 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); in TEST_F() local
1662 std::set<const DexFile*> result = context->CheckForDuplicateDexFiles(dex1_raw); in TEST_F()
1663 ASSERT_EQ(1u, result.size()) << context->EncodeContextForOatFile(""); in TEST_F()
1672 std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader_b); in TEST_F() local
1676 std::set<const DexFile*> result = context->CheckForDuplicateDexFiles(dex1_raw); in TEST_F()