Index: third_party/grpc/test/core/end2end/multiple_server_queues_test.c |
diff --git a/third_party/WebKit/Source/modules/quota/StorageQuotaCallbacksImpl.h b/third_party/grpc/test/core/end2end/multiple_server_queues_test.c |
similarity index 57% |
copy from third_party/WebKit/Source/modules/quota/StorageQuotaCallbacksImpl.h |
copy to third_party/grpc/test/core/end2end/multiple_server_queues_test.c |
index 14300b33e0576462d2062bf8edd4264becbb68fd..5e2eaf4ae9492106fe54992f5a0f7954ca4466ab 100644 |
--- a/third_party/WebKit/Source/modules/quota/StorageQuotaCallbacksImpl.h |
+++ b/third_party/grpc/test/core/end2end/multiple_server_queues_test.c |
@@ -1,5 +1,7 @@ |
/* |
- * 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,42 +28,36 @@ |
* 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 StorageQuotaCallbacksImpl_h |
-#define StorageQuotaCallbacksImpl_h |
- |
-#include "bindings/core/v8/ScriptPromiseResolver.h" |
-#include "modules/ModulesExport.h" |
-#include "platform/StorageQuotaCallbacks.h" |
-#include "wtf/OwnPtr.h" |
-#include "wtf/PassRefPtr.h" |
-#include "wtf/RefPtr.h" |
- |
-namespace blink { |
- |
-class MODULES_EXPORT StorageQuotaCallbacksImpl final : public StorageQuotaCallbacks { |
- WTF_MAKE_NONCOPYABLE(StorageQuotaCallbacksImpl); |
-public: |
- static StorageQuotaCallbacksImpl* create(ScriptPromiseResolver* resolver) |
- { |
- return new StorageQuotaCallbacksImpl(resolver); |
- } |
- |
- ~StorageQuotaCallbacksImpl() override; |
- |
- void didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes) override; |
- void didGrantStorageQuota(unsigned long long usageInBytes, unsigned long long grantedQuotaInBytes) override; |
- void didFail(WebStorageQuotaError) override; |
- |
- DECLARE_VIRTUAL_TRACE(); |
- |
-private: |
- explicit StorageQuotaCallbacksImpl(ScriptPromiseResolver*); |
- |
- Member<ScriptPromiseResolver> m_resolver; |
-}; |
- |
-} // namespace blink |
- |
-#endif // StorageQuotaCallbacksImpl_h |
+#include <grpc/grpc.h> |
+#include "test/core/util/test_config.h" |
+ |
+int main(int argc, char **argv) { |
+ grpc_completion_queue *cq1; |
+ grpc_completion_queue *cq2; |
+ grpc_server *server; |
+ |
+ grpc_test_init(argc, argv); |
+ grpc_init(); |
+ cq1 = grpc_completion_queue_create(NULL); |
+ cq2 = grpc_completion_queue_create(NULL); |
+ server = grpc_server_create(NULL, NULL); |
+ grpc_server_register_completion_queue(server, cq1, NULL); |
+ grpc_server_add_insecure_http2_port(server, "[::]:0"); |
+ grpc_server_register_completion_queue(server, cq2, NULL); |
+ grpc_server_start(server); |
+ grpc_server_shutdown_and_notify(server, cq2, NULL); |
+ grpc_completion_queue_next(cq2, gpr_inf_future(GPR_CLOCK_REALTIME), |
+ NULL); /* cue queue hang */ |
+ grpc_completion_queue_shutdown(cq1); |
+ grpc_completion_queue_shutdown(cq2); |
+ grpc_completion_queue_next(cq1, gpr_inf_future(GPR_CLOCK_REALTIME), NULL); |
+ grpc_completion_queue_next(cq2, gpr_inf_future(GPR_CLOCK_REALTIME), NULL); |
+ grpc_server_destroy(server); |
+ grpc_completion_queue_destroy(cq1); |
+ grpc_completion_queue_destroy(cq2); |
+ grpc_shutdown(); |
+ return 0; |
+} |