summaryrefslogtreecommitdiffstats
path: root/chrome/test/pyautolib
diff options
context:
space:
mode:
authorbungeman@gmail.com <bungeman@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-11 19:50:04 +0000
committerbungeman@gmail.com <bungeman@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-11 19:50:04 +0000
commitd964ab3dc471d1be3fb2d20709e4117dbe6aa9e0 (patch)
treec3893a013d74a47df6a0fdb3c8d4939b55a6d878 /chrome/test/pyautolib
parent35699d5751a0ab13626927fd6a8e55e18ca1006b (diff)
downloadchromium_src-d964ab3dc471d1be3fb2d20709e4117dbe6aa9e0.zip
chromium_src-d964ab3dc471d1be3fb2d20709e4117dbe6aa9e0.tar.gz
chromium_src-d964ab3dc471d1be3fb2d20709e4117dbe6aa9e0.tar.bz2
Fix build break in pyautolib with gcc >= 4.5.
BUG=79710 See related issue http://code.google.com/p/chromium/issues/detail?id=49533 . Review URL: http://codereview.chromium.org/6877001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85018 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib')
-rw-r--r--chrome/test/pyautolib/pyauto.py5
-rw-r--r--chrome/test/pyautolib/pyautolib.cc2
2 files changed, 5 insertions, 2 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 488b47b..f57462d 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -580,7 +580,10 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
This is a snapshot of the bookmark model; it is not a proxy and
does not get updated as the bookmark model changes.
"""
- return bookmark_model.BookmarkModel(self._GetBookmarksAsJSON())
+ bookmarks_as_json = self._GetBookmarksAsJSON()
+ if bookmarks_as_json == None:
+ raise JSONInterfaceError('Could not resolve browser proxy.')
+ return bookmark_model.BookmarkModel(bookmarks_as_json)
def GetDownloadsInfo(self, windex=0):
"""Return info about downloads.
diff --git a/chrome/test/pyautolib/pyautolib.cc b/chrome/test/pyautolib/pyautolib.cc
index 95ac964..814c820 100644
--- a/chrome/test/pyautolib/pyautolib.cc
+++ b/chrome/test/pyautolib/pyautolib.cc
@@ -244,7 +244,7 @@ std::string PyUITestBase::_GetBookmarksAsJSON() {
automation()->GetBrowserWindow(0); // Window doesn't matter.
EXPECT_TRUE(browser_proxy.get());
if (!browser_proxy.get())
- return false;
+ return NULL;
std::string s;
EXPECT_TRUE(browser_proxy->GetBookmarksAsJSON(&s));