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

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: Modification based on CL review. 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') | no next file with comments »
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..f1a7cb6f9293da3b850972058497fb1aaec82b1d 100755
--- a/chrome/test/functional/chromeos_crosh.py
+++ b/chrome/test/functional/chromeos_crosh.py
@@ -7,6 +7,7 @@ import os
import pyauto_functional # must be imported before pyauto
import pyauto
+import test_utils
class CroshTest(pyauto.PyUITest):
@@ -20,12 +21,7 @@ class CroshTest(pyauto.PyUITest):
def testBasic(self):
"""Verify crosh basic flow."""
- 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())
+ test_utils.OpenCroshVerification(self)
# Verify crosh prompt.
self.WaitForHtermText(text='crosh> ',
@@ -44,6 +40,24 @@ class CroshTest(pyauto.PyUITest):
self.WaitForHtermText(text='command crosh completed with exit code 0',
msg='Could not exit crosh.')
+ def testAddBookmark(self):
+ """Test crosh URL can be bookmarked"""
+ test_utils.OpenCroshVerification(self)
+
+ # 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.assertEqual(url.spec(), node['url'])
+
if __name__ == '__main__':
pyauto_functional.Main()
« no previous file with comments | « no previous file | chrome/test/functional/chromeos_login.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698