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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/test_branch_utility.py
diff --git a/chrome/common/extensions/docs/server2/test_branch_utility.py b/chrome/common/extensions/docs/server2/test_branch_utility.py
index 1c365a56869fe64d5538bf619c64fc0207b4e3a6..aaabdcac36886148ec84f1909c8b078433c06501 100644
--- a/chrome/common/extensions/docs/server2/test_branch_utility.py
+++ b/chrome/common/extensions/docs/server2/test_branch_utility.py
@@ -2,11 +2,20 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from branch_utility import BranchUtility
+from branch_utility import BranchUtility, ChannelInfo
class TestBranchUtility(object):
'''Mimics BranchUtility to return valid-ish data without needing omahaproxy
data.
'''
- def GetBranchForChannel(self, channel_name):
- return channel_name
+ def GetAllChannelInfo(self):
+ return [self.GetChannelInfo(channel)
+ for channel in BranchUtility.GetAllChannelNames()]
+
+ def GetChannelInfo(self, channel):
+ return ChannelInfo(channel,
+ 'fakebranch-%s' % channel,
+ 'fakeversion-%s' % channel)
+
+ def GetBranchForVersion(self, version):
+ return 'fakebranch-%s' % version

Powered by Google App Engine
This is Rietveld 408576698