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

Unified Diff: chrome/common/extensions/docs/server2/document_renderer_test.py

Issue 216943006: Remove ReferenceResolver dependency in APIDataSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ReferenceResolver.Factory Created 6 years, 9 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/document_renderer_test.py
diff --git a/chrome/common/extensions/docs/server2/document_renderer_test.py b/chrome/common/extensions/docs/server2/document_renderer_test.py
index 757f4722691fc72db448960c662bca2a80062fb3..b79aec948570f43260704221965e74e54c7846bf 100755
--- a/chrome/common/extensions/docs/server2/document_renderer_test.py
+++ b/chrome/common/extensions/docs/server2/document_renderer_test.py
@@ -116,14 +116,15 @@ class DocumentRendererUnittest(unittest.TestCase):
self.assertEqual(['Expected a title'], warnings)
def testInvalidRef(self):
- # There needs to be more than 100 characters between the invalid ref
- # and the next ref
+ # DocumentRenderer attempts to detect unclosed $(ref:...) tags by limiting
+ # how far it looks ahead. Lorem Ipsum should be long enough to trigger that.
not at google - send to devlin 2014/03/28 23:31:36 I actually meant to iclude lorem ipsum here, sorry
ahernandez 2014/03/28 23:34:18 You just want it as a variable at the top of the t
document = ('An invalid $(ref:foo.foo_t3 a title with some long '
- 'text containing a valid reference pointing to '
+ 'text containing a valid reference pointing to a thing called '
'$(ref:baz.baz_e1) here')
expected_document = ('An invalid $(ref:foo.foo_t3 a title with some long '
- 'text containing a valid reference pointing to <a'
- ' href=#type-baz_e1>baz.baz_e1</a> here')
+ 'text containing a valid reference pointing to a '
+ 'thing called <a href=#type-baz_e1>baz.baz_e1</a> '
+ 'here')
path = 'some/path/to/document_api.html'
text, warnings = self._renderer.Render(document, path)

Powered by Google App Engine
This is Rietveld 408576698