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

Side by Side Diff: mojo/python/tests/messaging_unittest.py

Issue 643853004: mojo: Update PRESBUMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « mojo/python/tests/bindings_structs_unittest.py ('k') | mojo/python/tests/mojo_unittest.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 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 unittest 5 import unittest
6 6
7 import mojo_unittest 7 import mojo_unittest
8 from mojo.bindings import messaging
8 9
9 # pylint: disable=F0401 10 # pylint: disable=E0611
10 from mojo.bindings import messaging
11 from mojo import system 11 from mojo import system
12 12
13 13
14 class _ForwardingConnectionErrorHandler(messaging.ConnectionErrorHandler): 14 class _ForwardingConnectionErrorHandler(messaging.ConnectionErrorHandler):
15 15
16 def __init__(self, callback): 16 def __init__(self, callback):
17 messaging.ConnectionErrorHandler.__init__(self)
17 self._callback = callback 18 self._callback = callback
18 19
19 def OnError(self, result): 20 def OnError(self, result):
20 self._callback(result) 21 self._callback(result)
21 22
22 23
23 class ConnectorTest(mojo_unittest.MojoTestCase): 24 class ConnectorTest(mojo_unittest.MojoTestCase):
24 25
25 def setUp(self): 26 def setUp(self):
26 super(ConnectorTest, self).setUp() 27 super(ConnectorTest, self).setUp()
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 self.assertNotEquals(message_header.request_id, 0) 198 self.assertNotEquals(message_header.request_id, 0)
198 response_header_data = messaging.MessageHeader( 199 response_header_data = messaging.MessageHeader(
199 0, 200 0,
200 messaging.MESSAGE_IS_RESPONSE_FLAG, 201 messaging.MESSAGE_IS_RESPONSE_FLAG,
201 message_header.request_id).Serialize() 202 message_header.request_id).Serialize()
202 self.handle.WriteMessage(response_header_data) 203 self.handle.WriteMessage(response_header_data)
203 self.loop.RunUntilIdle() 204 self.loop.RunUntilIdle()
204 self.assertFalse(self.received_errors) 205 self.assertFalse(self.received_errors)
205 self.assertEquals(len(back_messages), 1) 206 self.assertEquals(len(back_messages), 1)
206 self.assertEquals(back_messages[0].data, response_header_data) 207 self.assertEquals(back_messages[0].data, response_header_data)
OLDNEW
« no previous file with comments | « mojo/python/tests/bindings_structs_unittest.py ('k') | mojo/python/tests/mojo_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698