| Index: chrome/common/extensions/docs/server2/integration_test.py
|
| diff --git a/chrome/common/extensions/docs/server2/integration_test.py b/chrome/common/extensions/docs/server2/integration_test.py
|
| index 2ed80f33d1c1558614e6fcf458555314987abba8..35e35c6e2f8fc2c87b1a492be379a85469335111 100755
|
| --- a/chrome/common/extensions/docs/server2/integration_test.py
|
| +++ b/chrome/common/extensions/docs/server2/integration_test.py
|
| @@ -8,7 +8,6 @@
|
| import build_server
|
| build_server.main()
|
|
|
| -import logging
|
| import optparse
|
| import os
|
| import sys
|
| @@ -17,6 +16,7 @@ import unittest
|
|
|
| from local_renderer import LocalRenderer
|
| from fake_fetchers import ConfigureFakeFetchers
|
| +from find_broken_links import CreateProcessor, FindBrokenLinks
|
| from handler import Handler
|
| from servlet import Request
|
| from test_util import EnableLogging, DisableLogging
|
| @@ -61,6 +61,26 @@ class IntegrationTest(unittest.TestCase):
|
| finally:
|
| print('Took %s seconds' % (time.time() - start_time))
|
|
|
| + print "Checking for broken links..."
|
| + failures = []
|
| + def writer(*args):
|
| + # Print out and keep track of links that failed.
|
| + for arg in args:
|
| + print arg,
|
| + print
|
| + failures.append(args)
|
| +
|
| + def renderer(path):
|
| + return Handler(Request.ForTest(path)).Get()
|
| +
|
| + start_time = time.time()
|
| + FindBrokenLinks(
|
| + CreateProcessor(renderer),
|
| + ('/extensions/index.html', '/apps/about_apps.html'), writer=writer)
|
| +
|
| + print 'Finding %d broken links took %s seconds' % (
|
| + len(failures), time.time() - start_time)
|
| +
|
| public_files = _GetPublicFiles()
|
|
|
| print('Rendering %s public files...' % len(public_files.keys()))
|
|
|