| 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/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" | |
| 16 #include "content/public/test/test_navigation_observer.h" | 15 #include "content/public/test/test_navigation_observer.h" |
| 16 #include "content/public/test/test_utils.h" |
| 17 #include "content/shell/shell.h" | 17 #include "content/shell/shell.h" |
| 18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 | 21 |
| 22 FilePath GetTestFilePath(const char* dir, const char* file) { | 22 FilePath GetTestFilePath(const char* dir, const char* file) { |
| 23 FilePath path; | 23 FilePath path; |
| 24 PathService::Get(DIR_TEST_DATA, &path); | 24 PathService::Get(DIR_TEST_DATA, &path); |
| 25 return path.Append( | 25 return path.Append( |
| 26 FilePath().AppendASCII(dir).Append(FilePath().AppendASCII(file))); | 26 FilePath().AppendASCII(dir).Append(FilePath().AppendASCII(file))); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 window->LoadURL(url); | 40 window->LoadURL(url); |
| 41 | 41 |
| 42 base::RunLoop run_loop; | 42 base::RunLoop run_loop; |
| 43 same_tab_observer.WaitForObservation( | 43 same_tab_observer.WaitForObservation( |
| 44 base::Bind(&RunThisRunLoop, base::Unretained(&run_loop)), | 44 base::Bind(&RunThisRunLoop, base::Unretained(&run_loop)), |
| 45 GetQuitTaskForRunLoop(&run_loop)); | 45 GetQuitTaskForRunLoop(&run_loop)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace content | 48 } // namespace content |
| OLD | NEW |