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

Side by Side Diff: blimp/test/blimp_test_launcher.cc

Issue 1929723002: [Blimp] Adds blimp engine browser test framework and LoadUrl test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <memory>
6
7 #include "base/bind.h"
8 #include "base/macros.h"
9 #include "base/sys_info.h"
10 #include "blimp/engine/app/blimp_content_main_delegate.h"
11 #include "content/public/test/content_test_suite_base.h"
12 #include "content/public/test/test_launcher.h"
13 #include "testing/gtest/include/gtest/gtest.h"
14
15 namespace blimp {
16 namespace {
17
18 class BlimpTestLauncherDelegate : public content::TestLauncherDelegate {
19 public:
20 BlimpTestLauncherDelegate() {}
21 ~BlimpTestLauncherDelegate() override {}
22
23 // content::TestLauncherDelegate implementation.
24 int RunTestSuite(int argc, char** argv) override {
25 return base::TestSuite(argc, argv).Run();
26 }
27
28 bool AdjustChildProcessCommandLine(
29 base::CommandLine* command_line,
30 const base::FilePath& temp_data_dir) override {
31 return true;
32 }
33
34 protected:
35 content::ContentMainDelegate* CreateContentMainDelegate() override {
36 return new engine::BlimpContentMainDelegate();
37 }
38
39 private:
40 DISALLOW_COPY_AND_ASSIGN(BlimpTestLauncherDelegate);
41 };
42
43 } // namespace
44 } // namespace blimp
45
46 int main(int argc, char** argv) {
47 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2);
48 blimp::BlimpTestLauncherDelegate launcher_delegate;
49 return LaunchTests(&launcher_delegate, default_jobs, argc, argv);
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698