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

Unified Diff: ash/common/test/test_system_tray_delegate.h

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: Created 3 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 | « ash/common/test/test_shelf_item_delegate.cc ('k') | ash/common/test/test_system_tray_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/test/test_system_tray_delegate.h
diff --git a/ash/common/test/test_system_tray_delegate.h b/ash/common/test/test_system_tray_delegate.h
deleted file mode 100644
index b8ed42f20ffd01357e470f1b4c976943d22fe27d..0000000000000000000000000000000000000000
--- a/ash/common/test/test_system_tray_delegate.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_COMMON_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_
-#define ASH_COMMON_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_
-
-#include "ash/system/tray/default_system_tray_delegate.h"
-#include "ash/system/tray/ime_info.h"
-#include "base/macros.h"
-#include "base/time/time.h"
-
-namespace ash {
-namespace test {
-
-class TestSystemTrayDelegate : public DefaultSystemTrayDelegate {
- public:
- TestSystemTrayDelegate();
- ~TestSystemTrayDelegate() override;
-
- // Changes the current login status in the test. This also invokes
- // UpdateAfterLoginStatusChange(). Usually this is called in the test code to
- // set up a login status. This will fit to most of the test cases, but this
- // cannot be set during the initialization. To test the initialization,
- // consider using SetInitialLoginStatus() instead.
- void SetLoginStatus(LoginStatus login_status);
-
- // Updates the session length limit so that the limit will come from now in
- // |new_limit|.
- void SetSessionLengthLimitForTest(const base::TimeDelta& new_limit);
-
- // Clears the session length limit.
- void ClearSessionLengthLimit();
-
- // Sets the IME info.
- void SetCurrentIME(const IMEInfo& info);
-
- // Sets the list of available IMEs.
- void SetAvailableIMEList(const IMEInfoList& list);
-
- // Overridden from SystemTrayDelegate:
- LoginStatus GetUserLoginStatus() const override;
- bool IsUserSupervised() const override;
- bool GetSessionStartTime(base::TimeTicks* session_start_time) override;
- bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override;
- void GetCurrentIME(IMEInfo* info) override;
- void GetAvailableIMEList(IMEInfoList* list) override;
-
- private:
- LoginStatus login_status_;
- base::TimeDelta session_length_limit_;
- bool session_length_limit_set_;
- IMEInfo current_ime_;
- IMEInfoList ime_list_;
-
- DISALLOW_COPY_AND_ASSIGN(TestSystemTrayDelegate);
-};
-
-// Changes the initial login status before TestSystemTrayDelegate is created.
-// Allows testing the case when chrome is restarted right after login (such as
-// when a flag is set).
-class ScopedInitialLoginStatus {
- public:
- explicit ScopedInitialLoginStatus(LoginStatus status);
- ~ScopedInitialLoginStatus();
-
- private:
- LoginStatus old_status_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedInitialLoginStatus);
-};
-
-} // namespace test
-} // namespace ash
-
-#endif // ASH_COMMON_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_
« no previous file with comments | « ash/common/test/test_shelf_item_delegate.cc ('k') | ash/common/test/test_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698