diff --git a/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
index 9119a79e0e092..2d2567b52a1b2 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper_test.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
@@ -4,6 +4,7 @@
 
 // Tests for the Command Buffer Helper.
 
+#include <array>
 #include "gpu/command_buffer/client/cmd_buffer_helper.h"
 
 #include <stddef.h>
@@ -12,6 +13,8 @@
 #include <memory>
 #include <vector>
 
+#include "base/containers/span.h"
+#include "base/containers/span_writer.h"
 #include "base/compiler_specific.h"
 #include "base/functional/bind.h"
 #include "base/functional/callback_helpers.h"
@@ -72,20 +75,23 @@ class CommandBufferHelperTest : public testing::Test {
   void AddCommandWithExpect(error::Error _return,
                             unsigned int command,
                             int arg_count,
-                            CommandBufferEntry *args) {
+                            base::span<const CommandBufferEntry> args) {
     CommandHeader header;
     header.size = arg_count + 1;
     header.command = command;
-    CommandBufferEntry* cmds =
-        static_cast<CommandBufferEntry*>(helper_->GetSpace(arg_count + 1));
-    CommandBufferOffset put = 0;
-    UNSAFE_TODO(cmds[put++]).value_header = header;
-    for (int ii = 0; ii < arg_count; ++ii) {
-      UNSAFE_TODO(cmds[put++]) = UNSAFE_TODO(args[ii]);
+    // SAFETY: helper_->GetSpace() returns a pointer to a buffer of the
+    // requested size.
+    base::span<CommandBufferEntry> cmds = UNSAFE_BUFFERS(
+        base::span(static_cast<CommandBufferEntry*>(
+                       helper_->GetSpace(arg_count + 1)),
+                   static_cast<size_t>(arg_count) + 1));
+    cmds[0].value_header = header;
+    if (!args.empty()) {
+      cmds.subspan(static_cast<size_t>(1)).copy_from(args);
     }
 
     EXPECT_CALL(*api_mock_, DoCommand(command, arg_count,
-        Truly(AsyncAPIMock::IsArgs(arg_count, args))))
+        Truly(AsyncAPIMock::IsArgs(arg_count, args.data()))))
         .InSequence(sequence_)
         .WillOnce(Return(_return));
   }
@@ -96,17 +102,17 @@ class CommandBufferHelperTest : public testing::Test {
     int arg_count = cmd_size - 1;
 
     // Allocate array for args.
-    auto args_ptr =
-        std::make_unique<CommandBufferEntry[]>(arg_count ? arg_count : 1);
+    auto args =
+        std::make_unique<std::vector<CommandBufferEntry>>(arg_count);
 
     for (int32_t ii = 0; ii < arg_count; ++ii) {
-      args_ptr[ii].value_uint32 = 0xF00DF00D + ii;
+      (*args)[ii].value_uint32 = 0xF00DF00D + ii;
     }
 
     // Add command and save args in test_command_args_ until the test completes.
     AddCommandWithExpect(
-        _return, test_command_next_id_++, arg_count, args_ptr.get());
-    test_command_args_.push_back(std::move(args_ptr));
+        _return, test_command_next_id_++, arg_count, *args);
+    test_command_args_.push_back(std::move(args));
   }
 
   void TestCommandWrappingFull(int32_t cmd_size, int32_t start_commands) {
@@ -121,7 +127,7 @@ class CommandBufferHelperTest : public testing::Test {
     // Initially insert commands up to start_commands and Finish().
     for (int32_t ii = 0; ii < start_commands; ++ii) {
       AddCommandWithExpect(
-          error::kNoError, ii + kUnusedCommandId, num_args, &args[0]);
+          error::kNoError, ii + kUnusedCommandId, num_args, args);
     }
     helper_->Finish();
 
@@ -138,7 +144,7 @@ class CommandBufferHelperTest : public testing::Test {
       AddCommandWithExpect(error::kNoError,
                            start_commands + ii + kUnusedCommandId,
                            num_args,
-                           &args[0]);
+                           args);
     }
 
     // Flush all commands.
@@ -200,7 +206,8 @@ class CommandBufferHelperTest : public testing::Test {
   std::unique_ptr<CommandBufferDirectLocked> command_buffer_;
   std::unique_ptr<AsyncAPIMock> api_mock_;
   std::unique_ptr<CommandBufferHelper> helper_;
-  std::vector<std::unique_ptr<CommandBufferEntry[]>> test_command_args_;
+  std::vector<std::unique_ptr<std::vector<CommandBufferEntry>>>
+      test_command_args_;
   unsigned int test_command_next_id_;
   Sequence sequence_;
   base::test::SingleThreadTaskEnvironment task_environment_;
@@ -400,16 +407,18 @@ TEST_F(CommandBufferHelperTest, TestCommandProcessing) {
   EXPECT_EQ(0, GetGetOffset());
 
   // Add 3 commands through the helper
-  AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, nullptr);
+  AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, {});
 
-  CommandBufferEntry args1[2];
-  args1[0].value_uint32 = 3;
-  args1[1].value_float = 4.f;
+  constexpr std::array<CommandBufferEntry, 2> args1 = {{
+      {.value_uint32 = 3},
+      {.value_float = 4.f},
+  }};
   AddCommandWithExpect(error::kNoError, kUnusedCommandId, 2, args1);
 
