OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/app_window/app_window_geometry_cache.h" | 5 #include "extensions/browser/app_window/app_window_geometry_cache.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <utility> | 9 #include <utility> |
8 | 10 |
9 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
11 #include "base/prefs/mock_pref_change_callback.h" | 13 #include "base/prefs/mock_pref_change_callback.h" |
12 #include "base/prefs/pref_service_factory.h" | 14 #include "base/prefs/pref_service_factory.h" |
13 #include "base/prefs/testing_pref_store.h" | 15 #include "base/prefs/testing_pref_store.h" |
14 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
15 #include "components/pref_registry/pref_registry_syncable.h" | 17 #include "components/pref_registry/pref_registry_syncable.h" |
16 #include "content/public/test/test_browser_context.h" | 18 #include "content/public/test/test_browser_context.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 // The first added window should no longer have cached geometry. | 422 // The first added window should no longer have cached geometry. |
421 EXPECT_FALSE(cache_->GetGeometry(extension_id, "window_0", NULL, NULL, NULL)); | 423 EXPECT_FALSE(cache_->GetGeometry(extension_id, "window_0", NULL, NULL, NULL)); |
422 // All other windows should still exist. | 424 // All other windows should still exist. |
423 for (size_t i = 1; i < AppWindowGeometryCache::kMaxCachedWindows + 1; ++i) { | 425 for (size_t i = 1; i < AppWindowGeometryCache::kMaxCachedWindows + 1; ++i) { |
424 std::string window_id = "window_" + base::SizeTToString(i); | 426 std::string window_id = "window_" + base::SizeTToString(i); |
425 EXPECT_TRUE(cache_->GetGeometry(extension_id, window_id, NULL, NULL, NULL)); | 427 EXPECT_TRUE(cache_->GetGeometry(extension_id, window_id, NULL, NULL, NULL)); |
426 } | 428 } |
427 } | 429 } |
428 | 430 |
429 } // namespace extensions | 431 } // namespace extensions |
OLD | NEW |