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

Side by Side Diff: fpdfsdk/javascript/util.h

Issue 1837543002: Added test for util.printx() and make it match spec. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Cross-contamination with other CL 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_JAVASCRIPT_UTIL_H_ 7 #ifndef FPDFSDK_JAVASCRIPT_UTIL_H_
8 #define FPDFSDK_JAVASCRIPT_UTIL_H_ 8 #define FPDFSDK_JAVASCRIPT_UTIL_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 20 matching lines...) Expand all
31 CFX_WideString& sError); 31 CFX_WideString& sError);
32 FX_BOOL scand(IJS_Context* cc, 32 FX_BOOL scand(IJS_Context* cc,
33 const std::vector<CJS_Value>& params, 33 const std::vector<CJS_Value>& params,
34 CJS_Value& vRet, 34 CJS_Value& vRet,
35 CFX_WideString& sError); 35 CFX_WideString& sError);
36 FX_BOOL byteToChar(IJS_Context* cc, 36 FX_BOOL byteToChar(IJS_Context* cc,
37 const std::vector<CJS_Value>& params, 37 const std::vector<CJS_Value>& params,
38 CJS_Value& vRet, 38 CJS_Value& vRet,
39 CFX_WideString& sError); 39 CFX_WideString& sError);
40 40
41 static void printx(const std::string& cFormat, 41 static std::string printx(const std::string& cFormat,
dsinclair 2016/03/28 18:39:01 std::string and not one of the CFX_ByteString vari
Tom Sepez 2016/03/28 19:03:41 Yes, because we're going to pass it around to vari
42 const std::string& cSource, 42 const std::string& cSource);
43 std::string& cPurpose);
44 }; 43 };
45 44
46 class CJS_Util : public CJS_Object { 45 class CJS_Util : public CJS_Object {
47 public: 46 public:
48 CJS_Util(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} 47 CJS_Util(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
49 ~CJS_Util() override {} 48 ~CJS_Util() override {}
50 49
51 DECLARE_JS_CLASS(); 50 DECLARE_JS_CLASS();
52 51
53 JS_STATIC_METHOD(printd, util); 52 JS_STATIC_METHOD(printd, util);
54 JS_STATIC_METHOD(printf, util); 53 JS_STATIC_METHOD(printf, util);
55 JS_STATIC_METHOD(printx, util); 54 JS_STATIC_METHOD(printx, util);
56 JS_STATIC_METHOD(scand, util); 55 JS_STATIC_METHOD(scand, util);
57 JS_STATIC_METHOD(byteToChar, util); 56 JS_STATIC_METHOD(byteToChar, util);
58 }; 57 };
59 58
60 #endif // FPDFSDK_JAVASCRIPT_UTIL_H_ 59 #endif // FPDFSDK_JAVASCRIPT_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698