| 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 #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/basictypes.h" | 14 #include "base/basictypes.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 "chrome/browser/history/history_service.h" | 17 #include "chrome/browser/history/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 AppModalDialog; | |
| 30 class Browser; | 29 class Browser; |
| 31 class LocationBar; | 30 class LocationBar; |
| 32 class Profile; | 31 class Profile; |
| 33 class SkBitmap; | 32 class SkBitmap; |
| 34 class TemplateURLService; | 33 class TemplateURLService; |
| 35 | 34 |
| 35 namespace app_modal { |
| 36 class AppModalDialog; |
| 37 } |
| 38 |
| 36 namespace base { | 39 namespace base { |
| 37 class FilePath; | 40 class FilePath; |
| 38 } | 41 } |
| 39 | 42 |
| 40 namespace chrome { | 43 namespace chrome { |
| 41 struct NavigateParams; | 44 struct NavigateParams; |
| 42 } | 45 } |
| 43 | 46 |
| 44 namespace content { | 47 namespace content { |
| 45 class MessageLoopRunner; | 48 class MessageLoopRunner; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Generate the URL for testing a particular test. | 123 // Generate the URL for testing a particular test. |
| 121 // HTML for the tests is all located in | 124 // HTML for the tests is all located in |
| 122 // test_root_directory/dir/<file> | 125 // test_root_directory/dir/<file> |
| 123 // The returned path is GURL format. | 126 // The returned path is GURL format. |
| 124 GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file); | 127 GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file); |
| 125 | 128 |
| 126 // 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. |
| 127 bool GetRelativeBuildDirectory(base::FilePath* build_dir); | 130 bool GetRelativeBuildDirectory(base::FilePath* build_dir); |
| 128 | 131 |
| 129 // Blocks until an application modal dialog is showns and returns it. | 132 // Blocks until an application modal dialog is showns and returns it. |
| 130 AppModalDialog* WaitForAppModalDialog(); | 133 app_modal::AppModalDialog* WaitForAppModalDialog(); |
| 131 | 134 |
| 132 // Performs a find in the page of the specified tab. Returns the number of | 135 // Performs a find in the page of the specified tab. Returns the number of |
| 133 // matches found. |ordinal| is an optional parameter which is set to the index | 136 // matches found. |ordinal| is an optional parameter which is set to the index |
| 134 // of the current match. |selection_rect| is an optional parameter which is set | 137 // of the current match. |selection_rect| is an optional parameter which is set |
| 135 // to the location of the current match. | 138 // to the location of the current match. |
| 136 int FindInPage(content::WebContents* tab, | 139 int FindInPage(content::WebContents* tab, |
| 137 const base::string16& search_string, | 140 const base::string16& search_string, |
| 138 bool forward, | 141 bool forward, |
| 139 bool case_sensitive, | 142 bool case_sensitive, |
| 140 int* ordinal, | 143 int* ordinal, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 std::vector<GURL> urls_; | 293 std::vector<GURL> urls_; |
| 291 | 294 |
| 292 base::CancelableTaskTracker tracker_; | 295 base::CancelableTaskTracker tracker_; |
| 293 | 296 |
| 294 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator); | 297 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator); |
| 295 }; | 298 }; |
| 296 | 299 |
| 297 } // namespace ui_test_utils | 300 } // namespace ui_test_utils |
| 298 | 301 |
| 299 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 302 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| OLD | NEW |