Commit 49d15f6e authored by Yusuke Sato's avatar Yusuke Sato Committed by Chromium LUCI CQ

arc: Simplify arc::ExpandPropertyFilesForTesting

This CL removes the unused argument and changes the return type to
void.

BUG=None
TEST=try

Change-Id: I91926f78b02879f0e217f32e8bb210d2960f6e73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2618090Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Commit-Queue: Yusuke Sato <yusukes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841655}
parent ce92c8d0
......@@ -227,8 +227,7 @@ class ArcAuthServiceTest : public InProcessBrowserTest,
ArcSessionManager::Get()->SetArcSessionRunnerForTesting(
std::make_unique<ArcSessionRunner>(
base::BindRepeating(FakeArcSession::Create)));
EXPECT_TRUE(ExpandPropertyFilesForTesting(ArcSessionManager::Get(),
temp_dir_.GetPath()));
ExpandPropertyFilesForTesting(ArcSessionManager::Get());
chromeos::ProfileHelper::SetAlwaysReturnPrimaryUserForTesting(true);
}
......
......@@ -131,8 +131,7 @@ class ArcSessionManagerTest : public MixinBasedInProcessBrowserTest {
base::BindRepeating(FakeArcSession::Create)));
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
EXPECT_TRUE(ExpandPropertyFilesForTesting(ArcSessionManager::Get(),
temp_dir_.GetPath()));
ExpandPropertyFilesForTesting(ArcSessionManager::Get());
chromeos::ProfileHelper::SetAlwaysReturnPrimaryUserForTesting(true);
......
......@@ -46,10 +46,8 @@ std::unique_ptr<ArcSessionManager> CreateTestArcSessionManager(
return manager;
}
bool ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager,
const base::FilePath& temp_dir) {
void ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager) {
arc_session_manager->OnExpandPropertyFilesAndReadSaltForTesting(true);
return true;
}
} // namespace arc
......@@ -7,10 +7,6 @@
#include <memory>
namespace base {
class FilePath;
} // namespace base
namespace arc {
class ArcSessionManager;
......@@ -25,9 +21,7 @@ std::unique_ptr<ArcSessionManager> CreateTestArcSessionManager(
// Does something similar to CreateTestArcSessionManager(), but for an existing
// object. This function is useful for ARC browser_tests where ArcSessionManager
// object is (re)created with ArcServiceLauncher::ResetForTesting().
// TODO(yusukes): Remove |temp_dir| argument which is unused.
bool ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager,
const base::FilePath& temp_dir);
void ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager);
} // namespace arc
......
......@@ -11,7 +11,6 @@
#include "ash/public/cpp/test/shell_test_api.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
#include "base/optional.h"
#include "base/test/scoped_feature_list.h"
......@@ -593,8 +592,6 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin {
}
void SetUpOnMainThread() override {
ASSERT_TRUE(arc_temp_dir_.CreateUniqueTempDir());
if (params_.is_tablet)
ash::ShellTestApi().SetTabletModeEnabledForTest(true);
......@@ -604,8 +601,7 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin {
arc::ArcSessionManager::Get()->SetArcSessionRunnerForTesting(
std::make_unique<arc::ArcSessionRunner>(
base::BindRepeating(arc::FakeArcSession::Create)));
EXPECT_TRUE(arc::ExpandPropertyFilesForTesting(
arc::ArcSessionManager::Get(), arc_temp_dir_.GetPath()));
arc::ExpandPropertyFilesForTesting(arc::ArcSessionManager::Get());
}
}
void TearDownInProcessBrowserTestFixture() override {
......@@ -645,7 +641,6 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin {
std::unique_ptr<ScopedTestRecommendAppsFetcherFactory>
recommend_apps_fetcher_factory_;
net::EmbeddedTestServer* arc_tos_server_;
base::ScopedTempDir arc_temp_dir_;
DISALLOW_COPY_AND_ASSIGN(OobeEndToEndTestSetupMixin);
};
......
......@@ -6,7 +6,6 @@
#include <string>
#include "ash/public/cpp/login_screen_test_api.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/timer/timer.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
......@@ -62,14 +61,11 @@ class SupervisionTransitionScreenTest
}
void SetUpOnMainThread() override {
ASSERT_TRUE(arc_temp_dir_.CreateUniqueTempDir());
arc::ArcServiceLauncher::Get()->ResetForTesting();
arc::ArcSessionManager::Get()->SetArcSessionRunnerForTesting(
std::make_unique<arc::ArcSessionRunner>(
base::BindRepeating(arc::FakeArcSession::Create)));
EXPECT_TRUE(arc::ExpandPropertyFilesForTesting(
arc::ArcSessionManager::Get(), arc_temp_dir_.GetPath()));
arc::ExpandPropertyFilesForTesting(arc::ArcSessionManager::Get());
MixinBasedInProcessBrowserTest::SetUpOnMainThread();
// For this test class, the PRE tests just happen to always wait for active
......@@ -98,7 +94,6 @@ class SupervisionTransitionScreenTest
LoggedInUserMixin logged_in_user_mixin_{
&mixin_host_, content::IsPreTest() ? GetParam() : GetTargetUserType(),
embedded_test_server(), this, false /*should_launch_browser*/};
base::ScopedTempDir arc_temp_dir_;
};
IN_PROC_BROWSER_TEST_P(SupervisionTransitionScreenTest,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment