| Index: blimp/engine/app/blimp_engine_config_unittest.cc
|
| diff --git a/blimp/engine/app/blimp_engine_config_unittest.cc b/blimp/engine/app/blimp_engine_config_unittest.cc
|
| index d4afec281b4c78fb24962a95ab344bcae254536d..cc3968d12d5d2ed5300487bcbe1507394237f5ef 100644
|
| --- a/blimp/engine/app/blimp_engine_config_unittest.cc
|
| +++ b/blimp/engine/app/blimp_engine_config_unittest.cc
|
| @@ -12,14 +12,14 @@
|
| #include "base/files/file_util.h"
|
| #include "base/files/scoped_temp_dir.h"
|
| #include "base/strings/stringprintf.h"
|
| -#include "blimp/engine/app/switches.h"
|
| +#include "blimp/common/fake_commandline.h"
|
| +#include "blimp/common/switches.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace blimp {
|
| namespace engine {
|
| namespace {
|
|
|
| -// Reference client token.
|
| static const char kTestClientToken[] = "Reference client token";
|
|
|
| class BlimpEngineConfigTest : public testing::Test {
|
| @@ -31,39 +31,6 @@ class BlimpEngineConfigTest : public testing::Test {
|
| ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
|
| CreateFileForSwitch(kClientTokenPath, kTestClientToken);
|
| }
|
| -
|
| - // Creates a file in the temp directory for a given filepath switch.
|
| - void CreateFileForSwitch(const std::string& filepath_switch,
|
| - const std::string& data) const {
|
| - ASSERT_TRUE(base::WriteFile(GetFilepathForSwitch(filepath_switch),
|
| - data.c_str(), data.size()));
|
| - }
|
| -
|
| - // Removes the associated file for a given filepath switch.
|
| - void RemoveFileForSwitch(const std::string& filepath_switch) const {
|
| - base::DeleteFile(GetFilepathForSwitch(filepath_switch), false);
|
| - }
|
| -
|
| - // Creates and returns a CommandLine object with specified filepath switches.
|
| - base::CommandLine CreateCommandLine(
|
| - const std::vector<std::string>& filepath_switches) {
|
| - base::CommandLine::StringVector cmd_vec = {"dummy_program"};
|
| - for (const std::string& filepath_switch : filepath_switches) {
|
| - cmd_vec.push_back(base::StringPrintf(
|
| - "--%s=%s", filepath_switch.c_str(),
|
| - GetFilepathForSwitch(filepath_switch).AsUTF8Unsafe().c_str()));
|
| - }
|
| - return base::CommandLine(cmd_vec);
|
| - }
|
| -
|
| - base::FilePath GetFilepathForSwitch(
|
| - const std::string& filepath_switch) const {
|
| - return temp_dir_.path().Append(filepath_switch);
|
| - }
|
| -
|
| - const std::vector<std::string> all_filepath_switches_ = {kClientTokenPath};
|
| -
|
| - base::ScopedTempDir temp_dir_;
|
| };
|
|
|
| TEST_F(BlimpEngineConfigTest, ClientTokenCorrect) {
|
|
|