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

Unified Diff: testing/test_support.cpp

Issue 1898993002: Allow pdfium_test to send simple events to each page. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix build, nits. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/test_support.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/test_support.cpp
diff --git a/testing/test_support.cpp b/testing/test_support.cpp
index 1ccd32f084f10a9e45a3040dc07cf12adeee5d95..c50edeba2da888e68b971dbca25cb8a5d2d59a88 100644
--- a/testing/test_support.cpp
+++ b/testing/test_support.cpp
@@ -118,6 +118,21 @@ std::wstring GetPlatformWString(FPDF_WIDESTRING wstr) {
return platform_string;
}
+std::vector<std::string> StringSplit(const std::string& str, char delimiter) {
+ std::vector<std::string> result;
+ size_t pos = 0;
+ while (1) {
+ size_t found = str.find(delimiter, pos);
+ if (found == std::string::npos)
+ break;
+
+ result.push_back(str.substr(pos, found - pos));
+ pos = found + 1;
+ }
+ result.push_back(str.substr(pos));
+ return result;
+}
+
std::unique_ptr<unsigned short, pdfium::FreeDeleter> GetFPDFWideString(
const std::wstring& wstr) {
size_t length = sizeof(uint16_t) * (wstr.length() + 1);
« no previous file with comments | « testing/test_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698