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); |
+ } |
+} |