OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 EXPECT_NE( | 185 EXPECT_NE( |
186 string::npos, | 186 string::npos, |
187 post_interceptor_->GetRequests()[0].find( | 187 post_interceptor_->GetRequests()[0].find( |
188 "request protocol=\"3.0\" extra=\"params\"")); | 188 "request protocol=\"3.0\" extra=\"params\"")); |
189 EXPECT_NE( | 189 EXPECT_NE( |
190 string::npos, | 190 string::npos, |
191 post_interceptor_->GetRequests()[0].find( | 191 post_interceptor_->GetRequests()[0].find( |
192 "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\">" | 192 "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\">" |
193 "<updatecheck /><packages><package fp=\"fp1\"/></packages></app>")); | 193 "<updatecheck /><packages><package fp=\"fp1\"/></packages></app>")); |
194 | 194 |
| 195 EXPECT_NE(string::npos, |
| 196 post_interceptor_->GetRequests()[0].find("<hw physmemory=")); |
| 197 |
195 // Sanity check the arguments of the callback after parsing. | 198 // Sanity check the arguments of the callback after parsing. |
196 EXPECT_EQ(0, error_); | 199 EXPECT_EQ(0, error_); |
197 EXPECT_TRUE(error_message_.empty()); | 200 EXPECT_TRUE(error_message_.empty()); |
198 EXPECT_EQ(1ul, results_.list.size()); | 201 EXPECT_EQ(1ul, results_.list.size()); |
199 EXPECT_STREQ("jebgalgnebhfojomionfpkfelancnnkf", | 202 EXPECT_STREQ("jebgalgnebhfojomionfpkfelancnnkf", |
200 results_.list[0].extension_id.c_str()); | 203 results_.list[0].extension_id.c_str()); |
201 EXPECT_STREQ("1.0", results_.list[0].manifest.version.c_str()); | 204 EXPECT_STREQ("1.0", results_.list[0].manifest.version.c_str()); |
202 } | 205 } |
203 | 206 |
204 TEST_F(UpdateCheckerTest, UpdateNetworkError) { | 207 TEST_F(UpdateCheckerTest, UpdateNetworkError) { |
(...skipping 22 matching lines...) Expand all Loading... |
227 << post_interceptor_->GetRequestsAsString(); | 230 << post_interceptor_->GetRequestsAsString(); |
228 EXPECT_EQ(1, post_interceptor_->GetCount()) | 231 EXPECT_EQ(1, post_interceptor_->GetCount()) |
229 << post_interceptor_->GetRequestsAsString(); | 232 << post_interceptor_->GetRequestsAsString(); |
230 | 233 |
231 EXPECT_NE(0, error_); | 234 EXPECT_NE(0, error_); |
232 EXPECT_STREQ("network error", error_message_.c_str()); | 235 EXPECT_STREQ("network error", error_message_.c_str()); |
233 EXPECT_EQ(0ul, results_.list.size()); | 236 EXPECT_EQ(0ul, results_.list.size()); |
234 } | 237 } |
235 | 238 |
236 } // namespace component_updater | 239 } // namespace component_updater |
OLD | NEW |