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

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

Issue 2300323003: Adding performance tests for HQP that represent importance of optimising HistoryItemsForTerms method (Closed)
Patch Set: Created 4 years, 3 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
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 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_ 5 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_
6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "components/history/core/browser/history_service.h" 17 #include "components/history/core/browser/history_service.h"
18 #include "content/public/browser/notification_details.h" 18 #include "content/public/browser/notification_details.h"
19 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
21 #include "content/public/browser/notification_source.h" 21 #include "content/public/browser/notification_source.h"
22 #include "content/public/test/test_utils.h" 22 #include "content/public/test/test_utils.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 #include "ui/base/window_open_disposition.h" 24 #include "ui/base/window_open_disposition.h"
25 #include "ui/events/keycodes/keyboard_codes.h" 25 #include "ui/events/keycodes/keyboard_codes.h"
26 #include "ui/gfx/native_widget_types.h" 26 #include "ui/gfx/native_widget_types.h"
27 #include "url/gurl.h" 27 #include "url/gurl.h"
28 28
29 class AutocompleteController;
29 class Browser; 30 class Browser;
30 class LocationBar; 31 class LocationBar;
31 class Profile; 32 class Profile;
32 33
33 namespace app_modal { 34 namespace app_modal {
34 class AppModalDialog; 35 class AppModalDialog;
35 } 36 }
36 37
37 namespace base { 38 namespace base {
38 class FilePath; 39 class FilePath;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // test_root_directory/dir/<file> 125 // test_root_directory/dir/<file>
125 // The returned path is GURL format. 126 // The returned path is GURL format.
126 GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file); 127 GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file);
127 128
128 // Generate the path of the build directory, relative to the source root. 129 // Generate the path of the build directory, relative to the source root.
129 bool GetRelativeBuildDirectory(base::FilePath* build_dir); 130 bool GetRelativeBuildDirectory(base::FilePath* build_dir);
130 131
131 // Blocks until an application modal dialog is showns and returns it. 132 // Blocks until an application modal dialog is showns and returns it.
132 app_modal::AppModalDialog* WaitForAppModalDialog(); 133 app_modal::AppModalDialog* WaitForAppModalDialog();
133 134
135 // Waits for |autocomplete_controller| to stop, i.e. waits
136 // NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY.
137 void WaitForAutocompleteController(
138 const AutocompleteController& autocomplete_controller);
139
134 // Performs a find in the page of the specified tab. Returns the number of 140 // Performs a find in the page of the specified tab. Returns the number of
135 // matches found. |ordinal| is an optional parameter which is set to the index 141 // matches found. |ordinal| is an optional parameter which is set to the index
136 // of the current match. |selection_rect| is an optional parameter which is set 142 // of the current match. |selection_rect| is an optional parameter which is set
137 // to the location of the current match. 143 // to the location of the current match.
138 int FindInPage(content::WebContents* tab, 144 int FindInPage(content::WebContents* tab,
139 const base::string16& search_string, 145 const base::string16& search_string,
140 bool forward, 146 bool forward,
141 bool case_sensitive, 147 bool case_sensitive,
142 int* ordinal, 148 int* ordinal,
143 gfx::Rect* selection_rect); 149 gfx::Rect* selection_rect);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 std::vector<GURL> urls_; 289 std::vector<GURL> urls_;
284 290
285 base::CancelableTaskTracker tracker_; 291 base::CancelableTaskTracker tracker_;
286 292
287 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator); 293 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator);
288 }; 294 };
289 295
290 } // namespace ui_test_utils 296 } // namespace ui_test_utils
291 297
292 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ 298 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698