Fix typo in {Byte,Wide}StringView.TrimmedRight tests

In ByteStringView.TrimmedRight, there exists a variable that should be
used on the next line, but is not due to a typo. Put the variable to
use. Do the same for the WideStringView version of the test.

Change-Id: If47e56271003d8cfb3e381c967e5a1a97fb3c166
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/118073
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Thomas Sepez <tsepez@google.com>
diff --git a/core/fxcrt/bytestring_unittest.cpp b/core/fxcrt/bytestring_unittest.cpp
index 470cd98..1646a66 100644
--- a/core/fxcrt/bytestring_unittest.cpp
+++ b/core/fxcrt/bytestring_unittest.cpp
@@ -1393,7 +1393,7 @@
   EXPECT_EQ("FRED", fred.TrimmedRight('E'));
   EXPECT_EQ("FRE", fred.TrimmedRight('D'));
   ByteStringView fredd("FREDD");
-  EXPECT_EQ("FRE", fred.TrimmedRight('D'));
+  EXPECT_EQ("FRE", fredd.TrimmedRight('D'));
 }
 
 TEST(ByteStringView, ElementAccess) {
diff --git a/core/fxcrt/widestring_unittest.cpp b/core/fxcrt/widestring_unittest.cpp
index a16bf45..f75d106 100644
--- a/core/fxcrt/widestring_unittest.cpp
+++ b/core/fxcrt/widestring_unittest.cpp
@@ -1803,7 +1803,7 @@
   EXPECT_EQ(L"FRED", fred.TrimmedRight(L'E'));
   EXPECT_EQ(L"FRE", fred.TrimmedRight(L'D'));
   WideStringView fredd(L"FREDD");
-  EXPECT_EQ(L"FRE", fred.TrimmedRight(L'D'));
+  EXPECT_EQ(L"FRE", fredd.TrimmedRight(L'D'));
 }
 
 TEST(WideString, FormatWidth) {