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

Side by Side Diff: content/browser/appcache/appcache_update_job_unittest.cc

Issue 2940023002: TaskScheduler: migrate appcache database over to use it. (Closed)
Patch Set: comments + rebase Created 3 years, 5 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
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 "content/browser/appcache/appcache_update_job.h" 5 #include "content/browser/appcache/appcache_update_job.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/message_loop/message_loop.h"
18 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
19 #include "base/stl_util.h" 18 #include "base/stl_util.h"
20 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
21 #include "base/synchronization/waitable_event.h" 20 #include "base/synchronization/waitable_event.h"
21 #include "base/test/scoped_task_environment.h"
22 #include "base/threading/thread.h" 22 #include "base/threading/thread.h"
23 #include "base/threading/thread_task_runner_handle.h" 23 #include "base/threading/thread_task_runner_handle.h"
24 #include "content/browser/appcache/appcache_group.h" 24 #include "content/browser/appcache/appcache_group.h"
25 #include "content/browser/appcache/appcache_host.h" 25 #include "content/browser/appcache/appcache_host.h"
26 #include "content/browser/appcache/appcache_response.h" 26 #include "content/browser/appcache/appcache_response.h"
27 #include "content/browser/appcache/mock_appcache_service.h" 27 #include "content/browser/appcache/mock_appcache_service.h"
28 #include "net/base/net_errors.h" 28 #include "net/base/net_errors.h"
29 #include "net/http/http_response_headers.h" 29 #include "net/http/http_response_headers.h"
30 #include "net/http/http_util.h" 30 #include "net/http/http_util.h"
31 #include "net/url_request/url_request_error_job.h" 31 #include "net/url_request/url_request_error_job.h"
(...skipping 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after
3408 enum TestedManifest { 3408 enum TestedManifest {
3409 NONE, 3409 NONE,
3410 MANIFEST1, 3410 MANIFEST1,
3411 MANIFEST_MERGED_TYPES, 3411 MANIFEST_MERGED_TYPES,
3412 EMPTY_MANIFEST, 3412 EMPTY_MANIFEST,
3413 EMPTY_FILE_MANIFEST, 3413 EMPTY_FILE_MANIFEST,
3414 PENDING_MASTER_NO_UPDATE, 3414 PENDING_MASTER_NO_UPDATE,
3415 MANIFEST_WITH_INTERCEPT 3415 MANIFEST_WITH_INTERCEPT
3416 }; 3416 };
3417 3417
3418 base::test::ScopedTaskEnvironment scoped_task_environment_;
3418 std::unique_ptr<IOThread> io_thread_; 3419 std::unique_ptr<IOThread> io_thread_;
3419 3420
3420 std::unique_ptr<MockAppCacheService> service_; 3421 std::unique_ptr<MockAppCacheService> service_;
3421 scoped_refptr<AppCacheGroup> group_; 3422 scoped_refptr<AppCacheGroup> group_;
3422 scoped_refptr<AppCache> protect_newest_cache_; 3423 scoped_refptr<AppCache> protect_newest_cache_;
3423 std::unique_ptr<base::WaitableEvent> event_; 3424 std::unique_ptr<base::WaitableEvent> event_;
3424 3425
3425 std::unique_ptr<AppCacheResponseWriter> response_writer_; 3426 std::unique_ptr<AppCacheResponseWriter> response_writer_;
3426 3427
3427 // Hosts used by an async test that need to live until update job finishes. 3428 // Hosts used by an async test that need to live until update job finishes.
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
3722 3723
3723 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) { 3724 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) {
3724 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest); 3725 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest);
3725 } 3726 }
3726 3727
3727 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) { 3728 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) {
3728 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest); 3729 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest);
3729 } 3730 }
3730 3731
3731 } // namespace content 3732 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_unittest.cc ('k') | content/browser/appcache/appcache_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698