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

Unified Diff: chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc

Issue 2561023002: arc: ARC loading progress should not be shown when started from OOBE. (Closed)
Patch Set: rebased + comments updated Created 3 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
Index: chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc b/chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc
index 741c93afd8ba4f45020ea738e180791cc0be3de2..d5bbc5fdf44628ccea03af1674dca96fad765092 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/arc/arc_service_launcher.h"
#include "chrome/browser/chromeos/arc/arc_session_manager.h"
+#include "chrome/browser/chromeos/arc/test/arc_data_removed_waiter.h"
#include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
#include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
@@ -93,37 +94,6 @@ class ArcSessionManagerShutdownObserver : public ArcSessionManager::Observer {
DISALLOW_COPY_AND_ASSIGN(ArcSessionManagerShutdownObserver);
};
-// Observer of ARC data has been removed.
-class ArcSessionManagerDataRemovedObserver
- : public ArcSessionManager::Observer {
- public:
- ArcSessionManagerDataRemovedObserver() {
- ArcSessionManager::Get()->AddObserver(this);
- }
-
- ~ArcSessionManagerDataRemovedObserver() override {
- ArcSessionManager::Get()->RemoveObserver(this);
- }
-
- void Wait() {
- run_loop_.reset(new base::RunLoop);
- run_loop_->Run();
- run_loop_.reset();
- }
-
- // ArcSessionManager::Observer:
- void OnArcDataRemoved() override {
- if (!run_loop_)
- return;
- run_loop_->Quit();
- }
-
- private:
- std::unique_ptr<base::RunLoop> run_loop_;
-
- DISALLOW_COPY_AND_ASSIGN(ArcSessionManagerDataRemovedObserver);
-};
-
class ArcSessionManagerTest : public InProcessBrowserTest {
protected:
ArcSessionManagerTest() {}
@@ -266,7 +236,7 @@ IN_PROC_BROWSER_TEST_F(ArcSessionManagerTest, MAYBE_ManagedAndroidAccount) {
ArcSessionManagerShutdownObserver().Wait();
ASSERT_EQ(ArcSessionManager::State::REMOVING_DATA_DIR,
ArcSessionManager::Get()->state());
- ArcSessionManagerDataRemovedObserver().Wait();
+ ArcDataRemovedWaiter().Wait();
ASSERT_EQ(ArcSessionManager::State::STOPPED,
ArcSessionManager::Get()->state());
}
« no previous file with comments | « chrome/browser/chromeos/arc/arc_session_manager.cc ('k') | chrome/browser/chromeos/arc/arc_session_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698