summaryrefslogtreecommitdiffstats
path: root/chrome/test/pyautolib/pyautolib.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/pyautolib/pyautolib.cc')
-rw-r--r--chrome/test/pyautolib/pyautolib.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/test/pyautolib/pyautolib.cc b/chrome/test/pyautolib/pyautolib.cc
index 4afc72e..84bdd18 100644
--- a/chrome/test/pyautolib/pyautolib.cc
+++ b/chrome/test/pyautolib/pyautolib.cc
@@ -274,3 +274,16 @@ scoped_refptr<BrowserProxy> PyUITestBase::GetBrowserWindow(int window_index) {
return automation()->GetBrowserWindow(window_index);
}
+
+std::string PyUITestBase::_SendJSONRequest(int window_index,
+ std::string& request) {
+ scoped_refptr<BrowserProxy> browser_proxy =
+ automation()->GetBrowserWindow(window_index);
+ EXPECT_TRUE(browser_proxy.get());
+ std::string response;
+ if (browser_proxy.get()) {
+ EXPECT_TRUE(browser_proxy->SendJSONRequest(request, &response));
+ }
+ return response;
+}
+