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

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

Issue 2034393004: Allow multiple logging::LogMessage{Handler,Listener}s Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WEB_UI_BROWSER_TEST_H_ 5 #ifndef CHROME_TEST_BASE_WEB_UI_BROWSER_TEST_H_
6 #define CHROME_TEST_BASE_WEB_UI_BROWSER_TEST_H_ 6 #define CHROME_TEST_BASE_WEB_UI_BROWSER_TEST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "chrome/test/base/in_process_browser_test.h" 12 #include "chrome/test/base/in_process_browser_test.h"
13 #include "chrome/test/base/javascript_browser_test.h" 13 #include "chrome/test/base/javascript_browser_test.h"
14 14
15 namespace base { 15 namespace base {
16 class Value; 16 class Value;
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 class RenderViewHost; 20 class RenderViewHost;
21 class WebUI; 21 class WebUI;
22 class WebUIMessageHandler; 22 class WebUIMessageHandler;
23 } 23 }
24 24
25 class TestChromeWebUIControllerFactory; 25 class TestChromeWebUIControllerFactory;
26 class WebUITestHandler; 26 class WebUITestHandler;
27 27
28 class WebUILogMessageListener : logging::LogMessageListener {
29 public:
30 void OnMessage(int severity,
31 const char* file,
32 int line,
33 size_t message_start,
34 const std::string& str) override;
35 };
36
28 // The runner of WebUI javascript based tests. 37 // The runner of WebUI javascript based tests.
29 // See chrome/test/data/webui/test_api.js for the javascript side test API's. 38 // See chrome/test/data/webui/test_api.js for the javascript side test API's.
30 // 39 //
31 // These tests should follow the form given in: 40 // These tests should follow the form given in:
32 // chrome/test/data/webui/sample_downloads.js. 41 // chrome/test/data/webui/sample_downloads.js.
33 // and the lone test within this class. 42 // and the lone test within this class.
34 class WebUIBrowserTest : public JavaScriptBrowserTest { 43 class WebUIBrowserTest : public JavaScriptBrowserTest {
35 public: 44 public:
36 ~WebUIBrowserTest() override; 45 ~WebUIBrowserTest() override;
37 46
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Saves the states of |test_fixture| and |test_name| for calling 155 // Saves the states of |test_fixture| and |test_name| for calling
147 // PreloadJavascriptLibraries(). 156 // PreloadJavascriptLibraries().
148 std::string preload_test_fixture_; 157 std::string preload_test_fixture_;
149 std::string preload_test_name_; 158 std::string preload_test_name_;
150 159
151 // When this is non-NULL, this is The WebUI instance used for testing. 160 // When this is non-NULL, this is The WebUI instance used for testing.
152 // Otherwise the selected tab's web_ui is used. 161 // Otherwise the selected tab's web_ui is used.
153 content::WebUI* override_selected_web_ui_; 162 content::WebUI* override_selected_web_ui_;
154 163
155 std::unique_ptr<TestChromeWebUIControllerFactory> test_factory_; 164 std::unique_ptr<TestChromeWebUIControllerFactory> test_factory_;
165
166 WebUILogMessageListener log_listener_;
156 }; 167 };
157 168
158 #endif // CHROME_TEST_BASE_WEB_UI_BROWSER_TEST_H_ 169 #endif // CHROME_TEST_BASE_WEB_UI_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc ('k') | chrome/test/base/web_ui_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698