diff options
author | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-13 06:37:42 +0000 |
---|---|---|
committer | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-13 06:37:42 +0000 |
commit | e9f195ef08c50293b7388b8ed05c12174d2dc139 (patch) | |
tree | b264462bb0f6775fd630f81be568bbf31e07ac52 /apps/shell_window_geometry_cache_unittest.cc | |
parent | 2a57ca64048fe077fdf841cd49e76fa787a6c251 (diff) | |
download | chromium_src-e9f195ef08c50293b7388b8ed05c12174d2dc139.zip chromium_src-e9f195ef08c50293b7388b8ed05c12174d2dc139.tar.gz chromium_src-e9f195ef08c50293b7388b8ed05c12174d2dc139.tar.bz2 |
The cache was designed to load an extension's stored geometry
from sync only when the extension is first loaded. Because the
cache was being lazily created on first access, it would never
exist on browser startup when all installed extensions were
being loaded.
This will attempt to load an extension's geometry from storage
on first access as well, if it is not already loaded.
BUG=246810
Review URL: https://chromiumcodereview.appspot.com/16012019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/shell_window_geometry_cache_unittest.cc')
-rw-r--r-- | apps/shell_window_geometry_cache_unittest.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/apps/shell_window_geometry_cache_unittest.cc b/apps/shell_window_geometry_cache_unittest.cc index 8566b4c..85ed137 100644 --- a/apps/shell_window_geometry_cache_unittest.cc +++ b/apps/shell_window_geometry_cache_unittest.cc @@ -79,7 +79,7 @@ void ShellWindowGeometryCacheTest::WaitForSync() { void ShellWindowGeometryCacheTest::LoadExtension( const std::string& extension_id) { - cache_->OnExtensionLoaded(extension_id); + cache_->LoadGeometryFromStorage(extension_id); WaitForSync(); } @@ -171,10 +171,6 @@ TEST_F(ShellWindowGeometryCacheTest, SaveGeometryAndStateToStore) { ASSERT_TRUE(dict->GetInteger(window_id + ".state", &v)); ASSERT_EQ(state, v); - // check to make sure cache indeed doesn't know about this extension anymore - ASSERT_FALSE(cache_->GetGeometry( - extension_id, window_id, &new_bounds, &new_state)); - // reload extension LoadExtension(extension_id); // and make sure the geometry got reloaded properly too |