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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 5 #include <map>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 setup_temp_dir(); 54 setup_temp_dir();
55 } 55 }
56 void setup_temp_dir() { 56 void setup_temp_dir() {
57 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 57 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
58 base::FilePath indexeddb_dir = temp_dir_.path().Append( 58 base::FilePath indexeddb_dir = temp_dir_.path().Append(
59 IndexedDBContextImpl::kIndexedDBDirectory); 59 IndexedDBContextImpl::kIndexedDBDirectory);
60 ASSERT_TRUE(file_util::CreateDirectory(indexeddb_dir)); 60 ASSERT_TRUE(file_util::CreateDirectory(indexeddb_dir));
61 idb_context()->set_data_path_for_testing(indexeddb_dir); 61 idb_context()->set_data_path_for_testing(indexeddb_dir);
62 } 62 }
63 63
64 ~IndexedDBQuotaClientTest() { 64 virtual ~IndexedDBQuotaClientTest() {
65 // IndexedDBContext needs to be destructed on 65 // IndexedDBContext needs to be destructed on
66 // BrowserThread::WEBKIT_DEPRECATED, which is also a member variable of this 66 // BrowserThread::WEBKIT_DEPRECATED, which is also a member variable of this
67 // class. Cause IndexedDBContext's destruction now to ensure that it 67 // class. Cause IndexedDBContext's destruction now to ensure that it
68 // doesn't outlive BrowserThread::WEBKIT_DEPRECATED. 68 // doesn't outlive BrowserThread::WEBKIT_DEPRECATED.
69 idb_context_ = NULL; 69 idb_context_ = NULL;
70 browser_context_.reset(); 70 browser_context_.reset();
71 MessageLoop::current()->RunUntilIdle(); 71 MessageLoop::current()->RunUntilIdle();
72 } 72 }
73 73
74 int64 GetOriginUsage( 74 int64 GetOriginUsage(
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp)); 244 EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp));
245 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp)); 245 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
246 246
247 quota::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA); 247 quota::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA);
248 EXPECT_EQ(quota::kQuotaStatusOk, delete_status); 248 EXPECT_EQ(quota::kQuotaStatusOk, delete_status);
249 EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp)); 249 EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp));
250 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp)); 250 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
251 } 251 }
252 252
253 } // namespace content 253 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_browsertest.cc ('k') | content/browser/in_process_webkit/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698