Skip to content

Commit

Permalink
arc: Simplify property expansion for browser tests
Browse files Browse the repository at this point in the history
Since we're going to move the logic to arc-setup soon, browser
tests won't really do the expansion. Instead, we should simply
mark it "done".

BUG=chromium:1163122
TEST=try

Change-Id: Ie27ca7ac73e593bdd8ca42bb367a0807ababbf15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612496
Reviewed-by: Yury Khmel <khmel@chromium.org>
Commit-Queue: Yusuke Sato <yusukes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840951}
  • Loading branch information
yusukes authored and Chromium LUCI CQ committed Jan 7, 2021
1 parent 74ee693 commit 730c658
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
11 changes: 1 addition & 10 deletions chrome/browser/chromeos/arc/test/test_arc_session_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,7 @@ std::unique_ptr<ArcSessionManager> CreateTestArcSessionManager(

bool ExpandPropertyFilesForTesting(ArcSessionManager* arc_session_manager,
const base::FilePath& temp_dir) {
// For browser_tests, do the actual prop file expansion to make it more
// similar to production. Calling ExpandPropertyFiles() here is fine as long
// as the caller doesn't explicitly call ArcServiceLauncher::Initialize()
// after recreating ASM with ArcServiceLauncher::ResetForTesting().
base::FilePath source_dir, dest_dir;
if (!CreateFilesAndDirectories(temp_dir, &source_dir, &dest_dir))
return false;
arc_session_manager->set_property_files_source_dir_for_testing(source_dir);
arc_session_manager->set_property_files_dest_dir_for_testing(dest_dir);
arc_session_manager->ExpandPropertyFilesAndReadSalt();
arc_session_manager->OnExpandPropertyFilesAndReadSaltForTesting(true);
return true;
}

Expand Down
5 changes: 2 additions & 3 deletions chrome/browser/chromeos/arc/test/test_arc_session_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ 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(). This
// function automatically starts prop files expansion and it succeeds as long as
// |temp_dir| is writable.
// 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);

Expand Down

0 comments on commit 730c658

Please sign in to comment.