| Index: third_party/grpc/src/python/grpcio/tests/unit/framework/interfaces/base/_state.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost.py b/third_party/grpc/src/python/grpcio/tests/unit/framework/interfaces/base/_state.py
|
| similarity index 58%
|
| copy from third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost.py
|
| copy to third_party/grpc/src/python/grpcio/tests/unit/framework/interfaces/base/_state.py
|
| index e3bbe7c6d2295b9c7d2a466df9b75e4c195f3bd0..21cf33aeb6aa67c4c39ab1b4b7c2212620dc80b0 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost.py
|
| +++ b/third_party/grpc/src/python/grpcio/tests/unit/framework/interfaces/base/_state.py
|
| @@ -1,4 +1,5 @@
|
| -# Copyright (c) 2011 Google Inc. All rights reserved.
|
| +# Copyright 2015, Google Inc.
|
| +# All rights reserved.
|
| #
|
| # Redistribution and use in source and binary forms, with or without
|
| # modification, are permitted provided that the following conditions are
|
| @@ -26,34 +27,29 @@
|
| # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -import os
|
| -import platform
|
| -import sys
|
| -
|
| -from webkitpy.common.system import environment, executive, filesystem, platforminfo, user, workspace
|
| -
|
| -
|
| -class SystemHost(object):
|
| -
|
| - def __init__(self):
|
| - self.executable = sys.executable
|
| - self.executive = executive.Executive()
|
| - self.filesystem = filesystem.FileSystem()
|
| - self.user = user.User()
|
| - self.platform = platforminfo.PlatformInfo(sys, platform, self.filesystem, self.executive)
|
| - self.workspace = workspace.Workspace(self.filesystem, self.executive)
|
| - self.stdin = sys.stdin
|
| - self.stdout = sys.stdout
|
| - self.stderr = sys.stderr
|
| -
|
| - def copy_current_environment(self):
|
| - return environment.Environment(os.environ.copy())
|
| -
|
| - def print_(self, *args, **kwargs):
|
| - sep = kwargs.get('sep', ' ')
|
| - end = kwargs.get('end', '\n')
|
| - stream = kwargs.get('stream', self.stdout)
|
| - stream.write(sep.join([str(arg) for arg in args]) + end)
|
| -
|
| - def exit(self, returncode):
|
| - sys.exit(returncode)
|
| +"""Part of the tests of the base interface of RPC Framework."""
|
| +
|
| +
|
| +class OperationState(object):
|
| +
|
| + def __init__(self):
|
| + self.invocation_initial_metadata_in_flight = None
|
| + self.invocation_initial_metadata_received = False
|
| + self.invocation_payloads_in_flight = []
|
| + self.invocation_payloads_received = 0
|
| + self.invocation_completion_in_flight = None
|
| + self.invocation_completion_received = False
|
| + self.service_initial_metadata_in_flight = None
|
| + self.service_initial_metadata_received = False
|
| + self.service_payloads_in_flight = []
|
| + self.service_payloads_received = 0
|
| + self.service_completion_in_flight = None
|
| + self.service_completion_received = False
|
| + self.invocation_side_invocation_allowance = 1
|
| + self.invocation_side_service_allowance = 1
|
| + self.service_side_invocation_allowance = 1
|
| + self.service_side_service_allowance = 1
|
| + self.invocation_allowance_in_flight = 0
|
| + self.service_allowance_in_flight = 0
|
| + self.invocation_side_outcome = None
|
| + self.service_side_outcome = None
|
|
|