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

Side by Side Diff: chrome/browser/ui/webui/web_ui_test_handler.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | chrome/browser/ui/webui/web_ui_test_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_TEST_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_WEB_UI_TEST_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_TEST_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_TEST_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "content/browser/webui/web_ui.h" 11 #include "content/browser/webui/web_ui.h"
12 #include "content/common/notification_observer.h" 12 #include "content/common/notification_observer.h"
13 13
14 // This class registers test framework specific handlers on WebUI objects. 14 // This class registers test framework specific handlers on WebUI objects.
15 class WebUITestHandler : public WebUIMessageHandler, 15 class WebUITestHandler : public WebUIMessageHandler,
16 public NotificationObserver { 16 public NotificationObserver {
17 public: 17 public:
18 // Runs a string of javascript. Returns pass fail. 18 // Runs a string of javascript. Returns pass fail.
19 bool RunJavascript(const std::string& js_test, bool is_test); 19 bool RunJavascript(const std::string& js_test, bool is_test);
20 20
21 private: 21 private:
22 // WebUIMessageHandler overrides. 22 // WebUIMessageHandler overrides.
23 // Add test handlers to the current WebUI object. 23 // Add test handlers to the current WebUI object.
24 virtual void RegisterMessages() {} 24 virtual void RegisterMessages() {}
25 25
26 // From NotificationObserver. 26 // From NotificationObserver.
27 virtual void Observe(NotificationType type, 27 virtual void Observe(int type,
28 const NotificationSource& source, 28 const NotificationSource& source,
29 const NotificationDetails& details) OVERRIDE; 29 const NotificationDetails& details) OVERRIDE;
30 30
31 // Runs a message loop until test finishes. Returns the result of the test. 31 // Runs a message loop until test finishes. Returns the result of the test.
32 bool WaitForResult(); 32 bool WaitForResult();
33 33
34 // Pass fail result of current tests. 34 // Pass fail result of current tests.
35 bool test_succeeded_; 35 bool test_succeeded_;
36 36
37 // Waiting for a test to finish. 37 // Waiting for a test to finish.
38 bool is_waiting_; 38 bool is_waiting_;
39 }; 39 };
40 40
41 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_TEST_HANDLER_H_ 41 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_TEST_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | chrome/browser/ui/webui/web_ui_test_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698