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

Unified Diff: tools/goopdump/process_commandline_unittest.cc

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 | « tools/goopdump/process_commandline.cc ('k') | tools/goopdump/process_monitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/goopdump/process_commandline_unittest.cc
diff --git a/tools/goopdump/process_commandline_unittest.cc b/tools/goopdump/process_commandline_unittest.cc
deleted file mode 100644
index e605d38a7d1e972e4c47f525f4946160bd5eec3d..0000000000000000000000000000000000000000
--- a/tools/goopdump/process_commandline_unittest.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2008-2009 Google Inc.
-//
-// 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 "omaha/tools/goopdump/process_commandline.h"
-
-#include "omaha/common/scoped_any.h"
-#include "omaha/common/system.h"
-#include "omaha/testing/unit_test.h"
-
-namespace omaha {
-
-TEST(GoopdumpProcessCommandLineTest, TestRunNotepad) {
- // TODO(omaha): Can we use Process::GetCommandLine() instead of
- // GetProcessCommandLine? Should be safer than injecting a thread and can
- // be used in coverage builds.
-#ifdef COVERAGE_ENABLED
- std::wcout << _T("\tTest does not run in coverage builds because the ")
- << _T("instrumentation of InjectFunction results in references ")
- << _T("to invalid memory locations in Notepad.exe.")
- << std::endl;
-#else
- TCHAR notepad_path[MAX_PATH] = {0};
- TCHAR system_directory[MAX_PATH] = {0};
- ::GetSystemDirectory(system_directory, arraysize(system_directory));
- _stprintf_s(notepad_path,
- arraysize(notepad_path),
- _T("%s\\notepad.exe %s\\loadfix.com"),
- system_directory, system_directory);
-
- PROCESS_INFORMATION pi = {0};
- EXPECT_SUCCEEDED(System::StartProcess(NULL, notepad_path, &pi));
- ::CloseHandle(pi.hThread);
- scoped_process process_handle(pi.hProcess);
-
- CString command_line;
- EXPECT_SUCCEEDED(GetProcessCommandLine(pi.dwProcessId, &command_line));
-
- ::TerminateProcess(get(process_handle), 0);
-
- EXPECT_STREQ(notepad_path, command_line);
-#endif
-}
-
-} // namespace omaha
-
« no previous file with comments | « tools/goopdump/process_commandline.cc ('k') | tools/goopdump/process_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698