Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: chrome/browser/apps/app_browsertest.cc

Issue 123733003: Get ride of chrome.storage.* data when removing an application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/data_deleter.h » ('j') | chrome/browser/extensions/data_deleter.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/app_browsertest.cc
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index ef6f3e849da338b1df61d639f7468d4768add33a..82a30dd9196ec1519c7a83cbe80dfe205026f7d4 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -1292,5 +1292,44 @@ IN_PROC_BROWSER_TEST_F(RestartDeviceTest, Restart) {
#endif // defined(OS_CHROMEOS)
+// Test that when an application is uninstalled and re-install it does not have
+// access to the previously set data.
+IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ReinstallDataCleanup) {
+ // The application is installed and launched. After the 'Launched' message is
+ // acknowledged by the browser process, the application will test that some
+ // data are not installed and then install them. The application will then be
+ // uninstalled and the same process will be repeated.
+ std::string extension_id;
+
+ {
+ ExtensionTestMessageListener launched_listener("Launched", false);
+ const Extension* extension =
+ LoadAndLaunchPlatformApp("reinstall_data_cleanup");
+ ASSERT_TRUE(extension);
+ extension_id = extension->id();
+
+ ExtensionApiTest::ResultCatcher result_catcher;
+ ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
+
+ EXPECT_TRUE(result_catcher.GetNextResult());
+ }
+
+ UninstallExtension(extension_id);
+ content::RunAllPendingInMessageLoop();
+
+ {
+ ExtensionTestMessageListener launched_listener("Launched", false);
+ const Extension* extension =
+ LoadAndLaunchPlatformApp("reinstall_data_cleanup");
+ ASSERT_TRUE(extension);
+ ASSERT_EQ(extension_id, extension->id());
+
+ ExtensionApiTest::ResultCatcher result_catcher;
+
+ ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
+
+ EXPECT_TRUE(result_catcher.GetNextResult());
+ }
+}
} // namespace extensions
« no previous file with comments | « no previous file | chrome/browser/extensions/data_deleter.h » ('j') | chrome/browser/extensions/data_deleter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698