OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 const GURL kOrigin; | 33 const GURL kOrigin; |
34 const base::string16 kKey; | 34 const base::string16 kKey; |
35 const base::string16 kValue; | 35 const base::string16 kValue; |
36 const bool kDontIncludeFileInfo; | 36 const bool kDontIncludeFileInfo; |
37 const bool kDoIncludeFileInfo; | 37 const bool kDoIncludeFileInfo; |
38 | 38 |
39 virtual void SetUp() { | 39 virtual void SetUp() { |
40 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 40 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
41 storage_policy_ = new quota::MockSpecialStoragePolicy; | 41 storage_policy_ = new quota::MockSpecialStoragePolicy; |
42 task_runner_ = new MockDomStorageTaskRunner( | 42 task_runner_ = |
43 base::MessageLoopProxy::current()); | 43 new MockDomStorageTaskRunner(base::MessageLoopProxy::current().get()); |
44 context_ = new DomStorageContext(temp_dir_.path(), | 44 context_ = new DomStorageContext(temp_dir_.path(), |
45 base::FilePath(), | 45 base::FilePath(), |
46 storage_policy_.get(), | 46 storage_policy_.get(), |
47 task_runner_.get()); | 47 task_runner_.get()); |
48 } | 48 } |
49 | 49 |
50 virtual void TearDown() { | 50 virtual void TearDown() { |
51 base::MessageLoop::current()->RunUntilIdle(); | 51 base::MessageLoop::current()->RunUntilIdle(); |
52 } | 52 } |
53 | 53 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 area = dom_namespace->OpenStorageArea(kOrigin); | 251 area = dom_namespace->OpenStorageArea(kOrigin); |
252 read_value = area->GetItem(kKey); | 252 read_value = area->GetItem(kKey); |
253 EXPECT_TRUE(read_value.is_null()); | 253 EXPECT_TRUE(read_value.is_null()); |
254 dom_namespace->CloseStorageArea(area); | 254 dom_namespace->CloseStorageArea(area); |
255 context_->Shutdown(); | 255 context_->Shutdown(); |
256 context_ = NULL; | 256 context_ = NULL; |
257 base::MessageLoop::current()->RunUntilIdle(); | 257 base::MessageLoop::current()->RunUntilIdle(); |
258 } | 258 } |
259 | 259 |
260 } // namespace dom_storage | 260 } // namespace dom_storage |
OLD | NEW |