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

Side by Side Diff: tools/android/loading/trace_test/webserver_unittest.py

Issue 1708143002: tools/android/loading Fix import issues in webserver unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moreOrphans
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import socket 6 import socket
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 _SRC_DIR = os.path.abspath(os.path.join( 10 _SRC_DIR = os.path.abspath(os.path.join(
11 os.path.dirname(__file__), '..', '..', '..')) 11 os.path.dirname(__file__), '..', '..', '..', '..'))
12 sys.path.append(os.path.join(_SRC_DIR, 'tools', 'android', 'loading')) 12 sys.path.append(os.path.join(_SRC_DIR, 'tools', 'android', 'loading'))
13 13
14 import options 14 import options
15 from trace_test import webserver_test 15 from trace_test import webserver_test
16 16
17 17
18 OPTIONS = options.OPTIONS 18 OPTIONS = options.OPTIONS
19 19
20 20
21 class TracingTrackTestCase(unittest.TestCase): 21 class TracingTrackTestCase(unittest.TestCase):
(...skipping 19 matching lines...) Expand all
41 41
42 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 42 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
43 sock.connect((host, int(port))) 43 sock.connect((host, int(port)))
44 sock.sendall('GET test.html HTTP/1.1\n\n') 44 sock.sendall('GET test.html HTTP/1.1\n\n')
45 data = sock.recv(4096) 45 data = sock.recv(4096)
46 print '%%% ' + data 46 print '%%% ' + data
47 self.assertTrue('HTTP/1.0 200 OK' in data) 47 self.assertTrue('HTTP/1.0 200 OK' in data)
48 48
49 sock.close() 49 sock.close()
50 self.assertTrue(server.Stop()) 50 self.assertTrue(server.Stop())
51
52
53 if __name__ == '__main__':
54 unittest.main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698