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 "chrome/test/base/ui_test_utils.h" | 5 #include "chrome/test/base/ui_test_utils.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/prefs/pref_service.h" | 21 #include "base/prefs/pref_service.h" |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
24 #include "base/test/test_timeouts.h" | 24 #include "base/test/test_timeouts.h" |
25 #include "base/time/time.h" | 25 #include "base/time/time.h" |
26 #include "base/values.h" | 26 #include "base/values.h" |
27 #include "chrome/browser/autocomplete/autocomplete_controller.h" | 27 #include "chrome/browser/autocomplete/autocomplete_controller.h" |
28 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 28 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
29 #include "chrome/browser/browser_process.h" | 29 #include "chrome/browser/browser_process.h" |
30 #include "chrome/browser/chrome_notification_types.h" | 30 #include "chrome/browser/chrome_notification_types.h" |
| 31 #include "chrome/browser/devtools/devtools_window.h" |
31 #include "chrome/browser/extensions/extension_action.h" | 32 #include "chrome/browser/extensions/extension_action.h" |
32 #include "chrome/browser/history/history_service_factory.h" | 33 #include "chrome/browser/history/history_service_factory.h" |
33 #include "chrome/browser/profiles/profile.h" | 34 #include "chrome/browser/profiles/profile.h" |
34 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" | 35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" |
35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" | 36 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" |
36 #include "chrome/browser/ui/browser.h" | 37 #include "chrome/browser/ui/browser.h" |
37 #include "chrome/browser/ui/browser_commands.h" | 38 #include "chrome/browser/ui/browser_commands.h" |
38 #include "chrome/browser/ui/browser_finder.h" | 39 #include "chrome/browser/ui/browser_finder.h" |
39 #include "chrome/browser/ui/browser_iterator.h" | 40 #include "chrome/browser/ui/browser_iterator.h" |
40 #include "chrome/browser/ui/browser_list.h" | 41 #include "chrome/browser/ui/browser_list.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 const GURL& url, | 261 const GURL& url, |
261 int number_of_navigations) { | 262 int number_of_navigations) { |
262 NavigateToURLWithDispositionBlockUntilNavigationsComplete( | 263 NavigateToURLWithDispositionBlockUntilNavigationsComplete( |
263 browser, | 264 browser, |
264 url, | 265 url, |
265 number_of_navigations, | 266 number_of_navigations, |
266 CURRENT_TAB, | 267 CURRENT_TAB, |
267 BROWSER_TEST_WAIT_FOR_NAVIGATION); | 268 BROWSER_TEST_WAIT_FOR_NAVIGATION); |
268 } | 269 } |
269 | 270 |
| 271 void WaitUntilDevToolsWindowLoaded(DevToolsWindow* window) { |
| 272 scoped_refptr<content::MessageLoopRunner> runner = |
| 273 new content::MessageLoopRunner; |
| 274 window->SetLoadCompletedCallback(runner->QuitClosure()); |
| 275 runner->Run(); |
| 276 } |
| 277 |
270 base::FilePath GetTestFilePath(const base::FilePath& dir, | 278 base::FilePath GetTestFilePath(const base::FilePath& dir, |
271 const base::FilePath& file) { | 279 const base::FilePath& file) { |
272 base::FilePath path; | 280 base::FilePath path; |
273 PathService::Get(chrome::DIR_TEST_DATA, &path); | 281 PathService::Get(chrome::DIR_TEST_DATA, &path); |
274 return path.Append(dir).Append(file); | 282 return path.Append(dir).Append(file); |
275 } | 283 } |
276 | 284 |
277 GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file) { | 285 GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file) { |
278 return net::FilePathToFileURL(GetTestFilePath(dir, file)); | 286 return net::FilePathToFileURL(GetTestFilePath(dir, file)); |
279 } | 287 } |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 | 583 |
576 void HistoryEnumerator::HistoryQueryComplete( | 584 void HistoryEnumerator::HistoryQueryComplete( |
577 const base::Closure& quit_task, | 585 const base::Closure& quit_task, |
578 history::QueryResults* results) { | 586 history::QueryResults* results) { |
579 for (size_t i = 0; i < results->size(); ++i) | 587 for (size_t i = 0; i < results->size(); ++i) |
580 urls_.push_back((*results)[i].url()); | 588 urls_.push_back((*results)[i].url()); |
581 quit_task.Run(); | 589 quit_task.Run(); |
582 } | 590 } |
583 | 591 |
584 } // namespace ui_test_utils | 592 } // namespace ui_test_utils |
OLD | NEW |