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

Unified Diff: chrome/common/extensions/docs/server2/intro_data_source_test.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: Moving logic into availability_data_source Created 7 years, 8 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/intro_data_source_test.py
diff --git a/chrome/common/extensions/docs/server2/intro_data_source_test.py b/chrome/common/extensions/docs/server2/intro_data_source_test.py
index 90f2c76de4c146147104d2176c17b6d2c475e42b..7e7b122104c42153c28af676ac9df54e9a19e632 100755
--- a/chrome/common/extensions/docs/server2/intro_data_source_test.py
+++ b/chrome/common/extensions/docs/server2/intro_data_source_test.py
@@ -8,8 +8,13 @@ import svn_constants
from test_file_system import TestFileSystem
import unittest
-_TEST_DATA = TestFileSystem.MoveTo(svn_constants.INTRO_PATH, {
- 'test.html': '<h1>hello</h1>world<h2>first</h2><h3>inner</h3><h2>second</h2>'
+_TEST_DATA = TestFileSystem.MoveTo(svn_constants.TEMPLATE_PATH, {
+ 'intros': {
+ 'test.html': '<h1>hello</h1>you<h2>first</h2><h3>inner</h3><h2>second</h2>'
+ },
+ 'json': {
+ 'api_availabilities.json': '[{ "name" : "test", "availability" : "none" }]'
+ }
})
class IntroDataSourceTest(unittest.TestCase):
@@ -27,7 +32,7 @@ class IntroDataSourceTest(unittest.TestCase):
{'subheadings': [], 'link': '', 'title': u'second'}]
self.assertEqual(expected_toc, data['apps_toc'])
self.assertEqual(expected_toc, data['extensions_toc'])
- self.assertEqual('world<h2>first</h2><h3>inner</h3><h2>second</h2>',
+ self.assertEqual('you<h2>first</h2><h3>inner</h3><h2>second</h2>',
data['intro'].render().text)
if __name__ == '__main__':

Powered by Google App Engine
This is Rietveld 408576698