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

Unified Diff: util/posix/process_util_test.cc

Issue 727973002: Move some parts of ProcessReader (in snapshot) to ProcessInfo (in util) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 1 month 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 | « util/posix/process_util_mac.cc ('k') | util/util.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/posix/process_util_test.cc
diff --git a/util/posix/process_util_test.cc b/util/posix/process_util_test.cc
deleted file mode 100644
index 41d4a1de32ba1f70fd367027f431e4c182b63f04..0000000000000000000000000000000000000000
--- a/util/posix/process_util_test.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 The Crashpad Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "util/posix/process_util.h"
-
-#include <crt_externs.h>
-#include <unistd.h>
-
-#include <string>
-#include <vector>
-
-#include "base/basictypes.h"
-#include "gtest/gtest.h"
-
-namespace crashpad {
-namespace test {
-namespace {
-
-TEST(ProcessUtil, ProcessArgumentsForPID) {
- std::vector<std::string> argv;
- ASSERT_TRUE(ProcessArgumentsForPID(getpid(), &argv));
-
- // gtest argv processing scrambles argv, but it leaves argc and argv[0]
- // intact, so test those.
-
- int argc = implicit_cast<int>(argv.size());
- int expect_argc = *_NSGetArgc();
- EXPECT_EQ(expect_argc, argc);
-
- ASSERT_GE(expect_argc, 1);
- ASSERT_GE(argc, 1);
-
- char** expect_argv = *_NSGetArgv();
- EXPECT_EQ(std::string(expect_argv[0]), argv[0]);
-}
-
-} // namespace
-} // namespace test
-} // namespace crashpad
« no previous file with comments | « util/posix/process_util_mac.cc ('k') | util/util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698