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

Side by Side Diff: trunk/src/content/browser/storage_partition_impl_unittest.cc

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/files/scoped_temp_dir.h" 5 #include "base/files/scoped_temp_dir.h"
6 #include "base/message_loop/message_loop_proxy.h" 6 #include "base/message_loop/message_loop_proxy.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "content/browser/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/browser/gpu/shader_disk_cache.h" 10 #include "content/browser/gpu/shader_disk_cache.h"
11 #include "content/browser/net/cookie_store_map.h"
12 #include "content/browser/storage_partition_impl.h" 11 #include "content/browser/storage_partition_impl.h"
13 #include "content/public/browser/storage_partition.h" 12 #include "content/public/browser/storage_partition.h"
14 #include "content/public/test/test_browser_thread_bundle.h" 13 #include "content/public/test/test_browser_thread_bundle.h"
15 #include "net/base/test_completion_callback.h" 14 #include "net/base/test_completion_callback.h"
16 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
17 16
18 namespace content { 17 namespace content {
19 namespace { 18 namespace {
20 19
21 class TestClosureCallback { 20 class TestClosureCallback {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE, 102 StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE,
104 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL, 103 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
105 time, time, cb); 104 time, time, cb);
106 } 105 }
107 106
108 TEST_F(StoragePartitionShaderClearTest, ClearShaderCache) { 107 TEST_F(StoragePartitionShaderClearTest, ClearShaderCache) {
109 InitCache(); 108 InitCache();
110 EXPECT_EQ(1u, Size()); 109 EXPECT_EQ(1u, Size());
111 110
112 TestClosureCallback clear_cb; 111 TestClosureCallback clear_cb;
113 StoragePartitionImpl sp(cache_path(), NULL, NULL, NULL, NULL, NULL, NULL, 112 StoragePartitionImpl sp(
114 scoped_ptr<CookieStoreMap>(), NULL); 113 cache_path(), NULL, NULL, NULL, NULL, NULL, NULL, NULL);
115 base::MessageLoop::current()->PostTask( 114 base::MessageLoop::current()->PostTask(
116 FROM_HERE, base::Bind(&ClearData, &sp, clear_cb.callback())); 115 FROM_HERE, base::Bind(&ClearData, &sp, clear_cb.callback()));
117 clear_cb.WaitForResult(); 116 clear_cb.WaitForResult();
118 EXPECT_EQ(0u, Size()); 117 EXPECT_EQ(0u, Size());
119 } 118 }
120 119
121 } // namespace content 120 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/browser/storage_partition_impl_map.cc ('k') | trunk/src/content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698