Lines Matching refs:action
36 ExtensionAction action;
39 ASSERT_EQ("", action.GetTitle(1));
40 action.SetTitle(ExtensionAction::kDefaultTabId, "foo");
41 ASSERT_EQ("foo", action.GetTitle(1));
42 ASSERT_EQ("foo", action.GetTitle(100));
43 action.SetTitle(100, "bar");
44 ASSERT_EQ("foo", action.GetTitle(1));
45 ASSERT_EQ("bar", action.GetTitle(100));
46 action.SetTitle(ExtensionAction::kDefaultTabId, "baz");
47 ASSERT_EQ("baz", action.GetTitle(1));
48 action.ClearAllValuesForTab(100);
49 ASSERT_EQ("baz", action.GetTitle(100));
54 ASSERT_TRUE(action.GetIcon(1).isNull());
55 action.SetIcon(ExtensionAction::kDefaultTabId, icon1);
56 ASSERT_TRUE(BitmapsAreEqual(icon1, action.GetIcon(100)));
57 action.SetIcon(100, icon2);
58 ASSERT_TRUE(BitmapsAreEqual(icon1, action.GetIcon(1)));
59 ASSERT_TRUE(BitmapsAreEqual(icon2, action.GetIcon(100)));
62 ASSERT_EQ(-1, action.GetIconIndex(1));
63 action.icon_paths()->push_back("foo.png");
64 action.icon_paths()->push_back("bar.png");
65 action.SetIconIndex(ExtensionAction::kDefaultTabId, 1);
66 ASSERT_EQ(1, action.GetIconIndex(1));
67 ASSERT_EQ(1, action.GetIconIndex(100));
68 action.SetIconIndex(100, 0);
69 ASSERT_EQ(0, action.GetIconIndex(100));
70 ASSERT_EQ(1, action.GetIconIndex(1));
71 action.ClearAllValuesForTab(100);
72 ASSERT_EQ(1, action.GetIconIndex(100));
73 ASSERT_EQ(1, action.GetIconIndex(1));
76 ASSERT_FALSE(action.GetIsVisible(1));
77 action.SetIsVisible(ExtensionAction::kDefaultTabId, true);
78 ASSERT_TRUE(action.GetIsVisible(1));
79 ASSERT_TRUE(action.GetIsVisible(100));
80 action.SetIsVisible(ExtensionAction::kDefaultTabId, false);
81 ASSERT_FALSE(action.GetIsVisible(1));
82 ASSERT_FALSE(action.GetIsVisible(100));
83 action.SetIsVisible(100, true);
84 ASSERT_FALSE(action.GetIsVisible(1));
85 ASSERT_TRUE(action.GetIsVisible(100));
86 action.ClearAllValuesForTab(100);
87 ASSERT_FALSE(action.GetIsVisible(1));
88 ASSERT_FALSE(action.GetIsVisible(100));
91 ASSERT_EQ("", action.GetBadgeText(1));
92 action.SetBadgeText(ExtensionAction::kDefaultTabId, "foo");
93 ASSERT_EQ("foo", action.GetBadgeText(1));
94 ASSERT_EQ("foo", action.GetBadgeText(100));
95 action.SetBadgeText(100, "bar");
96 ASSERT_EQ("foo", action.GetBadgeText(1));
97 ASSERT_EQ("bar", action.GetBadgeText(100));
98 action.SetBadgeText(ExtensionAction::kDefaultTabId, "baz");
99 ASSERT_EQ("baz", action.GetBadgeText(1));
100 action.ClearAllValuesForTab(100);
101 ASSERT_EQ("baz", action.GetBadgeText(100));
104 ASSERT_EQ(0x00000000u, action.GetBadgeTextColor(1));
105 action.SetBadgeTextColor(ExtensionAction::kDefaultTabId, 0xFFFF0000u);
106 ASSERT_EQ(0xFFFF0000u, action.GetBadgeTextColor(1));
107 ASSERT_EQ(0xFFFF0000u, action.GetBadgeTextColor(100));
108 action.SetBadgeTextColor(100, 0xFF00FF00);
109 ASSERT_EQ(0xFFFF0000u, action.GetBadgeTextColor(1));
110 ASSERT_EQ(0xFF00FF00u, action.GetBadgeTextColor(100));
111 action.SetBadgeTextColor(ExtensionAction::kDefaultTabId, 0xFF0000FFu);
112 ASSERT_EQ(0xFF0000FFu, action.GetBadgeTextColor(1));
113 action.ClearAllValuesForTab(100);
114 ASSERT_EQ(0xFF0000FFu, action.GetBadgeTextColor(100));
117 ASSERT_EQ(0x00000000u, action.GetBadgeBackgroundColor(1));
118 action.SetBadgeBackgroundColor(ExtensionAction::kDefaultTabId,
120 ASSERT_EQ(0xFFFF0000u, action.GetBadgeBackgroundColor(1));
121 ASSERT_EQ(0xFFFF0000u, action.GetBadgeBackgroundColor(100));
122 action.SetBadgeBackgroundColor(100, 0xFF00FF00);
123 ASSERT_EQ(0xFFFF0000u, action.GetBadgeBackgroundColor(1));
124 ASSERT_EQ(0xFF00FF00u, action.GetBadgeBackgroundColor(100));
125 action.SetBadgeBackgroundColor(ExtensionAction::kDefaultTabId,
127 ASSERT_EQ(0xFF0000FFu, action.GetBadgeBackgroundColor(1));
128 action.ClearAllValuesForTab(100);
129 ASSERT_EQ(0xFF0000FFu, action.GetBadgeBackgroundColor(100));
137 ASSERT_EQ(url_unset, action.GetPopupUrl(1));
138 ASSERT_EQ(url_unset, action.GetPopupUrl(100));
139 ASSERT_FALSE(action.HasPopup(1));
140 ASSERT_FALSE(action.HasPopup(100));
142 action.SetPopupUrl(ExtensionAction::kDefaultTabId, url_foo);
143 ASSERT_EQ(url_foo, action.GetPopupUrl(1));
144 ASSERT_EQ(url_foo, action.GetPopupUrl(100));
146 action.SetPopupUrl(100, url_bar);
147 ASSERT_EQ(url_foo, action.GetPopupUrl(1));
148 ASSERT_EQ(url_bar, action.GetPopupUrl(100));
150 action.SetPopupUrl(ExtensionAction::kDefaultTabId, url_baz);
151 ASSERT_EQ(url_baz, action.GetPopupUrl(1));
152 ASSERT_EQ(url_bar, action.GetPopupUrl(100));
154 action.ClearAllValuesForTab(100);
155 ASSERT_EQ(url_baz, action.GetPopupUrl(1));
156 ASSERT_EQ(url_baz, action.GetPopupUrl(100));