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

Unified Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js

Issue 145813010: Files.app: add test for multi-profile desktop movement menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + review fix Created 6 years, 10 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 | « chrome/browser/resources/file_manager/background/js/test_util.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js
index a8f1054cab55581ef804c8abb383445378de2b1c..5084042fceb7c081a933462912d64ac22fc50777 100644
--- a/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js
+++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js
@@ -1853,3 +1853,75 @@ testcase.multiProfileBadge = function() {
}
]);
};
+
+testcase.multiProfileVisitDesktopMenu = function() {
+ var appId;
+ StepsRunner.run([
+ function() {
+ setupAndWaitUntilReady(null, RootPath.DOWNLOADS, this.next);
+ },
+ // Add all users.
+ function(inAppId) {
+ appId = inAppId;
+ chrome.test.sendMessage(JSON.stringify({name: 'addAllUsers'}),
+ this.next);
+ },
+ // Wait for menu items. Profiles for non-current desktop should appear and
+ // the profile for the current desktop (alice) should be hidden.
+ function(json) {
+ chrome.test.assertTrue(JSON.parse(json));
+ callRemoteTestUtil('waitForVisitDesktopMenu',
+ appId,
+ ['bob@invalid.domain', true],
+ this.next);
+ },
+ function() {
+ callRemoteTestUtil('waitForVisitDesktopMenu',
+ appId,
+ ['charlie@invalid.domain', true],
+ this.next);
+ },
+ function() {
+ callRemoteTestUtil('waitForVisitDesktopMenu',
+ appId,
+ ['alice@invalid.domain', false],
+ this.next);
+ },
+ // Activate the visit desktop menu.
+ function() {
+ callRemoteTestUtil('runVisitDesktopMenu',
+ appId,
+ ['bob@invalid.domain'],
+ this.next);
+ },
+ // Wait for the new menu state. Now 'alice' is shown and 'bob' is hidden.
+ function(result) {
+ chrome.test.assertTrue(result);
+ callRemoteTestUtil('waitForVisitDesktopMenu',
+ appId,
+ ['alice@invalid.domain', true],
+ this.next);
+ },
+ function() {
+ callRemoteTestUtil('waitForVisitDesktopMenu',
+ appId,
+ ['charlie@invalid.domain', true],
+ this.next);
+ },
+ function() {
+ callRemoteTestUtil('waitForVisitDesktopMenu',
+ appId,
+ ['bob@invalid.domain', false],
+ this.next);
+ },
+ // Check that the window owner has indeed been changed.
+ function() {
+ chrome.test.sendMessage(JSON.stringify({name: 'getWindowOwnerId'}),
+ this.next);
+ },
+ function(result) {
+ chrome.test.assertEq('bob@invalid.domain', result);
+ checkIfNoErrorsOccured(this.next);
+ }
+ ]);
+};
« no previous file with comments | « chrome/browser/resources/file_manager/background/js/test_util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698