| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 size_t Size() { return cache_->Size(); } | 634 size_t Size() { return cache_->Size(); } |
| 635 | 635 |
| 636 TestBrowserContext* browser_context() { | 636 TestBrowserContext* browser_context() { |
| 637 return browser_context_.get(); | 637 return browser_context_.get(); |
| 638 } | 638 } |
| 639 | 639 |
| 640 private: | 640 private: |
| 641 content::TestBrowserThreadBundle thread_bundle_; | 641 content::TestBrowserThreadBundle thread_bundle_; |
| 642 std::unique_ptr<TestBrowserContext> browser_context_; | 642 std::unique_ptr<TestBrowserContext> browser_context_; |
| 643 | 643 |
| 644 scoped_refptr<ShaderDiskCache> cache_; | 644 scoped_refptr<gpu::ShaderDiskCache> cache_; |
| 645 }; | 645 }; |
| 646 | 646 |
| 647 // Tests --------------------------------------------------------------------- | 647 // Tests --------------------------------------------------------------------- |
| 648 | 648 |
| 649 TEST_F(StoragePartitionShaderClearTest, ClearShaderCache) { | 649 TEST_F(StoragePartitionShaderClearTest, ClearShaderCache) { |
| 650 InitCache(); | 650 InitCache(); |
| 651 EXPECT_EQ(1u, Size()); | 651 EXPECT_EQ(1u, Size()); |
| 652 | 652 |
| 653 base::RunLoop run_loop; | 653 base::RunLoop run_loop; |
| 654 base::ThreadTaskRunnerHandle::Get()->PostTask( | 654 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 CanonicalCookie::Create(url2, "A=B;domain=.example.com", now, options)); | 1316 CanonicalCookie::Create(url2, "A=B;domain=.example.com", now, options)); |
| 1317 invalid_cookies.push_back(CanonicalCookie::Create(url3, "A=B", now, options)); | 1317 invalid_cookies.push_back(CanonicalCookie::Create(url3, "A=B", now, options)); |
| 1318 | 1318 |
| 1319 for (const auto& cookie : valid_cookies) | 1319 for (const auto& cookie : valid_cookies) |
| 1320 EXPECT_TRUE(predicate.Run(*cookie)) << cookie->DebugString(); | 1320 EXPECT_TRUE(predicate.Run(*cookie)) << cookie->DebugString(); |
| 1321 for (const auto& cookie : invalid_cookies) | 1321 for (const auto& cookie : invalid_cookies) |
| 1322 EXPECT_FALSE(predicate.Run(*cookie)) << cookie->DebugString(); | 1322 EXPECT_FALSE(predicate.Run(*cookie)) << cookie->DebugString(); |
| 1323 } | 1323 } |
| 1324 | 1324 |
| 1325 } // namespace content | 1325 } // namespace content |
| OLD | NEW |