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

Side by Side Diff: chrome/common/extensions/docs/server2/test_branch_utility.py

Issue 12996003: Dynamically generate a heading for Extension Docs API pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments - Patch currently being broken up Created 7 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # 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
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from branch_utility import BranchUtility 5 from branch_utility import BranchUtility, ChannelInfo
6 6
7 class TestBranchUtility(object): 7 class TestBranchUtility(object):
8 '''Mimics BranchUtility to return valid-ish data without needing omahaproxy 8 '''Mimics BranchUtility to return valid-ish data without needing omahaproxy
9 data. 9 data.
10 ''' 10 '''
11 def GetBranchForChannel(self, channel_name): 11 def GetAllChannelInfo(self):
12 return channel_name 12 return [self.GetChannelInfo(channel)
13 for channel in BranchUtility.GetAllChannelNames()]
14
15 def GetChannelInfo(self, channel):
16 return ChannelInfo(channel,
17 'fakebranch-%s' % channel,
18 'fakeversion-%s' % channel)
19
20 def GetBranchForVersion(self, version):
21 return 'fakebranch-%s' % version
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698