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, ...@@ -227,8 +227,7 @@ class ArcAuthServiceTest : public InProcessBrowserTest,
ArcSessionManager::Get()->SetArcSessionRunnerForTesting( ArcSessionManager::Get()->SetArcSessionRunnerForTesting(
std::make_unique<ArcSessionRunner>( std::make_unique<ArcSessionRunner>(
base::BindRepeating(FakeArcSession::Create))); base::BindRepeating(FakeArcSession::Create)));
EXPECT_TRUE(ExpandPropertyFilesForTesting(ArcSessionManager::Get(), ExpandPropertyFilesForTesting(ArcSessionManager::Get());
temp_dir_.GetPath()));
chromeos::ProfileHelper::SetAlwaysReturnPrimaryUserForTesting(true); chromeos::ProfileHelper::SetAlwaysReturnPrimaryUserForTesting(true);
} }
......
...@@ -131,8 +131,7 @@ class ArcSessionManagerTest : public MixinBasedInProcessBrowserTest { ...@@ -131,8 +131,7 @@ class ArcSessionManagerTest : public MixinBasedInProcessBrowserTest {
base::BindRepeating(FakeArcSession::Create))); base::BindRepeating(FakeArcSession::Create)));
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
EXPECT_TRUE(ExpandPropertyFilesForTesting(ArcSessionManager::Get(), ExpandPropertyFilesForTesting(ArcSessionManager::Get());
temp_dir_.GetPath()));
chromeos::ProfileHelper::SetAlwaysReturnPrimaryUserForTesting(true); chromeos::ProfileHelper::SetAlwaysReturnPrimaryUserForTesting(true);
......
...@@ -46,10 +46,8 @@ std::unique_ptr<ArcSessionManager> CreateTestArcSessionManager( ...@@ -46,10 +46,8 @@ std::unique_ptr<ArcSessionManager> CreateTestArcSessionManager(
return manager; return manager;
} }
bool ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager, void ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager) {
const base::FilePath& temp_dir) {
arc_session_manager->OnExpandPropertyFilesAndReadSaltForTesting(true); arc_session_manager->OnExpandPropertyFilesAndReadSaltForTesting(true);
return true;
} }
} // namespace arc } // namespace arc
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
#include <memory> #include <memory>
namespace base {
class FilePath;
} // namespace base
namespace arc { namespace arc {
class ArcSessionManager; class ArcSessionManager;
...@@ -25,9 +21,7 @@ std::unique_ptr<ArcSessionManager> CreateTestArcSessionManager( ...@@ -25,9 +21,7 @@ std::unique_ptr<ArcSessionManager> CreateTestArcSessionManager(
// Does something similar to CreateTestArcSessionManager(), but for an existing // Does something similar to CreateTestArcSessionManager(), but for an existing
// object. This function is useful for ARC browser_tests where ArcSessionManager // object. This function is useful for ARC browser_tests where ArcSessionManager
// object is (re)created with ArcServiceLauncher::ResetForTesting(). // object is (re)created with ArcServiceLauncher::ResetForTesting().
// TODO(yusukes): Remove |temp_dir| argument which is unused. void ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager);
bool ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager,
const base::FilePath& temp_dir);
} // namespace arc } // namespace arc
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "ash/public/cpp/test/shell_test_api.h" #include "ash/public/cpp/test/shell_test_api.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/optional.h" #include "base/optional.h"
#include "base/test/scoped_feature_list.h" #include "base/test/scoped_feature_list.h"
...@@ -593,8 +592,6 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin { ...@@ -593,8 +592,6 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin {
} }
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
ASSERT_TRUE(arc_temp_dir_.CreateUniqueTempDir());
if (params_.is_tablet) if (params_.is_tablet)
ash::ShellTestApi().SetTabletModeEnabledForTest(true); ash::ShellTestApi().SetTabletModeEnabledForTest(true);
...@@ -604,8 +601,7 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin { ...@@ -604,8 +601,7 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin {
arc::ArcSessionManager::Get()->SetArcSessionRunnerForTesting( arc::ArcSessionManager::Get()->SetArcSessionRunnerForTesting(
std::make_unique<arc::ArcSessionRunner>( std::make_unique<arc::ArcSessionRunner>(
base::BindRepeating(arc::FakeArcSession::Create))); base::BindRepeating(arc::FakeArcSession::Create)));
EXPECT_TRUE(arc::ExpandPropertyFilesForTesting( arc::ExpandPropertyFilesForTesting(arc::ArcSessionManager::Get());
arc::ArcSessionManager::Get(), arc_temp_dir_.GetPath()));
} }
} }
void TearDownInProcessBrowserTestFixture() override { void TearDownInProcessBrowserTestFixture() override {
...@@ -645,7 +641,6 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin { ...@@ -645,7 +641,6 @@ class OobeEndToEndTestSetupMixin : public InProcessBrowserTestMixin {
std::unique_ptr<ScopedTestRecommendAppsFetcherFactory> std::unique_ptr<ScopedTestRecommendAppsFetcherFactory>
recommend_apps_fetcher_factory_; recommend_apps_fetcher_factory_;
net::EmbeddedTestServer* arc_tos_server_; net::EmbeddedTestServer* arc_tos_server_;
base::ScopedTempDir arc_temp_dir_;
DISALLOW_COPY_AND_ASSIGN(OobeEndToEndTestSetupMixin); DISALLOW_COPY_AND_ASSIGN(OobeEndToEndTestSetupMixin);
}; };
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <string> #include <string>
#include "ash/public/cpp/login_screen_test_api.h" #include "ash/public/cpp/login_screen_test_api.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "chrome/browser/chromeos/arc/arc_util.h" #include "chrome/browser/chromeos/arc/arc_util.h"
...@@ -62,14 +61,11 @@ class SupervisionTransitionScreenTest ...@@ -62,14 +61,11 @@ class SupervisionTransitionScreenTest
} }
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
ASSERT_TRUE(arc_temp_dir_.CreateUniqueTempDir());
arc::ArcServiceLauncher::Get()->ResetForTesting(); arc::ArcServiceLauncher::Get()->ResetForTesting();
arc::ArcSessionManager::Get()->SetArcSessionRunnerForTesting( arc::ArcSessionManager::Get()->SetArcSessionRunnerForTesting(
std::make_unique<arc::ArcSessionRunner>( std::make_unique<arc::ArcSessionRunner>(
base::BindRepeating(arc::FakeArcSession::Create))); base::BindRepeating(arc::FakeArcSession::Create)));
EXPECT_TRUE(arc::ExpandPropertyFilesForTesting( arc::ExpandPropertyFilesForTesting(arc::ArcSessionManager::Get());
arc::ArcSessionManager::Get(), arc_temp_dir_.GetPath()));
MixinBasedInProcessBrowserTest::SetUpOnMainThread(); MixinBasedInProcessBrowserTest::SetUpOnMainThread();
// For this test class, the PRE tests just happen to always wait for active // For this test class, the PRE tests just happen to always wait for active
...@@ -98,7 +94,6 @@ class SupervisionTransitionScreenTest ...@@ -98,7 +94,6 @@ class SupervisionTransitionScreenTest
LoggedInUserMixin logged_in_user_mixin_{ LoggedInUserMixin logged_in_user_mixin_{
&mixin_host_, content::IsPreTest() ? GetParam() : GetTargetUserType(), &mixin_host_, content::IsPreTest() ? GetParam() : GetTargetUserType(),
embedded_test_server(), this, false /*should_launch_browser*/}; embedded_test_server(), this, false /*should_launch_browser*/};
base::ScopedTempDir arc_temp_dir_;
}; };
IN_PROC_BROWSER_TEST_P(SupervisionTransitionScreenTest, 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