• Home
  • Raw
  • Download

Lines Matching refs:params_

41   OmahaRequestParamsTest() : params_(&fake_system_state_) {}  in OmahaRequestParamsTest()
47 params_.set_root(tempdir_.GetPath().value()); in SetUp()
58 OmahaRequestParams params_{&fake_system_state_}; member in chromeos_update_engine::OmahaRequestParamsTest
78 EXPECT_TRUE(params_.Init("", "", false)); in TEST_F()
80 EXPECT_EQ("stable-channel", params_.target_channel()); in TEST_F()
84 EXPECT_TRUE(params_.Init("ForcedVersion", "", false)); in TEST_F()
85 EXPECT_EQ(string("ForcedVersion_") + GetMachineType(), params_.os_sp()); in TEST_F()
86 EXPECT_EQ("ForcedVersion", params_.app_version()); in TEST_F()
90 EXPECT_TRUE(params_.Init("", "http://forced.google.com", false)); in TEST_F()
91 EXPECT_EQ("http://forced.google.com", params_.update_url()); in TEST_F()
95 EXPECT_TRUE(params_.Init("", "", false)); in TEST_F()
96 EXPECT_EQ(constants::kOmahaDefaultProductionURL, params_.update_url()); in TEST_F()
100 EXPECT_TRUE(params_.Init("", "", false)); in TEST_F()
101 EXPECT_TRUE(params_.delta_okay()); in TEST_F()
107 EXPECT_TRUE(params_.Init("", "", false)); in TEST_F()
108 EXPECT_FALSE(params_.delta_okay()); in TEST_F()
119 params_.set_root(tempdir_.GetPath().value()); in TEST_F()
120 EXPECT_TRUE(params_.Init("", "", false)); in TEST_F()
121 EXPECT_EQ("canary-channel", params_.target_channel()); in TEST_F()
122 EXPECT_FALSE(params_.mutable_image_props_.is_powerwash_allowed); in TEST_F()
133 params_.set_root(tempdir_.GetPath().value()); in TEST_F()
134 EXPECT_TRUE(params_.Init("", "", false)); in TEST_F()
135 EXPECT_EQ("canary-channel", params_.target_channel()); in TEST_F()
136 EXPECT_TRUE(params_.mutable_image_props_.is_powerwash_allowed); in TEST_F()
153 params_.set_root(tempdir_.GetPath().value()); in TEST_F()
154 EXPECT_TRUE(params_.Init("", "", false)); in TEST_F()
155 EXPECT_EQ("stable-channel", params_.target_channel()); in TEST_F()
156 EXPECT_FALSE(params_.mutable_image_props_.is_powerwash_allowed); in TEST_F()
160 EXPECT_TRUE(params_.IsValidChannel("canary-channel")); in TEST_F()
161 EXPECT_TRUE(params_.IsValidChannel("stable-channel")); in TEST_F()
162 EXPECT_TRUE(params_.IsValidChannel("beta-channel")); in TEST_F()
163 EXPECT_TRUE(params_.IsValidChannel("dev-channel")); in TEST_F()
164 EXPECT_FALSE(params_.IsValidChannel("testimage-channel")); in TEST_F()
165 EXPECT_FALSE(params_.IsValidChannel("dogfood-channel")); in TEST_F()
166 EXPECT_FALSE(params_.IsValidChannel("some-channel")); in TEST_F()
167 EXPECT_FALSE(params_.IsValidChannel("")); in TEST_F()
168 params_.image_props_.allow_arbitrary_channels = true; in TEST_F()
169 EXPECT_TRUE(params_.IsValidChannel("some-channel")); in TEST_F()
170 EXPECT_FALSE(params_.IsValidChannel("wrong-suffix")); in TEST_F()
171 EXPECT_FALSE(params_.IsValidChannel("")); in TEST_F()
175 params_.set_target_channel("dev-channel"); in TEST_F()
176 EXPECT_EQ("dev-channel", params_.target_channel()); in TEST_F()
179 EXPECT_FALSE(params_.SetTargetChannel("invalid-channel", false, nullptr)); in TEST_F()
180 EXPECT_EQ("dev-channel", params_.target_channel()); in TEST_F()
183 EXPECT_TRUE(params_.SetTargetChannel("beta-channel", true, nullptr)); in TEST_F()
184 EXPECT_EQ("beta-channel", params_.target_channel()); in TEST_F()
187 EXPECT_TRUE(params_.SetTargetChannel("beta-channel", true, nullptr)); in TEST_F()
188 EXPECT_EQ("beta-channel", params_.target_channel()); in TEST_F()
192 EXPECT_TRUE(params_.SetTargetChannel("stable-channel", true, nullptr)); in TEST_F()
193 EXPECT_EQ("stable-channel", params_.target_channel()); in TEST_F()
196 params_.set_target_channel("stable-channel"); in TEST_F()
200 params_.Init("", "", false); in TEST_F()
201 EXPECT_TRUE(params_.SetTargetChannel("beta-channel", true, nullptr)); in TEST_F()
204 EXPECT_EQ("beta-channel", params_.target_channel()); in TEST_F()
205 EXPECT_EQ("stable-channel", params_.download_channel()); in TEST_F()
208 params_.UpdateDownloadChannel(); in TEST_F()
209 EXPECT_EQ("beta-channel", params_.download_channel()); in TEST_F()
210 EXPECT_EQ("beta-channel", params_.target_channel()); in TEST_F()
214 int canary = params_.GetChannelIndex("canary-channel"); in TEST_F()
215 int dev = params_.GetChannelIndex("dev-channel"); in TEST_F()
216 int beta = params_.GetChannelIndex("beta-channel"); in TEST_F()
217 int stable = params_.GetChannelIndex("stable-channel"); in TEST_F()
223 int testimage = params_.GetChannelIndex("testimage-channel"); in TEST_F()
224 int bogus = params_.GetChannelIndex("bogus-channel"); in TEST_F()
230 params_.image_props_.current_channel = "canary-channel"; in TEST_F()
231 params_.download_channel_ = "stable-channel"; in TEST_F()
232 EXPECT_TRUE(params_.ToMoreStableChannel()); in TEST_F()
233 params_.image_props_.current_channel = "stable-channel"; in TEST_F()
234 EXPECT_FALSE(params_.ToMoreStableChannel()); in TEST_F()
235 params_.download_channel_ = "beta-channel"; in TEST_F()
236 EXPECT_FALSE(params_.ToMoreStableChannel()); in TEST_F()
240 params_.mutable_image_props_.is_powerwash_allowed = false; in TEST_F()
241 EXPECT_FALSE(params_.ShouldPowerwash()); in TEST_F()
242 params_.mutable_image_props_.is_powerwash_allowed = true; in TEST_F()
243 params_.image_props_.allow_arbitrary_channels = true; in TEST_F()
244 params_.image_props_.current_channel = "foo-channel"; in TEST_F()
245 params_.download_channel_ = "bar-channel"; in TEST_F()
246 EXPECT_TRUE(params_.ShouldPowerwash()); in TEST_F()
247 params_.image_props_.allow_arbitrary_channels = false; in TEST_F()
248 params_.image_props_.current_channel = "canary-channel"; in TEST_F()
249 params_.download_channel_ = "stable-channel"; in TEST_F()
250 EXPECT_TRUE(params_.ShouldPowerwash()); in TEST_F()
254 params_.hwid_ = string("STUMPY ALEX 12345"); in TEST_F()
255 EXPECT_FALSE(params_.CollectECFWVersions()); in TEST_F()
257 params_.hwid_ = string("SNOW 12345"); in TEST_F()
258 EXPECT_TRUE(params_.CollectECFWVersions()); in TEST_F()