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

Unified Diff: chrome/test/pyautolib/pyautolib.i

Issue 8343044: Extend swigged TestServer to expose port and sync xmpp port to python (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added ; Created 9 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyautolib.i
diff --git a/chrome/test/pyautolib/pyautolib.i b/chrome/test/pyautolib/pyautolib.i
index 958aa1a81f8249ba9f9d0b9b2770a6b21860f9e2..e135e9721035b47c88cc7d228e97267922336389 100644
--- a/chrome/test/pyautolib/pyautolib.i
+++ b/chrome/test/pyautolib/pyautolib.i
@@ -432,5 +432,23 @@ class TestServer {
%feature("docstring", "Get URL for a file path") GetURL;
GURL GetURL(const std::string& path) const;
};
+
+%extend TestServer {
+ %feature("docstring", "Get port number.") GetPort;
+ int GetPort() const {
+ int val = 0;
+ $self->server_data().GetInteger("port", &val);
+ return val;
+ }
+
+ %feature("docstring", "Get xmpp port number in case of sync server.")
+ GetSyncXmppPort;
+ int GetSyncXmppPort() const {
+ int val = 0;
+ $self->server_data().GetInteger("xmpp_port", &val);
+ return val;
+ }
+};
+
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698