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

Side by Side Diff: media/tools/constrained_network_server/cns_test.py

Issue 8672007: Fix python scripts in src/media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « media/tools/constrained_network_server/cns.py ('k') | media/tools/layout_tests/bug.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/env python
2
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 4 # found in the LICENSE file.
6 5
7 """Tests for Constrained Network Server.""" 6 """Tests for Constrained Network Server."""
8 import os 7 import os
9 import signal 8 import signal
10 import subprocess 9 import subprocess
11 import tempfile 10 import tempfile
12 import time 11 import time
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 # Verify the request took longer than the requested latency. 152 # Verify the request took longer than the requested latency.
154 self.assertTrue(time.time() - now > self._LATENCY_TEST_SECS) 153 self.assertTrue(time.time() - now > self._LATENCY_TEST_SECS)
155 154
156 # Verify the server properly redirected the URL. 155 # Verify the server properly redirected the URL.
157 self.assertEquals(f.geturl(), base_url.replace( 156 self.assertEquals(f.geturl(), base_url.replace(
158 str(cns._DEFAULT_SERVING_PORT), str(cns._DEFAULT_CNS_PORT_RANGE[0]))) 157 str(cns._DEFAULT_SERVING_PORT), str(cns._DEFAULT_CNS_PORT_RANGE[0])))
159 158
160 159
161 if __name__ == '__main__': 160 if __name__ == '__main__':
162 unittest.main() 161 unittest.main()
OLDNEW
« no previous file with comments | « media/tools/constrained_network_server/cns.py ('k') | media/tools/layout_tests/bug.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698