Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: sandbox/win/src/app_container_unittest.cc

Issue 119713003: Add base:: to string16s in sandbox/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/app_container_test.cc ('k') | sandbox/win/src/broker_services.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/win/windows_version.h" 5 #include "base/win/windows_version.h"
6 #include "sandbox/win/src/app_container.h" 6 #include "sandbox/win/src/app_container.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace sandbox { 9 namespace sandbox {
10 10
(...skipping 19 matching lines...) Expand all
30 EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER, 30 EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER,
31 CreateAppContainer(L"Foo", kName)); 31 CreateAppContainer(L"Foo", kName));
32 } 32 }
33 33
34 // Tests handling of security capabilities on the attribute list. 34 // Tests handling of security capabilities on the attribute list.
35 TEST(AppContainerTest, SecurityCapabilities) { 35 TEST(AppContainerTest, SecurityCapabilities) {
36 if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8) 36 if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
37 return; 37 return;
38 38
39 scoped_ptr<AppContainerAttributes> attributes(new AppContainerAttributes); 39 scoped_ptr<AppContainerAttributes> attributes(new AppContainerAttributes);
40 std::vector<string16> capabilities; 40 std::vector<base::string16> capabilities;
41 EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER, 41 EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER,
42 attributes->SetAppContainer(L"S-1-foo", capabilities)); 42 attributes->SetAppContainer(L"S-1-foo", capabilities));
43 43
44 EXPECT_EQ(SBOX_ALL_OK, 44 EXPECT_EQ(SBOX_ALL_OK,
45 attributes->SetAppContainer(L"S-1-15-2-12345-234", capabilities)); 45 attributes->SetAppContainer(L"S-1-15-2-12345-234", capabilities));
46 EXPECT_TRUE(attributes->HasAppContainer()); 46 EXPECT_TRUE(attributes->HasAppContainer());
47 47
48 attributes.reset(new AppContainerAttributes); 48 attributes.reset(new AppContainerAttributes);
49 capabilities.push_back(L"S-1-15-3-12345678-87654321"); 49 capabilities.push_back(L"S-1-15-3-12345678-87654321");
50 capabilities.push_back(L"S-1-15-3-1"); 50 capabilities.push_back(L"S-1-15-3-1");
51 capabilities.push_back(L"S-1-15-3-2"); 51 capabilities.push_back(L"S-1-15-3-2");
52 capabilities.push_back(L"S-1-15-3-3"); 52 capabilities.push_back(L"S-1-15-3-3");
53 EXPECT_EQ(SBOX_ALL_OK, 53 EXPECT_EQ(SBOX_ALL_OK,
54 attributes->SetAppContainer(L"S-1-15-2-1-2", capabilities)); 54 attributes->SetAppContainer(L"S-1-15-2-1-2", capabilities));
55 EXPECT_TRUE(attributes->HasAppContainer()); 55 EXPECT_TRUE(attributes->HasAppContainer());
56 } 56 }
57 57
58 } // namespace sandbox 58 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/app_container_test.cc ('k') | sandbox/win/src/broker_services.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698