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

Side by Side Diff: chrome/test/base/ui_test_utils.cc

Issue 395783002: [DevTools] Move DevToolsWindow testing code to a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: includes Created 6 years, 5 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
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 "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
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"
32 #include "chrome/browser/extensions/extension_action.h" 31 #include "chrome/browser/extensions/extension_action.h"
33 #include "chrome/browser/history/history_service_factory.h" 32 #include "chrome/browser/history/history_service_factory.h"
34 #include "chrome/browser/profiles/profile.h" 33 #include "chrome/browser/profiles/profile.h"
35 #include "chrome/browser/search_engines/template_url_service_test_util.h" 34 #include "chrome/browser/search_engines/template_url_service_test_util.h"
36 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" 35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
37 #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"
38 #include "chrome/browser/ui/browser.h" 37 #include "chrome/browser/ui/browser.h"
39 #include "chrome/browser/ui/browser_commands.h" 38 #include "chrome/browser/ui/browser_commands.h"
40 #include "chrome/browser/ui/browser_finder.h" 39 #include "chrome/browser/ui/browser_finder.h"
41 #include "chrome/browser/ui/browser_iterator.h" 40 #include "chrome/browser/ui/browser_iterator.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 const GURL& url, 261 const GURL& url,
263 int number_of_navigations) { 262 int number_of_navigations) {
264 NavigateToURLWithDispositionBlockUntilNavigationsComplete( 263 NavigateToURLWithDispositionBlockUntilNavigationsComplete(
265 browser, 264 browser,
266 url, 265 url,
267 number_of_navigations, 266 number_of_navigations,
268 CURRENT_TAB, 267 CURRENT_TAB,
269 BROWSER_TEST_WAIT_FOR_NAVIGATION); 268 BROWSER_TEST_WAIT_FOR_NAVIGATION);
270 } 269 }
271 270
272 void WaitUntilDevToolsWindowLoaded(DevToolsWindow* window) {
273 scoped_refptr<content::MessageLoopRunner> runner =
274 new content::MessageLoopRunner;
275 window->SetLoadCompletedCallback(runner->QuitClosure());
276 runner->Run();
277 }
278
279 base::FilePath GetTestFilePath(const base::FilePath& dir, 271 base::FilePath GetTestFilePath(const base::FilePath& dir,
280 const base::FilePath& file) { 272 const base::FilePath& file) {
281 base::FilePath path; 273 base::FilePath path;
282 PathService::Get(chrome::DIR_TEST_DATA, &path); 274 PathService::Get(chrome::DIR_TEST_DATA, &path);
283 return path.Append(dir).Append(file); 275 return path.Append(dir).Append(file);
284 } 276 }
285 277
286 GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file) { 278 GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file) {
287 return net::FilePathToFileURL(GetTestFilePath(dir, file)); 279 return net::FilePathToFileURL(GetTestFilePath(dir, file));
288 } 280 }
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 576
585 void HistoryEnumerator::HistoryQueryComplete( 577 void HistoryEnumerator::HistoryQueryComplete(
586 const base::Closure& quit_task, 578 const base::Closure& quit_task,
587 history::QueryResults* results) { 579 history::QueryResults* results) {
588 for (size_t i = 0; i < results->size(); ++i) 580 for (size_t i = 0; i < results->size(); ++i)
589 urls_.push_back((*results)[i].url()); 581 urls_.push_back((*results)[i].url());
590 quit_task.Run(); 582 quit_task.Run();
591 } 583 }
592 584
593 } // namespace ui_test_utils 585 } // namespace ui_test_utils
OLDNEW
« chrome/browser/devtools/devtools_window_testing.h ('K') | « chrome/test/base/ui_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698