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

Side by Side 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 unified diff | Download patch
OLDNEW
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 "apps/launcher.h" 5 #include "apps/launcher.h"
6 #include "apps/shell_window.h" 6 #include "apps/shell_window.h"
7 #include "apps/shell_window_registry.h" 7 #include "apps/shell_window_registry.h"
8 #include "apps/ui/native_app_window.h" 8 #include "apps/ui/native_app_window.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 launched_listener.Reply("restart"); 1285 launched_listener.Reply("restart");
1286 ExtensionTestMessageListener restart_requested_listener("restartRequested", 1286 ExtensionTestMessageListener restart_requested_listener("restartRequested",
1287 false); 1287 false);
1288 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); 1288 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied());
1289 1289
1290 EXPECT_EQ(1, request_restart_call_count()); 1290 EXPECT_EQ(1, request_restart_call_count());
1291 } 1291 }
1292 1292
1293 #endif // defined(OS_CHROMEOS) 1293 #endif // defined(OS_CHROMEOS)
1294 1294
1295 // Test that when an application is uninstalled and re-install it does not have
1296 // access to the previously set data.
1297 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ReinstallDataCleanup) {
1298 // The application is installed and launched. After the 'Launched' message is
1299 // acknowledged by the browser process, the application will test that some
1300 // data are not installed and then install them. The application will then be
1301 // uninstalled and the same process will be repeated.
1302 ExtensionTestMessageListener launched_listener("Launched", false);
1303 const Extension* extension =
1304 LoadAndLaunchPlatformApp("reinstall_data_cleanup");
1305 ASSERT_TRUE(extension);
1306
1307 ExtensionApiTest::ResultCatcher result_catcher;
1308 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
1309
1310 EXPECT_TRUE(result_catcher.GetNextResult());
1311
1312 UninstallExtension(extension->id());
1313 content::RunAllPendingInMessageLoop();
1314
1315 {
1316 ExtensionTestMessageListener launched_listener("Launched", false);
not at google - send to devlin 2014/01/08 02:49:17 perhaps give the first half of the test the {} sco
mlamouri (slow - plz ping) 2014/01/08 17:42:31 It does not provide much advantage but why not.
1317 LoadAndLaunchPlatformApp("reinstall_data_cleanup");
not at google - send to devlin 2014/01/08 02:49:17 assert that this gets the same ID as before
mlamouri (slow - plz ping) 2014/01/08 17:42:31 OK.
1318
1319 ExtensionApiTest::ResultCatcher result_catcher;
1320
1321 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
1322
1323 EXPECT_TRUE(result_catcher.GetNextResult());
1324 }
1325 }
1295 1326
1296 } // namespace extensions 1327 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/data_deleter.h » ('j') | chrome/browser/extensions/data_deleter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698