summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/libfuzzer/pdf_cfx_barcode_fuzzer.cc4
-rw-r--r--testing/libfuzzer/pdf_css_fuzzer.cc4
-rw-r--r--testing/libfuzzer/pdf_fm2js_fuzzer.cc6
-rw-r--r--testing/test_support.cpp4
-rw-r--r--testing/xfa_js_embedder_test.cpp8
-rw-r--r--testing/xfa_js_embedder_test.h6
6 files changed, 16 insertions, 16 deletions
diff --git a/testing/libfuzzer/pdf_cfx_barcode_fuzzer.cc b/testing/libfuzzer/pdf_cfx_barcode_fuzzer.cc
index e791102103..3334e86bfc 100644
--- a/testing/libfuzzer/pdf_cfx_barcode_fuzzer.cc
+++ b/testing/libfuzzer/pdf_cfx_barcode_fuzzer.cc
@@ -27,8 +27,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
barcode.SetHeight(298);
barcode.SetWidth(418);
- CFX_WideStringC content(reinterpret_cast<const wchar_t*>(data),
- size / sizeof(wchar_t));
+ WideStringView content(reinterpret_cast<const wchar_t*>(data),
+ size / sizeof(wchar_t));
if (!barcode.Encode(content))
return 0;
diff --git a/testing/libfuzzer/pdf_css_fuzzer.cc b/testing/libfuzzer/pdf_css_fuzzer.cc
index 36b29427ef..74745a20be 100644
--- a/testing/libfuzzer/pdf_css_fuzzer.cc
+++ b/testing/libfuzzer/pdf_css_fuzzer.cc
@@ -11,8 +11,8 @@
#include "core/fxcrt/fx_string.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- CFX_WideString input = CFX_WideString::FromUTF8(
- CFX_ByteStringC(data, static_cast<FX_STRSIZE>(size)));
+ WideString input =
+ WideString::FromUTF8(ByteStringView(data, static_cast<FX_STRSIZE>(size)));
// If we convert the input into an empty string bail out.
if (input.GetLength() == 0)
diff --git a/testing/libfuzzer/pdf_fm2js_fuzzer.cc b/testing/libfuzzer/pdf_fm2js_fuzzer.cc
index de5610677f..438d1025ad 100644
--- a/testing/libfuzzer/pdf_fm2js_fuzzer.cc
+++ b/testing/libfuzzer/pdf_fm2js_fuzzer.cc
@@ -16,8 +16,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return 0;
CFX_WideTextBuf js;
- CFX_WideString input =
- CFX_WideString::FromUTF8(CFX_ByteStringC(data, safe_size.ValueOrDie()));
- CXFA_FM2JSContext::Translate(input.AsStringC(), &js);
+ WideString input =
+ WideString::FromUTF8(ByteStringView(data, safe_size.ValueOrDie()));
+ CXFA_FM2JSContext::Translate(input.AsStringView(), &js);
return 0;
}
diff --git a/testing/test_support.cpp b/testing/test_support.cpp
index 0ebb7478c2..b32ec7de96 100644
--- a/testing/test_support.cpp
+++ b/testing/test_support.cpp
@@ -105,8 +105,8 @@ std::unique_ptr<char, pdfium::FreeDeleter> GetFileContents(const char* filename,
}
std::string GetPlatformString(FPDF_WIDESTRING wstr) {
- CFX_WideString wide_string =
- CFX_WideString::FromUTF16LE(wstr, CFX_WideString::WStringLength(wstr));
+ WideString wide_string =
+ WideString::FromUTF16LE(wstr, WideString::WStringLength(wstr));
return std::string(wide_string.UTF8Encode().c_str());
}
diff --git a/testing/xfa_js_embedder_test.cpp b/testing/xfa_js_embedder_test.cpp
index a11806ffda..3aee49c580 100644
--- a/testing/xfa_js_embedder_test.cpp
+++ b/testing/xfa_js_embedder_test.cpp
@@ -52,7 +52,7 @@ bool XFAJSEmbedderTest::OpenDocument(const std::string& filename,
return true;
}
-bool XFAJSEmbedderTest::Execute(const CFX_ByteStringC& input) {
+bool XFAJSEmbedderTest::Execute(const ByteStringView& input) {
if (ExecuteHelper(input)) {
return true;
}
@@ -68,13 +68,13 @@ bool XFAJSEmbedderTest::Execute(const CFX_ByteStringC& input) {
return false;
}
-bool XFAJSEmbedderTest::ExecuteSilenceFailure(const CFX_ByteStringC& input) {
+bool XFAJSEmbedderTest::ExecuteSilenceFailure(const ByteStringView& input) {
return ExecuteHelper(input);
}
-bool XFAJSEmbedderTest::ExecuteHelper(const CFX_ByteStringC& input) {
+bool XFAJSEmbedderTest::ExecuteHelper(const ByteStringView& input) {
value_ = pdfium::MakeUnique<CFXJSE_Value>(GetIsolate());
return script_context_->RunScript(XFA_SCRIPTLANGTYPE_Formcalc,
- CFX_WideString::FromUTF8(input).AsStringC(),
+ WideString::FromUTF8(input).AsStringView(),
value_.get(), GetXFADocument()->GetRoot());
}
diff --git a/testing/xfa_js_embedder_test.h b/testing/xfa_js_embedder_test.h
index 1dc06f05e6..362db471ce 100644
--- a/testing/xfa_js_embedder_test.h
+++ b/testing/xfa_js_embedder_test.h
@@ -32,8 +32,8 @@ class XFAJSEmbedderTest : public EmbedderTest {
v8::Isolate* GetIsolate() const { return isolate_; }
CXFA_Document* GetXFADocument();
- bool Execute(const CFX_ByteStringC& input);
- bool ExecuteSilenceFailure(const CFX_ByteStringC& input);
+ bool Execute(const ByteStringView& input);
+ bool ExecuteSilenceFailure(const ByteStringView& input);
CFXJSE_Value* GetValue() const { return value_.get(); }
@@ -43,7 +43,7 @@ class XFAJSEmbedderTest : public EmbedderTest {
v8::Isolate* isolate_;
CXFA_ScriptContext* script_context_;
- bool ExecuteHelper(const CFX_ByteStringC& input);
+ bool ExecuteHelper(const ByteStringView& input);
};
#endif // TESTING_XFA_JS_EMBEDDER_TEST_H_