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

Unified Diff: chrome/test/functional/chromeos_crosh.py

Issue 10778006: Adding HTML Terminal test case: 1. TestAddBookmark, 2. Login as guest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed a ling Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/functional/chromeos_login.py » ('j') | chrome/test/functional/chromeos_login.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/chromeos_crosh.py
diff --git a/chrome/test/functional/chromeos_crosh.py b/chrome/test/functional/chromeos_crosh.py
index 31dcc21e50368792e6ba935157934e725bc8c08c..c81a9d07f720bebd79ddb488476c41f0c2e5321b 100755
--- a/chrome/test/functional/chromeos_crosh.py
+++ b/chrome/test/functional/chromeos_crosh.py
@@ -44,6 +44,29 @@ class CroshTest(pyauto.PyUITest):
self.WaitForHtermText(text='command crosh completed with exit code 0',
msg='Could not exit crosh.')
+ def testAddBookmark(self):
+ """Test bookmark crosh."""
Nirnimesh 2012/07/25 07:03:45 Make this better. It's not clear what the test is.
tturchetto 2012/07/26 22:44:28 Done.
+ self.assertEqual(0, self.GetBrowserWindowCount())
+ self.OpenCrosh()
+ self.assertEqual(1, self.GetBrowserWindowCount())
+ self.assertEqual(1, self.GetTabCount(),
+ msg='Could not open crosh')
+ self.assertEqual('crosh', self.GetActiveTabTitle())
Nirnimesh 2012/07/25 07:03:45 49-54 is the same as 23-28. Refactor to a separate
tturchetto 2012/07/26 22:44:28 Done.
+
+ # Add bookmark.
+ bookmarks = self.GetBookmarkModel()
+ bar_id = bookmarks.BookmarkBar()['id']
+ name = 'crosh'
+ url = self.GetActiveTabURL()
+ count = bookmarks.NodeCount()
+ self.AddBookmarkURL(bar_id, 0, name, url.spec())
+ bookmarks = self.GetBookmarkModel()
+ node = bookmarks.BookmarkBar()['children'][0]
+ self.assertEqual(count + 1, bookmarks.NodeCount())
+ self.assertEqual(node['type'], 'url')
+ self.assertEqual(node['name'], name)
+ self.assertTrue(url.spec() in node['url'])
Nirnimesh 2012/07/25 07:03:45 use assertEqual
tturchetto 2012/07/26 22:44:28 I am verifying condition, therefore assertTrue?
+
if __name__ == '__main__':
pyauto_functional.Main()
« no previous file with comments | « no previous file | chrome/test/functional/chromeos_login.py » ('j') | chrome/test/functional/chromeos_login.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698