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

Unified Diff: mojo/python/tests/async_wait_unittest.py

Issue 675563002: Remove mojo/python and gyp targets (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/python/system/mojo/embedder.pyx ('k') | mojo/python/tests/bindings_constants_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/python/tests/async_wait_unittest.py
diff --git a/mojo/python/tests/async_wait_unittest.py b/mojo/python/tests/async_wait_unittest.py
deleted file mode 100644
index 71b7e75c84dd3262ec414c5975a3e8f1312e78d1..0000000000000000000000000000000000000000
--- a/mojo/python/tests/async_wait_unittest.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import mojo_unittest
-
-# pylint: disable=E0611
-from mojo import system
-
-
-class AsyncWaitTest(mojo_unittest.MojoTestCase):
-
- def setUp(self):
- super(AsyncWaitTest, self).setUp()
- self.array = []
- self.handles = system.MessagePipe()
- self.cancel = self.handles.handle0.AsyncWait(system.HANDLE_SIGNAL_READABLE,
- system.DEADLINE_INDEFINITE,
- self._OnResult)
-
- def tearDown(self):
- self.cancel()
- self.handles = None
- self.array = None
- super(AsyncWaitTest, self).tearDown()
-
- def _OnResult(self, value):
- self.array.append(value)
-
- def _WriteToHandle(self):
- self.handles.handle1.WriteMessage()
-
- def _PostWriteAndRun(self):
- self.loop.PostDelayedTask(self._WriteToHandle, 0)
- self.loop.RunUntilIdle()
-
- def testAsyncWait(self):
- self._PostWriteAndRun()
- self.assertEquals(len(self.array), 1)
- self.assertEquals(system.RESULT_OK, self.array[0])
-
- def testAsyncWaitCancel(self):
- self.loop.PostDelayedTask(self.cancel, 0)
- self._PostWriteAndRun()
- self.assertEquals(len(self.array), 0)
-
- def testAsyncWaitImmediateCancel(self):
- self.cancel()
- self._PostWriteAndRun()
- self.assertEquals(len(self.array), 0)
« no previous file with comments | « mojo/python/system/mojo/embedder.pyx ('k') | mojo/python/tests/bindings_constants_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698