OLD | NEW |
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/public/test/content_browser_test_utils.h" | 5 #include "content/public/test/content_browser_test_utils.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/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/browser/shell.h" | 18 #include "content/shell/browser/shell.h" |
19 #include "content/shell/browser/shell_javascript_dialog_manager.h" | 19 #include "content/shell/browser/shell_javascript_dialog_manager.h" |
20 #include "net/base/net_util.h" | 20 #include "net/base/filename_util.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 | 23 |
24 base::FilePath GetTestFilePath(const char* dir, const char* file) { | 24 base::FilePath GetTestFilePath(const char* dir, const char* file) { |
25 base::FilePath path; | 25 base::FilePath path; |
26 PathService::Get(DIR_TEST_DATA, &path); | 26 PathService::Get(DIR_TEST_DATA, &path); |
27 return path.Append(base::FilePath().AppendASCII(dir).Append( | 27 return path.Append(base::FilePath().AppendASCII(dir).Append( |
28 base::FilePath().AppendASCII(file))); | 28 base::FilePath().AppendASCII(file))); |
29 } | 29 } |
30 | 30 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 void ShellAddedObserver::ShellCreated(Shell* shell) { | 78 void ShellAddedObserver::ShellCreated(Shell* shell) { |
79 DCHECK(!shell_); | 79 DCHECK(!shell_); |
80 shell_ = shell; | 80 shell_ = shell; |
81 if (runner_.get()) | 81 if (runner_.get()) |
82 runner_->QuitClosure().Run(); | 82 runner_->QuitClosure().Run(); |
83 } | 83 } |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
OLD | NEW |