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

Side by Side Diff: content/test/content_browser_test_utils.cc

Issue 12208057: Add explicit base to FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « content/test/content_browser_test.cc ('k') | content/test/content_test_launcher.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/content_browser_test_utils.h" 5 #include "content/test/content_browser_test_utils.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
11 #include "content/public/browser/navigation_controller.h" 11 #include "content/public/browser/navigation_controller.h"
12 #include "content/public/browser/notification_source.h" 12 #include "content/public/browser/notification_source.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/common/content_paths.h" 14 #include "content/public/common/content_paths.h"
15 #include "content/public/test/browser_test_utils.h" 15 #include "content/public/test/browser_test_utils.h"
16 #include "content/public/test/test_navigation_observer.h" 16 #include "content/public/test/test_navigation_observer.h"
17 #include "content/public/test/test_utils.h" 17 #include "content/public/test/test_utils.h"
18 #include "content/shell/shell.h" 18 #include "content/shell/shell.h"
19 #include "content/shell/shell_javascript_dialog_manager.h" 19 #include "content/shell/shell_javascript_dialog_manager.h"
20 #include "net/base/net_util.h" 20 #include "net/base/net_util.h"
21 21
22 namespace content { 22 namespace content {
23 23
24 FilePath GetTestFilePath(const char* dir, const char* file) { 24 base::FilePath GetTestFilePath(const char* dir, const char* file) {
25 FilePath path; 25 base::FilePath path;
26 PathService::Get(DIR_TEST_DATA, &path); 26 PathService::Get(DIR_TEST_DATA, &path);
27 return path.Append( 27 return path.Append(base::FilePath().AppendASCII(dir).Append(
28 FilePath().AppendASCII(dir).Append(FilePath().AppendASCII(file))); 28 base::FilePath().AppendASCII(file)));
29 } 29 }
30 30
31 GURL GetTestUrl(const char* dir, const char* file) { 31 GURL GetTestUrl(const char* dir, const char* file) {
32 return net::FilePathToFileURL(GetTestFilePath(dir, file)); 32 return net::FilePathToFileURL(GetTestFilePath(dir, file));
33 } 33 }
34 34
35 void NavigateToURLBlockUntilNavigationsComplete(Shell* window, 35 void NavigateToURLBlockUntilNavigationsComplete(Shell* window,
36 const GURL& url, 36 const GURL& url,
37 int number_of_navigations) { 37 int number_of_navigations) {
38 WaitForLoadStop(window->web_contents()); 38 WaitForLoadStop(window->web_contents());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 void ShellAddedObserver::ShellCreated(Shell* shell) { 85 void ShellAddedObserver::ShellCreated(Shell* shell) {
86 DCHECK(!shell_); 86 DCHECK(!shell_);
87 shell_ = shell; 87 shell_ = shell;
88 if (runner_) 88 if (runner_)
89 runner_->QuitClosure().Run(); 89 runner_->QuitClosure().Run();
90 } 90 }
91 91
92 } // namespace content 92 } // namespace content
OLDNEW
« no previous file with comments | « content/test/content_browser_test.cc ('k') | content/test/content_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698