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 <list> | 5 #include <list> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "webkit/renderer/dom_storage/dom_storage_cached_area.h" | 10 #include "webkit/renderer/dom_storage/dom_storage_cached_area.h" |
11 #include "webkit/renderer/dom_storage/dom_storage_proxy.h" | 11 #include "webkit/renderer/dom_storage/dom_storage_proxy.h" |
12 | 12 |
13 namespace dom_storage { | 13 namespace dom_storage { |
14 | 14 |
15 namespace { | 15 namespace { |
16 // A mock implementation of the DomStorageProxy interface. | 16 // A mock implementation of the DomStorageProxy interface. |
17 class MockProxy : public DomStorageProxy { | 17 class MockProxy : public DomStorageProxy { |
18 public: | 18 public: |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 EXPECT_FALSE(IsIgnoringKeyMutations(cached_area.get(), kKey)); | 340 EXPECT_FALSE(IsIgnoringKeyMutations(cached_area.get(), kKey)); |
341 | 341 |
342 // A failed set item operation should Reset the cache. | 342 // A failed set item operation should Reset the cache. |
343 EXPECT_TRUE(cached_area->SetItem(kConnectionId, kKey, kValue, kPageUrl)); | 343 EXPECT_TRUE(cached_area->SetItem(kConnectionId, kKey, kValue, kPageUrl)); |
344 EXPECT_TRUE(IsIgnoringKeyMutations(cached_area.get(), kKey)); | 344 EXPECT_TRUE(IsIgnoringKeyMutations(cached_area.get(), kKey)); |
345 mock_proxy_->CompleteOnePendingCallback(false); | 345 mock_proxy_->CompleteOnePendingCallback(false); |
346 EXPECT_FALSE(IsPrimed(cached_area.get())); | 346 EXPECT_FALSE(IsPrimed(cached_area.get())); |
347 } | 347 } |
348 | 348 |
349 } // namespace dom_storage | 349 } // namespace dom_storage |
OLD | NEW |