OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 base::MakeUnique<syncer::SyncErrorFactoryMock>()); | 1414 base::MakeUnique<syncer::SyncErrorFactoryMock>()); |
1415 | 1415 |
1416 const base::FilePath base_path = | 1416 const base::FilePath base_path = |
1417 data_dir().AppendASCII("permissions_increase"); | 1417 data_dir().AppendASCII("permissions_increase"); |
1418 const base::FilePath pem_path = base_path.AppendASCII("permissions.pem"); | 1418 const base::FilePath pem_path = base_path.AppendASCII("permissions.pem"); |
1419 const base::FilePath path_v1 = base_path.AppendASCII("v1"); | 1419 const base::FilePath path_v1 = base_path.AppendASCII("v1"); |
1420 const base::FilePath path_v2 = base_path.AppendASCII("v2"); | 1420 const base::FilePath path_v2 = base_path.AppendASCII("v2"); |
1421 | 1421 |
1422 base::ScopedTempDir crx_dir; | 1422 base::ScopedTempDir crx_dir; |
1423 ASSERT_TRUE(crx_dir.CreateUniqueTempDir()); | 1423 ASSERT_TRUE(crx_dir.CreateUniqueTempDir()); |
1424 const base::FilePath crx_path_v1 = crx_dir.path().AppendASCII("temp1.crx"); | 1424 const base::FilePath crx_path_v1 = crx_dir.GetPath().AppendASCII("temp1.crx"); |
1425 PackCRX(path_v1, pem_path, crx_path_v1); | 1425 PackCRX(path_v1, pem_path, crx_path_v1); |
1426 const base::FilePath crx_path_v2 = crx_dir.path().AppendASCII("temp2.crx"); | 1426 const base::FilePath crx_path_v2 = crx_dir.GetPath().AppendASCII("temp2.crx"); |
1427 PackCRX(path_v2, pem_path, crx_path_v2); | 1427 PackCRX(path_v2, pem_path, crx_path_v2); |
1428 | 1428 |
1429 const std::string v1("1"); | 1429 const std::string v1("1"); |
1430 const std::string v2("2"); | 1430 const std::string v2("2"); |
1431 | 1431 |
1432 const ExtensionPrefs* prefs = ExtensionPrefs::Get(profile()); | 1432 const ExtensionPrefs* prefs = ExtensionPrefs::Get(profile()); |
1433 | 1433 |
1434 struct TestCase { | 1434 struct TestCase { |
1435 const char* name; // For failure output only. | 1435 const char* name; // For failure output only. |
1436 const std::string& sync_version; // The version coming in from Sync. | 1436 const std::string& sync_version; // The version coming in from Sync. |
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 break; | 2510 break; |
2511 } | 2511 } |
2512 } | 2512 } |
2513 } | 2513 } |
2514 EXPECT_TRUE(found_delete); | 2514 EXPECT_TRUE(found_delete); |
2515 | 2515 |
2516 // Make sure there is one extension, and there are no more apps. | 2516 // Make sure there is one extension, and there are no more apps. |
2517 EXPECT_EQ(1u, extensions_processor.data().size()); | 2517 EXPECT_EQ(1u, extensions_processor.data().size()); |
2518 EXPECT_TRUE(apps_processor.data().empty()); | 2518 EXPECT_TRUE(apps_processor.data().empty()); |
2519 } | 2519 } |
OLD | NEW |