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 "content/browser/dom_storage/dom_storage_context_impl.h" |
5 #include "base/bind.h" | 6 #include "base/bind.h" |
6 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
8 #include "base/macros.h" | 9 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
11 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
12 #include "base/threading/sequenced_worker_pool.h" | 13 #include "base/threading/sequenced_worker_pool.h" |
13 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
15 #include "content/browser/dom_storage/dom_storage_area.h" | 16 #include "content/browser/dom_storage/dom_storage_area.h" |
16 #include "content/browser/dom_storage/dom_storage_context_impl.h" | |
17 #include "content/browser/dom_storage/dom_storage_namespace.h" | 17 #include "content/browser/dom_storage/dom_storage_namespace.h" |
18 #include "content/browser/dom_storage/dom_storage_task_runner.h" | 18 #include "content/browser/dom_storage/dom_storage_task_runner.h" |
19 #include "content/public/browser/local_storage_usage_info.h" | 19 #include "content/public/browser/local_storage_usage_info.h" |
20 #include "content/public/browser/session_storage_usage_info.h" | 20 #include "content/public/browser/session_storage_usage_info.h" |
21 #include "content/public/test/mock_special_storage_policy.h" | 21 #include "storage/browser/test/mock_special_storage_policy.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 #include "url/origin.h" | 24 #include "url/origin.h" |
25 | 25 |
26 using base::ASCIIToUTF16; | 26 using base::ASCIIToUTF16; |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 class DOMStorageContextImplTest : public testing::Test { | 30 class DOMStorageContextImplTest : public testing::Test { |
31 public: | 31 public: |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // Delete the suborigin only. This should leave the origin. | 385 // Delete the suborigin only. This should leave the origin. |
386 context_->DeleteLocalStorage(kSuborigin); | 386 context_->DeleteLocalStorage(kSuborigin); |
387 | 387 |
388 read_value = origin_area->GetItem(kOriginKey); | 388 read_value = origin_area->GetItem(kOriginKey); |
389 EXPECT_EQ(kOriginValue, read_value.string()); | 389 EXPECT_EQ(kOriginValue, read_value.string()); |
390 read_value = suborigin_area->GetItem(kSuboriginKey); | 390 read_value = suborigin_area->GetItem(kSuboriginKey); |
391 EXPECT_TRUE(read_value.is_null()); | 391 EXPECT_TRUE(read_value.is_null()); |
392 } | 392 } |
393 | 393 |
394 } // namespace content | 394 } // namespace content |
OLD | NEW |