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

Unified Diff: sandbox/win/src/app_container_unittest.cc

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/app_container_test.cc ('k') | sandbox/win/src/broker_services.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/app_container_unittest.cc
diff --git a/sandbox/win/src/app_container_unittest.cc b/sandbox/win/src/app_container_unittest.cc
deleted file mode 100644
index 4bce16a42b5b49b1fdbfcccfd02ebddf84cedaaf..0000000000000000000000000000000000000000
--- a/sandbox/win/src/app_container_unittest.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/win/windows_version.h"
-#include "sandbox/win/src/app_container.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace sandbox {
-
-// Tests the low level AppContainer interface.
-TEST(AppContainerTest, CreateAppContainer) {
- if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
- return;
-
- const wchar_t kName[] = L"Test";
- const wchar_t kValidSid[] = L"S-1-15-2-12345-234-567-890-123-456-789";
-
- EXPECT_TRUE(LookupAppContainer(kValidSid).empty());
- EXPECT_EQ(SBOX_ERROR_GENERIC, DeleteAppContainer(kValidSid));
-
- EXPECT_EQ(SBOX_ALL_OK, CreateAppContainer(kValidSid, kName));
- EXPECT_EQ(SBOX_ERROR_GENERIC, CreateAppContainer(kValidSid, kName));
- EXPECT_EQ(kName, LookupAppContainer(kValidSid));
- EXPECT_EQ(SBOX_ALL_OK, DeleteAppContainer(kValidSid));
-
- EXPECT_TRUE(LookupAppContainer(kValidSid).empty());
- EXPECT_EQ(SBOX_ERROR_GENERIC, DeleteAppContainer(kValidSid));
-
- EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER,
- CreateAppContainer(L"Foo", kName));
-}
-
-// Tests handling of security capabilities on the attribute list.
-TEST(AppContainerTest, SecurityCapabilities) {
- if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8)
- return;
-
- scoped_ptr<AppContainerAttributes> attributes(new AppContainerAttributes);
- std::vector<base::string16> capabilities;
- EXPECT_EQ(SBOX_ERROR_INVALID_APP_CONTAINER,
- attributes->SetAppContainer(L"S-1-foo", capabilities));
-
- EXPECT_EQ(SBOX_ALL_OK,
- attributes->SetAppContainer(L"S-1-15-2-12345-234", capabilities));
- EXPECT_TRUE(attributes->HasAppContainer());
-
- attributes.reset(new AppContainerAttributes);
- capabilities.push_back(L"S-1-15-3-12345678-87654321");
- capabilities.push_back(L"S-1-15-3-1");
- capabilities.push_back(L"S-1-15-3-2");
- capabilities.push_back(L"S-1-15-3-3");
- EXPECT_EQ(SBOX_ALL_OK,
- attributes->SetAppContainer(L"S-1-15-2-1-2", capabilities));
- EXPECT_TRUE(attributes->HasAppContainer());
-}
-
-} // namespace sandbox
« no previous file with comments | « sandbox/win/src/app_container_test.cc ('k') | sandbox/win/src/broker_services.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698