| 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 "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/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 public: | 63 public: |
| 64 BrowsingDataFileSystemHelperTest() { | 64 BrowsingDataFileSystemHelperTest() { |
| 65 profile_.reset(new TestingProfile()); | 65 profile_.reset(new TestingProfile()); |
| 66 | 66 |
| 67 helper_ = BrowsingDataFileSystemHelper::Create( | 67 helper_ = BrowsingDataFileSystemHelper::Create( |
| 68 BrowserContext::GetDefaultStoragePartition(profile_.get())-> | 68 BrowserContext::GetDefaultStoragePartition(profile_.get())-> |
| 69 GetFileSystemContext()); | 69 GetFileSystemContext()); |
| 70 base::MessageLoop::current()->RunUntilIdle(); | 70 base::MessageLoop::current()->RunUntilIdle(); |
| 71 canned_helper_ = new CannedBrowsingDataFileSystemHelper(profile_.get()); | 71 canned_helper_ = new CannedBrowsingDataFileSystemHelper(profile_.get()); |
| 72 } | 72 } |
| 73 virtual ~BrowsingDataFileSystemHelperTest() { | 73 ~BrowsingDataFileSystemHelperTest() override { |
| 74 // Avoid memory leaks. | 74 // Avoid memory leaks. |
| 75 profile_.reset(); | 75 profile_.reset(); |
| 76 base::MessageLoop::current()->RunUntilIdle(); | 76 base::MessageLoop::current()->RunUntilIdle(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 TestingProfile* GetProfile() { | 79 TestingProfile* GetProfile() { |
| 80 return profile_.get(); | 80 return profile_.get(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 // Blocks on the current MessageLoop until Notify() is called. | 83 // Blocks on the current MessageLoop until Notify() is called. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // extension and devtools schemes. | 299 // extension and devtools schemes. |
| 300 TEST_F(BrowsingDataFileSystemHelperTest, IgnoreExtensionsAndDevTools) { | 300 TEST_F(BrowsingDataFileSystemHelperTest, IgnoreExtensionsAndDevTools) { |
| 301 ASSERT_TRUE(canned_helper_->empty()); | 301 ASSERT_TRUE(canned_helper_->empty()); |
| 302 canned_helper_->AddFileSystem(kOriginExt, kTemporary, 0); | 302 canned_helper_->AddFileSystem(kOriginExt, kTemporary, 0); |
| 303 ASSERT_TRUE(canned_helper_->empty()); | 303 ASSERT_TRUE(canned_helper_->empty()); |
| 304 canned_helper_->AddFileSystem(kOriginDevTools, kTemporary, 0); | 304 canned_helper_->AddFileSystem(kOriginDevTools, kTemporary, 0); |
| 305 ASSERT_TRUE(canned_helper_->empty()); | 305 ASSERT_TRUE(canned_helper_->empty()); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace | 308 } // namespace |
| OLD | NEW |