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

Unified Diff: third_party/grpc/src/php/tests/unit_tests/ChannelCredentialsTest.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/ChannelCredentialsTest.php
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriterBase.h b/third_party/grpc/src/php/tests/unit_tests/ChannelCredentialsTest.php
similarity index 61%
copy from third_party/WebKit/Source/modules/filesystem/FileWriterBase.h
copy to third_party/grpc/src/php/tests/unit_tests/ChannelCredentialsTest.php
index 89d97d98121bc0ea996a5dda9d1c8f5923a9c6cf..6d472dc8762c47bb237ca21eedaa1d23573e29a2 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileWriterBase.h
+++ b/third_party/grpc/src/php/tests/unit_tests/ChannelCredentialsTest.php
@@ -1,5 +1,8 @@
+<?php
/*
- * Copyright (C) 2010 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,61 +29,45 @@
* 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 FileWriterBase_h
-#define FileWriterBase_h
-
-#include "platform/heap/Handle.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
-
-namespace blink {
-
-class WebFileWriter;
-
-class FileWriterBase : public GarbageCollectedMixin {
-public:
- virtual ~FileWriterBase();
- void initialize(PassOwnPtr<WebFileWriter>, long long length);
-
- long long position() const
+class ChanellCredentialsTest extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
{
- return m_position;
}
- long long length() const
+
+ public function tearDown()
{
- return m_length;
}
- DEFINE_INLINE_VIRTUAL_TRACE() { }
-
-protected:
- FileWriterBase();
-
- WebFileWriter* writer()
+ public function testCreateDefault()
{
- return m_writer.get();
+ $channel_credentials = Grpc\ChannelCredentials::createDefault();
+ $this->assertSame('Grpc\ChannelCredentials', get_class($channel_credentials));
}
- void setPosition(long long position)
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidCreateSsl()
{
- m_position = position;
+ $channel_credentials = Grpc\ChannelCredentials::createSsl([]);
}
- void setLength(long long length)
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidCreateComposite()
{
- m_length = length;
+ $channel_credentials = Grpc\ChannelCredentials::createComposite(
+ 'something', 'something');
}
- void seekInternal(long long position);
-
-private:
- OwnPtr<WebFileWriter> m_writer;
- long long m_position;
- long long m_length;
-};
-
-} // namespace blink
-
-#endif // FileWriterBase_h
+ public function testCreateInsecure()
+ {
+ $channel_credentials = Grpc\ChannelCredentials::createInsecure();
+ $this->assertNull($channel_credentials);
+ }
+}
« no previous file with comments | « third_party/grpc/src/php/tests/unit_tests/CallTest.php ('k') | third_party/grpc/src/php/tests/unit_tests/ChannelTest.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698