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

Side by Side Diff: content/shell/browser/layout_test/layout_test_browser_main.cc

Issue 2316043002: //content: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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
« no previous file with comments | « content/public/test/test_launcher.cc ('k') | content/test/test_blink_web_unit_test_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/browser/layout_test/layout_test_browser_main.h" 5 #include "content/shell/browser/layout_test/layout_test_browser_main.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 } // namespace 110 } // namespace
111 111
112 // Main routine for running as the Browser process. 112 // Main routine for running as the Browser process.
113 int LayoutTestBrowserMain( 113 int LayoutTestBrowserMain(
114 const content::MainFunctionParams& parameters, 114 const content::MainFunctionParams& parameters,
115 const std::unique_ptr<content::BrowserMainRunner>& main_runner) { 115 const std::unique_ptr<content::BrowserMainRunner>& main_runner) {
116 base::ScopedTempDir browser_context_path_for_layout_tests; 116 base::ScopedTempDir browser_context_path_for_layout_tests;
117 117
118 CHECK(browser_context_path_for_layout_tests.CreateUniqueTempDir()); 118 CHECK(browser_context_path_for_layout_tests.CreateUniqueTempDir());
119 CHECK(!browser_context_path_for_layout_tests.path().MaybeAsASCII().empty()); 119 CHECK(
120 !browser_context_path_for_layout_tests.GetPath().MaybeAsASCII().empty());
120 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 121 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
121 switches::kContentShellDataPath, 122 switches::kContentShellDataPath,
122 browser_context_path_for_layout_tests.path().MaybeAsASCII()); 123 browser_context_path_for_layout_tests.GetPath().MaybeAsASCII());
123 124
124 #if defined(OS_ANDROID) 125 #if defined(OS_ANDROID)
125 content::EnsureInitializeForAndroidLayoutTests(); 126 content::EnsureInitializeForAndroidLayoutTests();
126 #endif 127 #endif
127 128
128 int exit_code = main_runner->Initialize(parameters); 129 int exit_code = main_runner->Initialize(parameters);
129 DCHECK_LT(exit_code, 0) 130 DCHECK_LT(exit_code, 0)
130 << "BrowserMainRunner::Initialize failed in LayoutTestBrowserMain"; 131 << "BrowserMainRunner::Initialize failed in LayoutTestBrowserMain";
131 132
132 if (exit_code >= 0) 133 if (exit_code >= 0)
(...skipping 11 matching lines...) Expand all
144 145
145 exit_code = RunTests(main_runner); 146 exit_code = RunTests(main_runner);
146 base::RunLoop().RunUntilIdle(); 147 base::RunLoop().RunUntilIdle();
147 148
148 #if !defined(OS_ANDROID) 149 #if !defined(OS_ANDROID)
149 main_runner->Shutdown(); 150 main_runner->Shutdown();
150 #endif 151 #endif
151 152
152 return exit_code; 153 return exit_code;
153 } 154 }
OLDNEW
« no previous file with comments | « content/public/test/test_launcher.cc ('k') | content/test/test_blink_web_unit_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698