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

Side by Side Diff: rlz/lib/rlz_lib_test.cc

Issue 11365227: Reland 167337 - Move url_request_test_util into net namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « net/url_request/url_request_test_util.cc ('k') | sync/internal_api/http_bridge_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // A test application for the RLZ library. 5 // A test application for the RLZ library.
6 // 6 //
7 // These tests should not be executed on the build server: 7 // These tests should not be executed on the build server:
8 // - They assert for the failed cases. 8 // - They assert for the failed cases.
9 // - They modify machine state (registry). 9 // - They modify machine state (registry).
10 // 10 //
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 #if defined(OS_MACOSX) 425 #if defined(OS_MACOSX)
426 base::mac::ScopedNSAutoreleasePool pool; 426 base::mac::ScopedNSAutoreleasePool pool;
427 #endif 427 #endif
428 428
429 base::Thread::Options options; 429 base::Thread::Options options;
430 options.message_loop_type = MessageLoop::TYPE_IO; 430 options.message_loop_type = MessageLoop::TYPE_IO;
431 431
432 base::Thread io_thread("rlz_unittest_io_thread"); 432 base::Thread io_thread("rlz_unittest_io_thread");
433 ASSERT_TRUE(io_thread.StartWithOptions(options)); 433 ASSERT_TRUE(io_thread.StartWithOptions(options));
434 434
435 scoped_refptr<TestURLRequestContextGetter> context = 435 scoped_refptr<net::TestURLRequestContextGetter> context =
436 new TestURLRequestContextGetter( 436 new net::TestURLRequestContextGetter(
437 io_thread.message_loop()->message_loop_proxy()); 437 io_thread.message_loop()->message_loop_proxy());
438 rlz_lib::SetURLRequestContext(context.get()); 438 rlz_lib::SetURLRequestContext(context.get());
439 439
440 class URLRequestRAII { 440 class URLRequestRAII {
441 public: 441 public:
442 URLRequestRAII(net::URLRequestContextGetter* context) { 442 URLRequestRAII(net::URLRequestContextGetter* context) {
443 rlz_lib::SetURLRequestContext(context); 443 rlz_lib::SetURLRequestContext(context);
444 } 444 }
445 ~URLRequestRAII() { 445 ~URLRequestRAII() {
446 rlz_lib::SetURLRequestContext(NULL); 446 rlz_lib::SetURLRequestContext(NULL);
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 int mkdir_result = mkdir(rlz_lib::testing::RlzPlistFilenameStr().c_str(), 884 int mkdir_result = mkdir(rlz_lib::testing::RlzPlistFilenameStr().c_str(),
885 0500); 885 0500);
886 ASSERT_EQ(0, mkdir_result); 886 ASSERT_EQ(0, mkdir_result);
887 887
888 rlz_lib::SupplementaryBranding branding("TEST"); 888 rlz_lib::SupplementaryBranding branding("TEST");
889 EXPECT_FALSE(rlz_lib::RecordProductEvent(rlz_lib::TOOLBAR_NOTIFIER, 889 EXPECT_FALSE(rlz_lib::RecordProductEvent(rlz_lib::TOOLBAR_NOTIFIER,
890 rlz_lib::IE_DEFAULT_SEARCH, rlz_lib::INSTALL)); 890 rlz_lib::IE_DEFAULT_SEARCH, rlz_lib::INSTALL));
891 } 891 }
892 892
893 #endif 893 #endif
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.cc ('k') | sync/internal_api/http_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698