OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Must import this first | 6 # Must import this first |
7 import pyauto_functional | 7 import pyauto_functional |
8 | 8 |
9 import logging | 9 import logging |
10 import os | 10 import os |
11 import sys | 11 import sys |
12 import unittest | 12 import unittest |
13 | 13 |
14 import pyauto | 14 import pyauto |
15 | 15 |
16 | 16 |
17 class BookmarksTest(pyauto.PyUITest): | 17 class BookmarksTest(pyauto.PyUITest): |
18 """Test of bookmarks.""" | 18 """Test of bookmarks.""" |
19 | 19 |
20 def setUp(self): | |
21 pyauto.PyUITest.setUp(self) | |
22 self.WaitForBookmarkModelToLoad() | |
Nirnimesh
2012/08/10 04:34:20
how was this working before?
craigdh
2012/08/10 18:08:04
I have that same question. Previously the calls ju
| |
23 | |
20 def testBasics(self): | 24 def testBasics(self): |
21 """Basic tests with an empty bookmark model.""" | 25 """Basic tests with an empty bookmark model.""" |
22 bookmarks = self.GetBookmarkModel() | 26 bookmarks = self.GetBookmarkModel() |
23 # Make sure we have the two root nodes and that they are empty | 27 # Make sure we have the two root nodes and that they are empty |
24 for node in (bookmarks.BookmarkBar(), bookmarks.Other()): | 28 for node in (bookmarks.BookmarkBar(), bookmarks.Other()): |
25 self.assertEqual(node['type'], 'folder') | 29 self.assertEqual(node['type'], 'folder') |
26 self.assertFalse(node['children']) | 30 self.assertFalse(node['children']) |
27 | 31 |
28 def testAddOneNode(self): | 32 def testAddOneNode(self): |
29 """Add a bookmark to the bar; confirm it.""" | 33 """Add a bookmark to the bar; confirm it.""" |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
693 self.assertEqual(0, len(node)) | 697 self.assertEqual(0, len(node)) |
694 # Search 'DB' in profile 1. | 698 # Search 'DB' in profile 1. |
695 self.OpenProfileWindow(path=profile2_path) | 699 self.OpenProfileWindow(path=profile2_path) |
696 bookmarks = self.GetBookmarkModel(windex=2) | 700 bookmarks = self.GetBookmarkModel(windex=2) |
697 node = bookmarks.FindByTitle('GoogleNews') | 701 node = bookmarks.FindByTitle('GoogleNews') |
698 self.assertEqual(0, len(node)) | 702 self.assertEqual(0, len(node)) |
699 | 703 |
700 | 704 |
701 if __name__ == '__main__': | 705 if __name__ == '__main__': |
702 pyauto_functional.Main() | 706 pyauto_functional.Main() |
OLD | NEW |