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

Side by Side Diff: ppapi/tests/test_utils.h

Issue 8840007: GetDocumentURL is added to PPB_Testing_Dev. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed codereview issues. Created 9 years 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 unified diff | Download patch
« no previous file with comments | « ppapi/tests/test_udp_socket_private_shared.cc ('k') | ppapi/tests/test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_TESTS_TEST_UTILS_H_ 5 #ifndef PPAPI_TESTS_TEST_UTILS_H_
6 #define PPAPI_TESTS_TEST_UTILS_H_ 6 #define PPAPI_TESTS_TEST_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ppapi/c/dev/ppb_testing_dev.h" 10 #include "ppapi/c/dev/ppb_testing_dev.h"
11 #include "ppapi/c/pp_instance.h" 11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/pp_stdint.h" 12 #include "ppapi/c/pp_stdint.h"
13 #include "ppapi/cpp/completion_callback.h" 13 #include "ppapi/cpp/completion_callback.h"
14 14
15 // Timeout to wait for some action to complete. 15 // Timeout to wait for some action to complete.
16 extern const int kActionTimeoutMs; 16 extern const int kActionTimeoutMs;
17 17
18 const PPB_Testing_Dev* GetTestingInterface(); 18 const PPB_Testing_Dev* GetTestingInterface();
19 std::string ReportError(const char* method, int32_t error); 19 std::string ReportError(const char* method, int32_t error);
20 void PlatformSleep(int duration_ms); 20 void PlatformSleep(int duration_ms);
21 bool GetLocalHostPort(PP_Instance instance, std::string* host, uint16_t* port);
21 22
22 class TestCompletionCallback { 23 class TestCompletionCallback {
23 public: 24 public:
24 TestCompletionCallback(PP_Instance instance); 25 TestCompletionCallback(PP_Instance instance);
25 TestCompletionCallback(PP_Instance instance, bool force_async); 26 TestCompletionCallback(PP_Instance instance, bool force_async);
26 27
27 // Waits for the callback to be called and returns the 28 // Waits for the callback to be called and returns the
28 // result. Returns immediately if the callback was previously called 29 // result. Returns immediately if the callback was previously called
29 // and the result wasn't returned (i.e. each result value received 30 // and the result wasn't returned (i.e. each result value received
30 // by the callback is returned by WaitForResult() once and only 31 // by the callback is returned by WaitForResult() once and only
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #error Please add support for your platform in ppapi/c/pp_macros.h. 74 #error Please add support for your platform in ppapi/c/pp_macros.h.
74 #endif 75 #endif
75 76
76 /* These are used to determine POSIX-like implementations vs Windows. */ 77 /* These are used to determine POSIX-like implementations vs Windows. */
77 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ 78 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
78 defined(__OpenBSD__) || defined(__sun) || defined(__native_client__) 79 defined(__OpenBSD__) || defined(__sun) || defined(__native_client__)
79 #define PPAPI_POSIX 1 80 #define PPAPI_POSIX 1
80 #endif 81 #endif
81 82
82 #endif // PPAPI_TESTS_TEST_UTILS_H_ 83 #endif // PPAPI_TESTS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « ppapi/tests/test_udp_socket_private_shared.cc ('k') | ppapi/tests/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698