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

Side by Side Diff: components/component_updater/test/update_checker_unittest.cc

Issue 763833003: Remove using namespace in net/quic/quic_stream_sequencer.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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 <string>
6
5 #include "base/bind.h" 7 #include "base/bind.h"
6 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
7 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
8 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
13 #include "base/path_service.h" 15 #include "base/path_service.h"
14 #include "base/run_loop.h" 16 #include "base/run_loop.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 177
176 RunThreads(); 178 RunThreads();
177 179
178 EXPECT_EQ(1, post_interceptor_->GetHitCount()) 180 EXPECT_EQ(1, post_interceptor_->GetHitCount())
179 << post_interceptor_->GetRequestsAsString(); 181 << post_interceptor_->GetRequestsAsString();
180 EXPECT_EQ(1, post_interceptor_->GetCount()) 182 EXPECT_EQ(1, post_interceptor_->GetCount())
181 << post_interceptor_->GetRequestsAsString(); 183 << post_interceptor_->GetRequestsAsString();
182 184
183 // Sanity check the request. 185 // Sanity check the request.
184 EXPECT_NE( 186 EXPECT_NE(
185 string::npos, 187 std::string::npos,
186 post_interceptor_->GetRequests()[0].find( 188 post_interceptor_->GetRequests()[0].find(
187 "request protocol=\"3.0\" extra=\"params\"")); 189 "request protocol=\"3.0\" extra=\"params\""));
188 EXPECT_NE( 190 EXPECT_NE(
189 string::npos, 191 std::string::npos,
190 post_interceptor_->GetRequests()[0].find( 192 post_interceptor_->GetRequests()[0].find(
191 "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\">" 193 "app appid=\"jebgalgnebhfojomionfpkfelancnnkf\" version=\"0.9\">"
192 "<updatecheck /><packages><package fp=\"fp1\"/></packages></app>")); 194 "<updatecheck /><packages><package fp=\"fp1\"/></packages></app>"));
193 195
194 EXPECT_NE(string::npos, 196 EXPECT_NE(std::string::npos,
195 post_interceptor_->GetRequests()[0].find("<hw physmemory=")); 197 post_interceptor_->GetRequests()[0].find("<hw physmemory="));
196 198
197 // Sanity check the arguments of the callback after parsing. 199 // Sanity check the arguments of the callback after parsing.
198 EXPECT_EQ(config_->UpdateUrl().front(), original_url_); 200 EXPECT_EQ(config_->UpdateUrl().front(), original_url_);
199 EXPECT_EQ(0, error_); 201 EXPECT_EQ(0, error_);
200 EXPECT_TRUE(error_message_.empty()); 202 EXPECT_TRUE(error_message_.empty());
201 EXPECT_EQ(1ul, results_.list.size()); 203 EXPECT_EQ(1ul, results_.list.size());
202 EXPECT_STREQ("jebgalgnebhfojomionfpkfelancnnkf", 204 EXPECT_STREQ("jebgalgnebhfojomionfpkfelancnnkf",
203 results_.list[0].extension_id.c_str()); 205 results_.list[0].extension_id.c_str());
204 EXPECT_STREQ("1.0", results_.list[0].manifest.version.c_str()); 206 EXPECT_STREQ("1.0", results_.list[0].manifest.version.c_str());
(...skipping 23 matching lines...) Expand all
228 EXPECT_EQ(1, post_interceptor_->GetCount()) 230 EXPECT_EQ(1, post_interceptor_->GetCount())
229 << post_interceptor_->GetRequestsAsString(); 231 << post_interceptor_->GetRequestsAsString();
230 232
231 EXPECT_EQ(config_->UpdateUrl().front(), original_url_); 233 EXPECT_EQ(config_->UpdateUrl().front(), original_url_);
232 EXPECT_EQ(403, error_); 234 EXPECT_EQ(403, error_);
233 EXPECT_STREQ("network error", error_message_.c_str()); 235 EXPECT_STREQ("network error", error_message_.c_str());
234 EXPECT_EQ(0ul, results_.list.size()); 236 EXPECT_EQ(0ul, results_.list.size());
235 } 237 }
236 238
237 } // namespace component_updater 239 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698