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

Side by Side Diff: chrome/test/pyautolib/bookmark_model.py

Issue 8680018: Fix python scripts in src/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2
3 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 3 # found in the LICENSE file.
6 4
7 """BookmarkModel: python representation of the bookmark model. 5 """BookmarkModel: python representation of the bookmark model.
8 6
9 Obtain one of these from PyUITestSuite::GetBookmarkModel() call. 7 Obtain one of these from PyUITestSuite::GetBookmarkModel() call.
10 """ 8 """
11 9
12 import os 10 import os
13 import simplejson as json 11 import simplejson as json
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 # their kids. 90 # their kids.
93 results = [] 91 results = []
94 for node in nodes: 92 for node in nodes:
95 node_title = node.get('title', None) or node.get('name', None) 93 node_title = node.get('title', None) or node.get('name', None)
96 if title == node_title: 94 if title == node_title:
97 results.append(node) 95 results.append(node)
98 # Note we check everything; unlike the FindByID, we do not stop early. 96 # Note we check everything; unlike the FindByID, we do not stop early.
99 for child in node.get('children', []): 97 for child in node.get('children', []):
100 results += self.FindByTitle(title, [child]) 98 results += self.FindByTitle(title, [child])
101 return results 99 return results
OLDNEW
« no previous file with comments | « chrome/test/nacl_test_injection/buildbot_nacl_integration.py ('k') | chrome/test/pyautolib/chrome_driver_factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698