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

Side by Side Diff: webkit/appcache/appcache_update_job_unittest.cc

Issue 11369179: Move url_request_test_util into net namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing 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
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 #include "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 void SetNewJobFactory(net::URLRequestJobFactory* job_factory) { 557 void SetNewJobFactory(net::URLRequestJobFactory* job_factory) {
558 DCHECK(job_factory); 558 DCHECK(job_factory);
559 job_factory_.reset(job_factory); 559 job_factory_.reset(job_factory);
560 request_context_->set_job_factory(job_factory_.get()); 560 request_context_->set_job_factory(job_factory_.get());
561 } 561 }
562 562
563 virtual void Init() { 563 virtual void Init() {
564 job_factory_.reset(new net::URLRequestJobFactoryImpl); 564 job_factory_.reset(new net::URLRequestJobFactoryImpl);
565 job_factory_->SetProtocolHandler("http", new MockHttpServerJobFactory); 565 job_factory_->SetProtocolHandler("http", new MockHttpServerJobFactory);
566 job_factory_->SetProtocolHandler("https", new MockHttpServerJobFactory); 566 job_factory_->SetProtocolHandler("https", new MockHttpServerJobFactory);
567 request_context_.reset(new TestURLRequestContext()); 567 request_context_.reset(new net::TestURLRequestContext());
568 request_context_->set_job_factory(job_factory_.get()); 568 request_context_->set_job_factory(job_factory_.get());
569 } 569 }
570 570
571 virtual void CleanUp() { 571 virtual void CleanUp() {
572 request_context_.reset(); 572 request_context_.reset();
573 job_factory_.reset(); 573 job_factory_.reset();
574 } 574 }
575 575
576 private: 576 private:
577 scoped_ptr<net::URLRequestJobFactory> job_factory_; 577 scoped_ptr<net::URLRequestJobFactory> job_factory_;
(...skipping 3003 matching lines...) Expand 10 before | Expand all | Expand 10 after
3581 3581
3582 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) { 3582 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) {
3583 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest); 3583 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest);
3584 } 3584 }
3585 3585
3586 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) { 3586 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) {
3587 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest); 3587 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest);
3588 } 3588 }
3589 3589
3590 } // namespace appcache 3590 } // namespace appcache
OLDNEW
« no previous file with comments | « sync/tools/sync_listen_notifications.cc ('k') | webkit/fileapi/file_system_dir_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698