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

Unified Diff: chrome/browser/ui/webui/web_ui_test_handler.h

Issue 7146024: Use ExecuteJavascriptInWebFrameNotifyResult to return results even in error condition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't check against |this| in the destructor, which doesn't compile on Win. Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/web_ui_browsertest.cc ('k') | chrome/browser/ui/webui/web_ui_test_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/web_ui_test_handler.h
diff --git a/chrome/browser/ui/webui/web_ui_test_handler.h b/chrome/browser/ui/webui/web_ui_test_handler.h
index b0135d2c93a9d7c5bde5ab3700c970a0bcdf1c6c..304f6d4e91bb281c7087a6b78eea7a066ed678ab 100644
--- a/chrome/browser/ui/webui/web_ui_test_handler.h
+++ b/chrome/browser/ui/webui/web_ui_test_handler.h
@@ -2,31 +2,32 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_WEBUI_WEB_UI_HANDLER_BROWSERTEST_H_
-#define CONTENT_BROWSER_WEBUI_WEB_UI_HANDLER_BROWSERTEST_H_
+#ifndef CHROME_BROWSER_UI_WEBUI_WEB_UI_TEST_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_WEB_UI_TEST_HANDLER_H_
#pragma once
#include <string>
#include "content/browser/webui/web_ui.h"
+#include "content/common/notification_observer.h"
// This class registers test framework specific handlers on WebUI objects.
-class WebUITestHandler : public WebUIMessageHandler {
+class WebUITestHandler : public WebUIMessageHandler,
+ public NotificationObserver {
public:
// Runs a string of javascript. Returns pass fail.
bool RunJavascript(const std::string& js_test, bool is_test);
- protected:
- // WebUI handlers which deliver results to any waiting message loops.
- // |args| is currently ignored.
- void HandlePass(const ListValue* args);
- void HandleFail(const ListValue* args);
-
+ private:
// WebUIMessageHandler overrides.
// Add test handlers to the current WebUI object.
- virtual void RegisterMessages();
+ virtual void RegisterMessages() {}
+
+ // From NotificationObserver.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
- private:
// Runs a message loop until test finishes. Returns the result of the test.
bool WaitForResult();
@@ -37,4 +38,4 @@ class WebUITestHandler : public WebUIMessageHandler {
bool is_waiting_;
};
-#endif // CONTENT_BROWSER_WEBUI_WEB_UI_HANDLER_BROWSERTEST_H_
+#endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_TEST_HANDLER_H_
« no previous file with comments | « chrome/browser/ui/webui/web_ui_browsertest.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