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

Unified Diff: third_party/grpc/src/php/tests/unit_tests/ServerTest.php

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/grpc/src/php/tests/unit_tests/ServerTest.php
diff --git a/third_party/WebKit/public/platform/WebDoublePoint.h b/third_party/grpc/src/php/tests/unit_tests/ServerTest.php
similarity index 65%
copy from third_party/WebKit/public/platform/WebDoublePoint.h
copy to third_party/grpc/src/php/tests/unit_tests/ServerTest.php
index d666e13379a0d23e55f6525c7c49c6c271ace9f8..cde6a9a8f7d4d168302622fc3e0c1ceaaff7f398 100644
--- a/third_party/WebKit/public/platform/WebDoublePoint.h
+++ b/third_party/grpc/src/php/tests/unit_tests/ServerTest.php
@@ -1,5 +1,8 @@
+<?php
/*
- * Copyright 2014 Google Inc. All rights reserved.
+ *
+ * Copyright 2015-2016, 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,60 +29,43 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
*/
-#ifndef WebDoublePoint_h
-#define WebDoublePoint_h
-
-#include "WebCommon.h"
-
-#if INSIDE_BLINK
-#include "platform/geometry/DoublePoint.h"
-#endif
-
-namespace blink {
-
-struct WebDoublePoint {
- double x;
- double y;
-
- WebDoublePoint()
- : x(0.0)
- , y(0.0)
+class ServerTest extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
{
}
- WebDoublePoint(double x, double y)
- : x(x)
- , y(y)
+ public function tearDown()
{
}
-#if INSIDE_BLINK
- WebDoublePoint(const DoublePoint& p)
- : x(p.x())
- , y(p.y())
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidConstructor()
{
+ $server = new Grpc\Server('invalid_host');
}
- operator DoublePoint() const
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidAddHttp2Port()
{
- return DoublePoint(x, y);
+ $this->server = new Grpc\Server([]);
+ $this->port = $this->server->addHttp2Port(['0.0.0.0:0']);
}
-#endif
-};
-
-inline bool operator==(const WebDoublePoint& a, const WebDoublePoint& b)
-{
- return a.x == b.x && a.y == b.y;
-}
-
-inline bool operator!=(const WebDoublePoint& a, const WebDoublePoint& b)
-{
- return !(a == b);
-}
-
-} // namespace blink
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidAddSecureHttp2Port()
+ {
+ $this->server = new Grpc\Server([]);
+ $this->port = $this->server->addSecureHttp2Port(['0.0.0.0:0']);
+ }
-#endif
+}

Powered by Google App Engine
This is Rietveld 408576698