| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 EXPECT_TRUE(base::PathExists(src_file_path)); | 429 EXPECT_TRUE(base::PathExists(src_file_path)); |
| 430 EXPECT_TRUE(base::ContentsEqual(src_file_path, crx_path)); | 430 EXPECT_TRUE(base::ContentsEqual(src_file_path, crx_path)); |
| 431 | 431 |
| 432 CheckAppDataAndCache(id, expected_app_name, | 432 CheckAppDataAndCache(id, expected_app_name, |
| 433 expected_required_platform_version); | 433 expected_required_platform_version); |
| 434 } | 434 } |
| 435 | 435 |
| 436 // Copies the given file into temp dir and returns the full path | 436 // Copies the given file into temp dir and returns the full path |
| 437 // of the copied file. | 437 // of the copied file. |
| 438 base::FilePath CopyFileToTempDir(const base::FilePath& file) { | 438 base::FilePath CopyFileToTempDir(const base::FilePath& file) { |
| 439 base::FilePath target_file = temp_dir_.path().Append(file.BaseName()); | 439 base::FilePath target_file = temp_dir_.GetPath().Append(file.BaseName()); |
| 440 CHECK(base::CopyFile(file, target_file)); | 440 CHECK(base::CopyFile(file, target_file)); |
| 441 return target_file; | 441 return target_file; |
| 442 } | 442 } |
| 443 | 443 |
| 444 KioskAppData* GetAppDataMutable(const std::string& app_id) { | 444 KioskAppData* GetAppDataMutable(const std::string& app_id) { |
| 445 return manager()->GetAppDataMutable(app_id); | 445 return manager()->GetAppDataMutable(app_id); |
| 446 } | 446 } |
| 447 | 447 |
| 448 KioskAppManager* manager() const { return KioskAppManager::Get(); } | 448 KioskAppManager* manager() const { return KioskAppManager::Get(); } |
| 449 FakeCWS* fake_cws() { return fake_cws_.get(); } | 449 FakeCWS* fake_cws() { return fake_cws_.get(); } |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 MakeKioskApp("App Name", "1.0", kNoneAutoLaucnhedAppId, | 938 MakeKioskApp("App Name", "1.0", kNoneAutoLaucnhedAppId, |
| 939 kTestCases[i].required_platform_version); | 939 kTestCases[i].required_platform_version); |
| 940 EXPECT_TRUE(manager()->IsPlatformCompliantWithApp(app.get())) | 940 EXPECT_TRUE(manager()->IsPlatformCompliantWithApp(app.get())) |
| 941 << "Test case for non auto launch app: " << i | 941 << "Test case for non auto launch app: " << i |
| 942 << ", required_platform_version=" | 942 << ", required_platform_version=" |
| 943 << kTestCases[i].required_platform_version; | 943 << kTestCases[i].required_platform_version; |
| 944 } | 944 } |
| 945 } | 945 } |
| 946 | 946 |
| 947 } // namespace chromeos | 947 } // namespace chromeos |
| OLD | NEW |