Lines Matching refs:comp1
49 // "comp1": {
83 EXPECT_TRUE(manager->AddComponent("", "comp1", {"t1"}, nullptr));
85 manager->AddComponentArrayItem("comp1", "comp2", {"t2"}, nullptr));
87 manager->AddComponentArrayItem("comp1", "comp2", {"t3"}, nullptr));
89 manager->AddComponent("comp1.comp2[1]", "comp3", {"t4"}, nullptr));
90 EXPECT_TRUE(manager->AddComponent("comp1.comp2[1].comp3", "comp4",
446 manager_.AddComponent("", "comp1", {"trait1", "trait2"}, nullptr));
449 "comp1": {
463 EXPECT_TRUE(manager_.AddComponent("", "comp1", {}, nullptr));
464 EXPECT_TRUE(manager_.AddComponent("comp1", "comp2", {}, nullptr));
465 EXPECT_TRUE(manager_.AddComponent("comp1", "comp3", {}, nullptr));
466 EXPECT_TRUE(manager_.AddComponent("comp1.comp2", "comp4", {}, nullptr));
468 "comp1": {
493 EXPECT_TRUE(manager_.AddComponent("", "comp1", {}, nullptr));
495 manager_.AddComponentArrayItem("comp1", "comp2", {"foo"}, nullptr));
497 manager_.AddComponentArrayItem("comp1", "comp2", {"bar"}, nullptr));
498 EXPECT_TRUE(manager_.AddComponent("comp1.comp2[1]", "comp3", {}, nullptr));
500 manager_.AddComponent("comp1.comp2[1].comp3", "comp4", {}, nullptr));
502 "comp1": {
531 EXPECT_TRUE(manager_.RemoveComponent("comp1.comp2[1].comp3", "comp4",
534 "comp1": {
555 EXPECT_TRUE(manager_.RemoveComponentArrayItem("comp1", "comp2", 1, nullptr));
557 "comp1": {
572 EXPECT_TRUE(manager_.AddComponent("", "comp1", {}, nullptr));
573 EXPECT_FALSE(manager_.AddComponent("", "comp1", {}, nullptr));
574 EXPECT_TRUE(manager_.AddComponent("comp1", "comp2", {}, nullptr));
575 EXPECT_FALSE(manager_.AddComponent("comp1", "comp2", {}, nullptr));
579 EXPECT_FALSE(manager_.AddComponent("comp1", "comp2", {}, nullptr));
590 EXPECT_TRUE(manager_.AddComponent("", "comp1", {}, nullptr));
592 EXPECT_TRUE(manager_.AddComponent("comp1", "comp2", {}, nullptr));
594 EXPECT_TRUE(manager_.AddComponent("comp1.comp2", "comp4", {}, nullptr));
596 EXPECT_TRUE(manager_.AddComponentArrayItem("comp1", "comp3", {}, nullptr));
598 EXPECT_TRUE(manager_.AddComponentArrayItem("comp1
600 EXPECT_TRUE(manager_.RemoveComponentArrayItem("comp1", "comp3", 1, nullptr));
602 EXPECT_TRUE(manager_.RemoveComponent("", "comp1", nullptr));
611 const base::DictionaryValue* comp = manager_.FindComponent("comp1", nullptr);
615 comp = manager_.FindComponent("comp1.comp2[0]", nullptr);
619 comp = manager_.FindComponent("comp1.comp2[1]", nullptr);
623 comp = manager_.FindComponent("comp1.comp2[1].comp3", nullptr);
627 comp = manager_.FindComponent("comp1.comp2[1].comp3.comp4", nullptr);
632 comp = manager_.FindComponent(" comp1 . comp2 [ \t 1 ] . comp3.comp4 ",
642 // 'comp1.comp2' is an array, not a component:
643 EXPECT_EQ(nullptr, manager_.FindComponent("comp1.comp2", nullptr));
644 // 'comp1.comp2[3]' doesn't exist:
645 EXPECT_EQ(nullptr, manager_.FindComponent("comp1.comp2[3]", nullptr));
648 EXPECT_EQ(nullptr, manager_.FindComponent("comp1.[1]", nullptr));
650 EXPECT_EQ(nullptr, manager_.FindComponent("comp1.comp2[s]", nullptr));
651 EXPECT_EQ(nullptr, manager_.FindComponent("comp1.comp2[-2]", nullptr));
652 EXPECT_EQ(nullptr, manager_.FindComponent("comp1.comp2[1e1]", nullptr));
653 EXPECT_EQ(nullptr, manager_.FindComponent("comp1.comp2[1", nullptr));
679 ASSERT_TRUE(manager_.AddComponent("", "comp1", {"trait1"}, nullptr));
686 "component": "comp1",
703 "component": "comp1",
716 "component": "comp1",
720 // Component comp1 doesn't have trait2.
735 EXPECT_EQ("comp1", command_instance->GetComponent());
769 ASSERT_TRUE(manager_.AddComponent("", "comp1", {"trait1"}, nullptr));
775 "component": "comp1",
803 ASSERT_TRUE(manager_.AddComponent("", "comp1", {"trait1"}, nullptr));
814 manager_.AddCommandHandler("comp1", "trait1.command1",
824 "component": "comp1"
913 ASSERT_TRUE(manager_.SetStateProperties("comp1", *state1, nullptr));
915 "comp1": {
944 ASSERT_TRUE(manager_.SetStateProperties("comp1", *state2, nullptr));
947 "comp1": {
976 ASSERT_TRUE(manager_.SetStateProperties("comp1.comp2[1].comp3.comp4", *state3,
980 "comp1": {
1013 "comp1.comp2[1].comp3.comp4",
1017 "comp1": {
1066 manager_.AddComponent("", "comp1", {"trait1", "trait2"}, nullptr));
1069 ASSERT_TRUE(manager_.SetStateProperty("comp1", "trait1.prop1", p1, nullptr));
1072 "comp1": {
1082 ASSERT_TRUE(manager_.SetStateProperty("comp1", "trait2.prop3", p2, nullptr));
1085 "comp1": {
1095 EXPECT_FALSE(manager_.SetStateProperty("comp1", "trait2", p2, nullptr));
1098 manager_.GetStateProperty("comp1", "trait1.prop1", nullptr);
1101 value = manager_.GetStateProperty("comp1", "trait2.prop3", nullptr);
1106 EXPECT_EQ(nullptr, manager_.GetStateProperty("comp1", "trait2.p", nullptr));
1110 EXPECT_EQ(nullptr, manager_.GetStateProperty("comp1", "trait2", nullptr));
1124 ASSERT_TRUE(manager_.AddComponent("", "comp1", {"trait1"}, nullptr));
1135 ASSERT_TRUE(manager_.SetStateProperty("comp1", "trait1.prop1", p1, nullptr));
1140 ASSERT_TRUE(manager_.SetStateProperty("comp1", "trait1.prop2", p1, nullptr));
1170 manager_.AddComponent("", "comp1", {"trait1", "trait2"}, nullptr));
1190 ASSERT_TRUE(manager_.SetStateProperty("comp1", "trait1.prop1", foo, nullptr));
1192 ASSERT_TRUE(manager_.SetStateProperty("comp1", "trait1.prop2", foo, nullptr));
1206 ASSERT_TRUE(manager_.SetStateProperty("comp1", "trait1.prop1", bar, nullptr));
1208 ASSERT_TRUE(manager_.SetStateProperty("comp1", "trait1.prop2", bar, nullptr));
1214 EXPECT_EQ("comp1", snapshot.state_changes[0].component);
1224 EXPECT_EQ("comp1", snapshot.state_changes[2].component);
1256 manager_.AddComponent("", "comp1", {"trait1", "trait2"}, nullptr));
1259 EXPECT_EQ("comp1", manager_.FindComponentWithTrait("trait1"));
1260 EXPECT_EQ("comp1", manager_.FindComponentWithTrait("trait2"));
1461 ASSERT_TRUE(manager_.AddComponent("", "comp1", {"trait1"}, nullptr));
1465 "comp1", R"({"trait1": {"prop1": "foo", "prop2": "bar"}})", nullptr));