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

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

Issue 9174020: PPAPI URLRequestInfo test: port NaCl version to ppapi_tests. Fix Var and Resource leaks. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/tests/test_url_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PAPPI_TESTS_TEST_URL_REQUEST_H_
6 #define PAPPI_TESTS_TEST_URL_REQUEST_H_
7
8 #include <string>
9
10 #include "ppapi/c/ppb_core.h"
11 #include "ppapi/c/ppb_url_loader.h"
12 #include "ppapi/c/ppb_url_request_info.h"
13 #include "ppapi/c/ppb_url_response_info.h"
14 #include "ppapi/c/ppb_var.h"
15 #include "ppapi/tests/test_case.h"
16
17 class TestURLRequest : public TestCase {
18 public:
19 explicit TestURLRequest(TestingInstance* instance);
20 ~TestURLRequest() { ppb_core_interface_->ReleaseResource(url_loader_); }
21
22 // TestCase implementation.
23 virtual bool Init();
24 virtual void RunTests(const std::string& filter);
25
26 private:
27 std::string TestCreateAndIsURLRequestInfo();
28 std::string TestSetProperty();
29 std::string TestAppendDataToBody();
30 std::string TestStress();
31
32 // Helpers.
33 PP_Var PP_MakeString(const char* s);
34 std::string LoadAndCompareBody(PP_Resource url_request,
35 const std::string& expected_body);
36
37 const PPB_URLRequestInfo* ppb_url_request_interface_;
38 const PPB_URLLoader* ppb_url_loader_interface_;
39 const PPB_URLResponseInfo* ppb_url_response_interface_;
40 const PPB_Core* ppb_core_interface_;
41 const PPB_Var* ppb_var_interface_;
42
43 PP_Resource url_loader_;
44 };
45
46 #endif // PAPPI_TESTS_TEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/tests/test_url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698