-  CommandBufferEntry args2[2];
-  args2[0].value_uint32 = 5;
-  args2[1].value_float = 6.f;
+  constexpr std::array<CommandBufferEntry, 2> args2 = {{
+      {.value_uint32 = 5},
+      {.value_float = 6.f},
+  }};
   AddCommandWithExpect(error::kNoError, kUnusedCommandId, 2, args2);
 
   // Wait until it's done.
@@ -432,9 +441,10 @@ TEST_F(CommandBufferHelperTest, TestCommandWrapping) {
   static_assert(kTotalNumCommandEntries % 3 != 0,
                 "kTotalNumCommandEntries must not be a multiple of 3");
   const int kNumCommands = (kTotalNumCommandEntries / 3) * 2;
-  CommandBufferEntry args1[2];
-  args1[0].value_uint32 = 5;
-  args1[1].value_float = 4.f;
+  constexpr std::array<CommandBufferEntry, 2> args1 = {{
+      {.value_uint32 = 5},
+      {.value_float = 4.f},
+  }};
 
   for (int i = 0; i < kNumCommands; ++i) {
     AddCommandWithExpect(error::kNoError, kUnusedCommandId + i, 2, args1);
@@ -455,9 +465,9 @@ TEST_F(CommandBufferHelperTest, TestCommandWrappingExactMultiple) {
   const size_t kNumArgs = kCommandSize - 1;
   static_assert(kTotalNumCommandEntries % kCommandSize == 0,
                 "kTotalNumCommandEntries should be a multiple of kCommandSize");
-  CommandBufferEntry args1[kNumArgs];
+  std::array<CommandBufferEntry, kNumArgs> args1;
   for (size_t ii = 0; ii < kNumArgs; ++ii) {
-    UNSAFE_TODO(args1[ii]).value_uint32 = ii + 1;
+    args1[ii].value_uint32 = ii + 1;
   }
 
   for (unsigned int i = 0; i < 5; ++i) {
@@ -492,13 +502,14 @@ TEST_F(CommandBufferHelperTest, TestCommandWrappingFullAtEnd) {
 // Checks that asking for available entries work, and that the parser
 // effectively won't use that space.
 TEST_F(CommandBufferHelperTest, TestAvailableEntries) {
-  CommandBufferEntry args[2];
-  args[0].value_uint32 = 3;
-  args[1].value_float = 4.f;
+  constexpr std::array<CommandBufferEntry, 2> args = {{
+      {.value_uint32 = 3},
+      {.value_float = 4.f},
+  }};
 
   // Add 2 commands through the helper - 8 entries
-  AddCommandWithExpect(error::kNoError, kUnusedCommandId + 1, 0, nullptr);
-  AddCommandWithExpect(error::kNoError, kUnusedCommandId + 2, 0, nullptr);
+  AddCommandWithExpect(error::kNoError, kUnusedCommandId + 1, 0, {});
+  AddCommandWithExpect(error::kNoError, kUnusedCommandId + 2, 0, {});
   AddCommandWithExpect(error::kNoError, kUnusedCommandId + 3, 2, args);
   AddCommandWithExpect(error::kNoError, kUnusedCommandId + 4, 2, args);
 
@@ -523,9 +534,10 @@ TEST_F(CommandBufferHelperTest, TestAvailableEntries) {
 
 // Checks that the InsertToken/WaitForToken work.
 TEST_F(CommandBufferHelperTest, TestToken) {
-  CommandBufferEntry args[2];
-  args[0].value_uint32 = 3;
-  args[1].value_float = 4.f;
+  constexpr std::array<CommandBufferEntry, 2> args = {{
+      {.value_uint32 = 3},
+      {.value_float = 4.f},
+  }};
 
   // Add a first command.
   AddCommandWithExpect(error::kNoError, kUnusedCommandId + 3, 2, args);
@@ -552,9 +564,10 @@ TEST_F(CommandBufferHelperTest, TestToken) {
 
 // Checks WaitForToken doesn't Flush if token is already read.
 TEST_F(CommandBufferHelperTest, TestWaitForTokenFlush) {
-  CommandBufferEntry args[2];
-  args[0].value_uint32 = 3;
-  args[1].value_float = 4.f;
+  constexpr std::array<CommandBufferEntry, 2> args = {{
+      {.value_uint32 = 3},
+      {.value_float = 4.f},
+  }};
 
   // Add a first command.
   AddCommandWithExpect(error::kNoError, kUnusedCommandId + 3, 2, args);
@@ -608,7 +621,7 @@ TEST_F(CommandBufferHelperTest, FreeRingBuffer) {
   EXPECT_FALSE(helper_->HaveRingBuffer());
 
   // Test that WaitForAvailableEntries allocates a new one
-  AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, nullptr);
+  AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, {});
   EXPECT_TRUE(helper_->HaveRingBuffer());
   helper_->Finish();
   helper_->FreeRingBuffer();
@@ -618,7 +631,7 @@ TEST_F(CommandBufferHelperTest, FreeRingBuffer) {
   Mock::VerifyAndClearExpectations(api_mock_.get());
 
   // Test that FreeRingBuffer doesn't force a finish
-  AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, nullptr);
+  AddCommandWithExpect(error::kNoError, kUnusedCommandId, 0, {});
   EXPECT_TRUE(helper_->HaveRingBuffer());
   int32_t old_get_offset = command_buffer_->GetLastState().get_offset;
   EXPECT_NE(helper_->GetPutOffsetForTest(), old_get_offset);
