Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Side by Side Diff: chrome/browser/component_updater/test/update_checker_unittest.cc

Issue 271573003: The component update checks should include the amount of installed memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/component_updater/component_updater_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/component_updater_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698