Cleaning up fx_string_testhelpers.

This is unused except for being a pathway for indirect deps.

Change-Id: I717290235ccbc59429ad24231033382958e2a086
Reviewed-on: https://pdfium-review.googlesource.com/6910
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index f577986..06c4101 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -230,8 +230,6 @@
 static_library("test_support") {
   testonly = true
   sources = [
-    "testing/fx_string_testhelpers.cpp",
-    "testing/fx_string_testhelpers.h",
     "testing/test_support.cpp",
     "testing/test_support.h",
     "testing/utils/path_service.cpp",
diff --git a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
index bb3cf15..22ea62d 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
@@ -9,7 +9,6 @@
 
 #include "core/fxcrt/fx_basic.h"
 #include "testing/embedder_test.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/test_support.h"
 
diff --git a/core/fxcodec/codec/fx_codec_a85_unittest.cpp b/core/fxcodec/codec/fx_codec_a85_unittest.cpp
index 78f9bd8..5e40548 100644
--- a/core/fxcodec/codec/fx_codec_a85_unittest.cpp
+++ b/core/fxcodec/codec/fx_codec_a85_unittest.cpp
@@ -8,7 +8,6 @@
 
 #include "core/fxcodec/codec/ccodec_basicmodule.h"
 #include "core/fxcodec/fx_codec.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(fxcodec, A85TestBadInputs) {
diff --git a/core/fxcodec/codec/fx_codec_jpx_unittest.cpp b/core/fxcodec/codec/fx_codec_jpx_unittest.cpp
index 2acb76c..6d1e31a 100644
--- a/core/fxcodec/codec/fx_codec_jpx_unittest.cpp
+++ b/core/fxcodec/codec/fx_codec_jpx_unittest.cpp
@@ -7,7 +7,6 @@
 #include <limits>
 
 #include "core/fxcodec/codec/codec_int.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 static const OPJ_OFF_T kSkipError = static_cast<OPJ_OFF_T>(-1);
diff --git a/core/fxcodec/codec/fx_codec_rle_unittest.cpp b/core/fxcodec/codec/fx_codec_rle_unittest.cpp
index f9a4b3f..7b0af90 100644
--- a/core/fxcodec/codec/fx_codec_rle_unittest.cpp
+++ b/core/fxcodec/codec/fx_codec_rle_unittest.cpp
@@ -9,7 +9,6 @@
 #include "core/fpdfapi/parser/fpdf_parser_decode.h"
 #include "core/fxcodec/codec/ccodec_basicmodule.h"
 #include "core/fxcodec/fx_codec.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(fxcodec, RLETestBadInputs) {
diff --git a/core/fxcrt/cfx_bytestring_unittest.cpp b/core/fxcrt/cfx_bytestring_unittest.cpp
index c53b900..609f892 100644
--- a/core/fxcrt/cfx_bytestring_unittest.cpp
+++ b/core/fxcrt/cfx_bytestring_unittest.cpp
@@ -3,11 +3,11 @@
 // found in the LICENSE file.
 
 #include "core/fxcrt/cfx_bytestring.h"
+#include "core/fxcrt/fx_string.h"
 
 #include <algorithm>
 #include <vector>
 
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/base/stl_util.h"
 
diff --git a/core/fxcrt/cfx_maybe_owned_unittest.cpp b/core/fxcrt/cfx_maybe_owned_unittest.cpp
index 8f513a3..a716182 100644
--- a/core/fxcrt/cfx_maybe_owned_unittest.cpp
+++ b/core/fxcrt/cfx_maybe_owned_unittest.cpp
@@ -8,7 +8,6 @@
 #include <utility>
 
 #include "core/fxcrt/fx_memory.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/base/ptr_util.h"
 
diff --git a/core/fxcrt/cfx_observable_unittest.cpp b/core/fxcrt/cfx_observable_unittest.cpp
index 3c0fabb..f7c78c1 100644
--- a/core/fxcrt/cfx_observable_unittest.cpp
+++ b/core/fxcrt/cfx_observable_unittest.cpp
@@ -7,7 +7,6 @@
 #include <utility>
 #include <vector>
 
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
diff --git a/core/fxcrt/cfx_retain_ptr_unittest.cpp b/core/fxcrt/cfx_retain_ptr_unittest.cpp
index fc03094..eae542f 100644
--- a/core/fxcrt/cfx_retain_ptr_unittest.cpp
+++ b/core/fxcrt/cfx_retain_ptr_unittest.cpp
@@ -7,7 +7,6 @@
 #include <utility>
 #include <vector>
 
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
diff --git a/core/fxcrt/cfx_shared_copy_on_write_unittest.cpp b/core/fxcrt/cfx_shared_copy_on_write_unittest.cpp
index b0205d8..7978374 100644
--- a/core/fxcrt/cfx_shared_copy_on_write_unittest.cpp
+++ b/core/fxcrt/cfx_shared_copy_on_write_unittest.cpp
@@ -7,7 +7,6 @@
 #include <map>
 #include <string>
 
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
diff --git a/core/fxcrt/cfx_string_pool_template_unittest.cpp b/core/fxcrt/cfx_string_pool_template_unittest.cpp
index d0f5fbe..a4e603c 100644
--- a/core/fxcrt/cfx_string_pool_template_unittest.cpp
+++ b/core/fxcrt/cfx_string_pool_template_unittest.cpp
@@ -4,7 +4,6 @@
 
 #include "core/fxcrt/cfx_string_pool_template.h"
 #include "core/fxcrt/fx_string.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(fxcrt, ByteStringPool) {
diff --git a/core/fxcrt/cfx_unowned_ptr_unittest.cpp b/core/fxcrt/cfx_unowned_ptr_unittest.cpp
index 6218679..46230e7 100644
--- a/core/fxcrt/cfx_unowned_ptr_unittest.cpp
+++ b/core/fxcrt/cfx_unowned_ptr_unittest.cpp
@@ -7,7 +7,6 @@
 #include <utility>
 #include <vector>
 
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
diff --git a/core/fxcrt/cfx_weak_ptr_unittest.cpp b/core/fxcrt/cfx_weak_ptr_unittest.cpp
index 47f63c3..aafcf16 100644
--- a/core/fxcrt/cfx_weak_ptr_unittest.cpp
+++ b/core/fxcrt/cfx_weak_ptr_unittest.cpp
@@ -8,7 +8,6 @@
 #include <utility>
 
 #include "core/fxcrt/fx_memory.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
diff --git a/core/fxcrt/cfx_widestring_unittest.cpp b/core/fxcrt/cfx_widestring_unittest.cpp
index f5a0e12..165b43a 100644
--- a/core/fxcrt/cfx_widestring_unittest.cpp
+++ b/core/fxcrt/cfx_widestring_unittest.cpp
@@ -3,11 +3,11 @@
 // found in the LICENSE file.
 
 #include "core/fxcrt/cfx_widestring.h"
+#include "core/fxcrt/fx_string.h"
 
 #include <algorithm>
 #include <vector>
 
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(fxcrt, WideStringOperatorSubscript) {
diff --git a/core/fxcrt/fx_basic_util_unittest.cpp b/core/fxcrt/fx_basic_util_unittest.cpp
index 471c6de..f4e3f79 100644
--- a/core/fxcrt/fx_basic_util_unittest.cpp
+++ b/core/fxcrt/fx_basic_util_unittest.cpp
@@ -5,7 +5,6 @@
 #include <limits>
 
 #include "core/fxcrt/fx_basic.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace {
diff --git a/core/fxcrt/fx_system_unittest.cpp b/core/fxcrt/fx_system_unittest.cpp
index 9182fdf..7747086 100644
--- a/core/fxcrt/fx_system_unittest.cpp
+++ b/core/fxcrt/fx_system_unittest.cpp
@@ -4,8 +4,8 @@
 
 #include <limits>
 
+#include "core/fxcrt/fx_string.h"
 #include "core/fxcrt/fx_system.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 // Unit test covering cases where PDFium replaces well-known library
diff --git a/core/fxge/skia/fx_skia_device_unittest.cpp b/core/fxge/skia/fx_skia_device_unittest.cpp
index 99b76d2..94d9a0f 100644
--- a/core/fxge/skia/fx_skia_device_unittest.cpp
+++ b/core/fxge/skia/fx_skia_device_unittest.cpp
@@ -9,7 +9,6 @@
 #include "core/fxge/cfx_renderdevice.h"
 #include "fpdfsdk/fsdk_define.h"
 #include "public/fpdfview.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/skia/include/core/SkPictureRecorder.h"
 
diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp
index 2472db9..f069ec2 100644
--- a/fpdfsdk/fpdfdoc_embeddertest.cpp
+++ b/fpdfsdk/fpdfdoc_embeddertest.cpp
@@ -10,7 +10,6 @@
 #include "public/fpdf_edit.h"
 #include "public/fpdfview.h"
 #include "testing/embedder_test.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/test_support.h"
 
diff --git a/fpdfsdk/fpdfsave_embeddertest.cpp b/fpdfsdk/fpdfsave_embeddertest.cpp
index 9187270..e5d05c9 100644
--- a/fpdfsdk/fpdfsave_embeddertest.cpp
+++ b/fpdfsdk/fpdfsave_embeddertest.cpp
@@ -11,7 +11,6 @@
 #include "public/fpdf_ppo.h"
 #include "public/fpdfview.h"
 #include "testing/embedder_test.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gmock/include/gmock/gmock-matchers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/test_support.h"
@@ -31,7 +30,6 @@
   EXPECT_THAT(GetString(), testing::StartsWith("%PDF-1.4\r\n"));
   EXPECT_EQ(843u, GetString().length());
 }
-
 TEST_F(FPDFSaveEmbedderTest, SaveSimpleDocWithBadVersion) {
   EXPECT_TRUE(OpenDocument("hello_world.pdf"));
   EXPECT_TRUE(FPDF_SaveWithVersion(document(), this, 0, -1));
diff --git a/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp b/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp
index b4b9396..478fcf5 100644
--- a/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp
+++ b/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp
@@ -4,7 +4,6 @@
 
 #include "core/fxcrt/fx_basic.h"
 #include "fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(PDF417HighLevelEncoder, EncodeHighLevel) {
diff --git a/testing/fx_string_testhelpers.cpp b/testing/fx_string_testhelpers.cpp
deleted file mode 100644
index 00a13f5..0000000
--- a/testing/fx_string_testhelpers.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "testing/fx_string_testhelpers.h"
-
-#include <iomanip>
-#include <ios>
-#include <string>
-
-namespace {
-
-template <typename T>
-std::ostream& output_string(std::ostream& out, const T& str) {
-  out << std::hex << std::setfill('0') << '"';
-  // This function is used for FX strings whose length is defined as int.
-  for (int i = 0; i < str.GetLength(); ++i) {
-    unsigned int c = str.GetAt(i);
-    if (c >= 0x20 && c < 0x7F) {
-      out << static_cast<char>(c);
-    } else if (sizeof(typename T::CharType) == 1) {
-      out << "\\x" << std::setw(2) << c << std::setw(0);
-    } else if (c < 0x10000) {
-      out << "\\u" << std::setw(4) << c << std::setw(0);
-    } else {
-      out << "<invalid>";
-    }
-  }
-  out << '"' << std::dec << std::setfill(' ');
-  return out;
-}
-
-}  // namespace
-
-std::ostream& operator<<(std::ostream& out, const CFX_ByteStringC& str) {
-  return output_string(out, str);
-}
-
-std::ostream& operator<<(std::ostream& out, const CFX_ByteString& str) {
-  return output_string(out, str);
-}
-
-std::ostream& operator<<(std::ostream& out, const CFX_WideStringC& str) {
-  return output_string(out, str);
-}
-
-std::ostream& operator<<(std::ostream& out, const CFX_WideString& str) {
-  return output_string(out, str);
-}
-
-std::ostream& operator<<(std::ostream& os, const CFX_DateTime& dt) {
-  os << dt.GetYear() << "-" << std::to_string(dt.GetMonth()) << "-"
-     << std::to_string(dt.GetDay()) << " " << std::to_string(dt.GetHour())
-     << ":" << std::to_string(dt.GetMinute()) << ":"
-     << std::to_string(dt.GetSecond()) << "."
-     << std::to_string(dt.GetMillisecond());
-  return os;
-}
diff --git a/testing/fx_string_testhelpers.h b/testing/fx_string_testhelpers.h
deleted file mode 100644
index caa2330..0000000
--- a/testing/fx_string_testhelpers.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef TESTING_FX_STRING_TESTHELPERS_H_
-#define TESTING_FX_STRING_TESTHELPERS_H_
-
-#include <ostream>
-
-#include "core/fxcrt/cfx_datetime.h"
-#include "core/fxcrt/fx_string.h"
-
-// Output stream operator so GTEST macros work with FX strings.
-std::ostream& operator<<(std::ostream& out, const CFX_ByteStringC& str);
-std::ostream& operator<<(std::ostream& out, const CFX_ByteString& str);
-std::ostream& operator<<(std::ostream& out, const CFX_WideStringC& str);
-std::ostream& operator<<(std::ostream& out, const CFX_WideString& str);
-
-// Output stream operator so GTEST macros work with CFX_DateTime objects.
-std::ostream& operator<<(std::ostream& os, const CFX_DateTime& dt);
-
-#endif  // TESTING_FX_STRING_TESTHELPERS_H_
diff --git a/xfa/fgas/crt/cfgas_formatstring_unittest.cpp b/xfa/fgas/crt/cfgas_formatstring_unittest.cpp
index 3adcedf..2af1507 100644
--- a/xfa/fgas/crt/cfgas_formatstring_unittest.cpp
+++ b/xfa/fgas/crt/cfgas_formatstring_unittest.cpp
@@ -11,7 +11,6 @@
 #include <memory>
 
 #include "core/fpdfapi/cpdf_modulemgr.h"
-#include "testing/fx_string_testhelpers.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/test_support.h"
 #include "third_party/base/ptr_util.h"