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_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 public content::JsInjectionReadyObserver { | 45 public content::JsInjectionReadyObserver { |
46 public: | 46 public: |
47 typedef ScopedVector<const base::Value> ConstValueVector; | 47 typedef ScopedVector<const base::Value> ConstValueVector; |
48 virtual ~WebUIBrowserTest(); | 48 virtual ~WebUIBrowserTest(); |
49 | 49 |
50 // Add a custom helper JS library for your test. | 50 // Add a custom helper JS library for your test. |
51 // If a relative path is specified, it'll be read | 51 // If a relative path is specified, it'll be read |
52 // as relative to the test data dir. | 52 // as relative to the test data dir. |
53 void AddLibrary(const FilePath& library_path); | 53 void AddLibrary(const FilePath& library_path); |
54 | 54 |
55 // Add a helper JS library from a path relative to base::DIR_SOURCE_ROOT. | |
56 void AddLibraryFromPath(const FilePath& path); | |
scr
2013/01/04 19:02:55
As James said, change from member to anonymous nam
aboxhall
2013/01/04 22:26:51
Done.
| |
57 | |
55 // Runs a javascript function in the context of all libraries. | 58 // Runs a javascript function in the context of all libraries. |
56 // Note that calls to functions in test_api.js are not supported. | 59 // Note that calls to functions in test_api.js are not supported. |
57 // Takes ownership of Value* arguments. | 60 // Takes ownership of Value* arguments. |
58 bool RunJavascriptFunction(const std::string& function_name); | 61 bool RunJavascriptFunction(const std::string& function_name); |
59 bool RunJavascriptFunction(const std::string& function_name, | 62 bool RunJavascriptFunction(const std::string& function_name, |
60 base::Value* arg); | 63 base::Value* arg); |
61 bool RunJavascriptFunction(const std::string& function_name, | 64 bool RunJavascriptFunction(const std::string& function_name, |
62 base::Value* arg1, | 65 base::Value* arg1, |
63 base::Value* arg2); | 66 base::Value* arg2); |
64 bool RunJavascriptFunction(const std::string& function_name, | 67 bool RunJavascriptFunction(const std::string& function_name, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 // PreloadJavascriptLibraries(). | 197 // PreloadJavascriptLibraries(). |
195 std::string preload_test_fixture_; | 198 std::string preload_test_fixture_; |
196 std::string preload_test_name_; | 199 std::string preload_test_name_; |
197 | 200 |
198 // When this is non-NULL, this is The WebUI instance used for testing. | 201 // When this is non-NULL, this is The WebUI instance used for testing. |
199 // Otherwise the selected tab's web_ui is used. | 202 // Otherwise the selected tab's web_ui is used. |
200 content::WebUI* override_selected_web_ui_; | 203 content::WebUI* override_selected_web_ui_; |
201 }; | 204 }; |
202 | 205 |
203 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ | 206 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_BROWSERTEST_H_ |
OLD | NEW |