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

Side by Side Diff: chrome/browser/chromeos/file_manager/file_manager_browsertest.cc

Issue 166573005: Rename apps::ShellWindow to apps::AppWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, nits (rename) 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // Browser test for basic Chrome OS file manager functionality: 5 // Browser test for basic Chrome OS file manager functionality:
6 // - The file list is updated when a file is added externally to the Downloads 6 // - The file list is updated when a file is added externally to the Downloads
7 // folder. 7 // folder.
8 // - Selecting a file and copy-pasting it with the keyboard copies the file. 8 // - Selecting a file and copy-pasting it with the keyboard copies the file.
9 // - Selecting a file and pressing delete deletes it. 9 // - Selecting a file and pressing delete deletes it.
10 10
11 #include <deque> 11 #include <deque>
12 #include <string> 12 #include <string>
13 13
14 #include "apps/shell_window.h" 14 #include "apps/app_window.h"
15 #include "apps/shell_window_registry.h" 15 #include "apps/app_window_registry.h"
16 #include "ash/session_state_delegate.h" 16 #include "ash/session_state_delegate.h"
17 #include "ash/shell.h" 17 #include "ash/shell.h"
18 #include "base/bind.h" 18 #include "base/bind.h"
19 #include "base/callback.h" 19 #include "base/callback.h"
20 #include "base/file_util.h" 20 #include "base/file_util.h"
21 #include "base/files/file_path.h" 21 #include "base/files/file_path.h"
22 #include "base/json/json_reader.h" 22 #include "base/json/json_reader.h"
23 #include "base/json/json_value_converter.h" 23 #include "base/json/json_value_converter.h"
24 #include "base/json/json_writer.h" 24 #include "base/json/json_writer.h"
25 #include "base/prefs/pref_service.h" 25 #include "base/prefs/pref_service.h"
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } 907 }
908 908
909 virtual std::string OnMessage(const std::string& name, 909 virtual std::string OnMessage(const std::string& name,
910 const base::Value* value) OVERRIDE { 910 const base::Value* value) OVERRIDE {
911 if (name == "addAllUsers") { 911 if (name == "addAllUsers") {
912 AddAllUsers(); 912 AddAllUsers();
913 return "true"; 913 return "true";
914 } else if (name == "getWindowOwnerId") { 914 } else if (name == "getWindowOwnerId") {
915 chrome::MultiUserWindowManager* const window_manager = 915 chrome::MultiUserWindowManager* const window_manager =
916 chrome::MultiUserWindowManager::GetInstance(); 916 chrome::MultiUserWindowManager::GetInstance();
917 apps::ShellWindowRegistry* const shell_window_registry = 917 apps::AppWindowRegistry* const app_window_registry =
918 apps::ShellWindowRegistry::Get(profile()); 918 apps::AppWindowRegistry::Get(profile());
919 DCHECK(window_manager); 919 DCHECK(window_manager);
920 DCHECK(shell_window_registry); 920 DCHECK(app_window_registry);
921 921
922 const apps::ShellWindowRegistry::ShellWindowList& list = 922 const apps::AppWindowRegistry::AppWindowList& list =
923 shell_window_registry->GetShellWindowsForApp( 923 app_window_registry->GetAppWindowsForApp(
924 file_manager::kFileManagerAppId); 924 file_manager::kFileManagerAppId);
925 return list.size() == 1u ? 925 return list.size() == 1u ?
926 window_manager->GetUserPresentingWindow( 926 window_manager->GetUserPresentingWindow(
927 list.front()->GetNativeWindow()) : ""; 927 list.front()->GetNativeWindow()) : "";
928 } 928 }
929 return FileManagerBrowserTestBase::OnMessage(name, value); 929 return FileManagerBrowserTestBase::OnMessage(name, value);
930 } 930 }
931 931
932 std::string test_case_name_; 932 std::string test_case_name_;
933 }; 933 };
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 // (bob and charlie) are added in the test. Thus the existing test verifies 989 // (bob and charlie) are added in the test. Thus the existing test verifies
990 // that the feature is effectively working with lastly logged in users. 990 // that the feature is effectively working with lastly logged in users.
991 AddExtraUsersForStressTesting(); 991 AddExtraUsersForStressTesting();
992 992
993 set_test_case_name("multiProfileVisitDesktopMenu"); 993 set_test_case_name("multiProfileVisitDesktopMenu");
994 StartTest(); 994 StartTest();
995 } 995 }
996 996
997 } // namespace 997 } // namespace
998 } // namespace file_manager 998 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698