Send tab thumbnails to chrome://tab-strip

This connects the WebUI at chrome://tab-strip to the ThumbnailImage
infrastructure through an intermediate class ThumbnailTracker.

Bug: 991393
Change-Id: I7a730dea9f90db420c32b7cc4871b0608f447c2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758920
Commit-Queue: Collin Baker <[email protected]>
Reviewed-by: Albert J. Wong <[email protected]>
Reviewed-by: Peter Boström <[email protected]>
Reviewed-by: John Lee <[email protected]>
Reviewed-by: Rebekah Potter <[email protected]>
Reviewed-by: Dana Fried <[email protected]>
Cr-Commit-Position: refs/heads/master@{#693911}
diff --git a/base/base64_unittest.cc b/base/base64_unittest.cc
index 91651f4..2a27f8b 100644
--- a/base/base64_unittest.cc
+++ b/base/base64_unittest.cc
@@ -24,6 +24,20 @@
   EXPECT_EQ(kText, decoded);
 }
 
+TEST(Base64Test, Binary) {
+  const uint8_t kData[] = {0x00, 0x01, 0xFE, 0xFF};
+
+  std::string binary_encoded = Base64Encode(make_span(kData));
+
+  // Check that encoding the same data through the StringPiece interface gives
+  // the same results.
+  std::string string_piece_encoded;
+  Base64Encode(StringPiece(reinterpret_cast<const char*>(kData), sizeof(kData)),
+               &string_piece_encoded);
+
+  EXPECT_EQ(binary_encoded, string_piece_encoded);
+}
+
 TEST(Base64Test, InPlace) {
   const std::string kText = "hello world";
   const std::string kBase64Text = "aGVsbG8gd29ybGQ=";