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

Unified Diff: chrome_elf/run_all_unittests.cc

Issue 2078913005: Add a chrome_elf_unittest ChromeElfLoadSanityTest which validates that loading chrome_elf does not … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove braces Created 4 years, 6 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 | « chrome_elf/elf_imports_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_elf/run_all_unittests.cc
diff --git a/chrome_elf/run_all_unittests.cc b/chrome_elf/run_all_unittests.cc
new file mode 100644
index 0000000000000000000000000000000000000000..375ddc7447b4f639dab5eadeb2f7120cfc3e62b2
--- /dev/null
+++ b/chrome_elf/run_all_unittests.cc
@@ -0,0 +1,23 @@
+// Copyright 2016 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/bind.h"
+#include "base/command_line.h"
+#include "base/test/launcher/unit_test_launcher.h"
+#include "base/test/test_suite.h"
+#include "build/build_config.h"
+
+int main(int argc, char** argv) {
+ // Ensure that the CommandLine instance honors the command line passed in
+ // instead of the default behavior on Windows which is to use the shell32
+ // CommandLineToArgvW API. The chrome_elf_unittests test suite should not
+ // depend on user32 directly or indirectly (For the curious shell32 depends
+ // on user32)
+ base::CommandLine::InitUsingArgvForTesting(argc, argv);
+ base::TestSuite test_suite(argc, argv);
+ int ret = base::LaunchUnitTests(
+ argc, argv,
+ base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
+ return ret;
+}
« no previous file with comments | « chrome_elf/elf_imports_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698