Move TestMetalContext/Surface to testing namespace (#56602)

The Metal context/surface code was only in the `flutter` namespace but should have been in `flutter::testing` for consistency with everything else in the `testing` directory.

Also squashes the declarations in the rest of that directory to match the style guide while I've got the macro still handy.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
diff --git a/testing/assertions.h b/testing/assertions.h
index a6e7b22..68cea96 100644
--- a/testing/assertions.h
+++ b/testing/assertions.h
@@ -7,15 +7,13 @@
 
 #include <type_traits>
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 inline bool NumberNear(double a, double b) {
   static const double epsilon = 1e-3;
   return (a > (b - epsilon)) && (a < (b + epsilon));
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_ASSERTIONS_H_
diff --git a/testing/canvas_test.h b/testing/canvas_test.h
index 8333257..843af5a 100644
--- a/testing/canvas_test.h
+++ b/testing/canvas_test.h
@@ -9,8 +9,7 @@
 #include "gtest/gtest.h"
 #include "third_party/skia/include/core/SkColorSpace.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 // This fixture allows creating tests that make use of a mock |SkCanvas|.
 template <typename BaseT>
@@ -27,7 +26,6 @@
 };
 using CanvasTest = CanvasTestBase<::testing::Test>;
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_CANVAS_TEST_H_
diff --git a/testing/dart_isolate_runner.cc b/testing/dart_isolate_runner.cc
index c0b42a3..d949751 100644
--- a/testing/dart_isolate_runner.cc
+++ b/testing/dart_isolate_runner.cc
@@ -8,8 +8,8 @@
 
 #include "flutter/runtime/isolate_configuration.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
+
 AutoIsolateShutdown::AutoIsolateShutdown(std::shared_ptr<DartIsolate> isolate,
                                          fml::RefPtr<fml::TaskRunner> runner)
     : isolate_(std::move(isolate)), runner_(std::move(runner)) {}
@@ -173,5 +173,4 @@
   return result;
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/dart_isolate_runner.h b/testing/dart_isolate_runner.h
index a6dac4c..c2459c7 100644
--- a/testing/dart_isolate_runner.h
+++ b/testing/dart_isolate_runner.h
@@ -14,8 +14,7 @@
 #include "flutter/runtime/dart_vm.h"
 #include "flutter/runtime/dart_vm_lifecycle.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 class AutoIsolateShutdown {
  public:
@@ -66,7 +65,6 @@
     fml::WeakPtr<IOManager> io_manager = {},
     std::unique_ptr<PlatformConfiguration> platform_configuration = nullptr);
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_DART_ISOLATE_RUNNER_H_
diff --git a/testing/debugger_detection.cc b/testing/debugger_detection.cc
index daea746..2a9dade 100644
--- a/testing/debugger_detection.cc
+++ b/testing/debugger_detection.cc
@@ -19,8 +19,7 @@
 #include <windows.h>
 #endif  // FML_OS_WIN
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 DebuggerStatus GetDebuggerStatus() {
 #if FML_OS_MACOSX
@@ -61,7 +60,6 @@
 #else
   return DebuggerStatus::kDontKnow;
 #endif
-}  // namespace testing
+}
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/debugger_detection.h b/testing/debugger_detection.h
index 7745cfb..48e0e57 100644
--- a/testing/debugger_detection.h
+++ b/testing/debugger_detection.h
@@ -7,8 +7,7 @@
 
 #include "flutter/fml/macros.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 enum class DebuggerStatus {
   kDontKnow,
@@ -17,7 +16,6 @@
 
 DebuggerStatus GetDebuggerStatus();
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_DEBUGGER_DETECTION_H_
diff --git a/testing/display_list_testing.cc b/testing/display_list_testing.cc
index 88bd51d..5f29f40 100644
--- a/testing/display_list_testing.cc
+++ b/testing/display_list_testing.cc
@@ -10,8 +10,7 @@
 #include "flutter/display_list/display_list.h"
 #include "flutter/display_list/effects/dl_image_filter.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 // clang-format off
 bool DisplayListsEQ_Verbose(const DisplayList* a, const DisplayList* b) {
@@ -37,8 +36,7 @@
   return true;
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 namespace std {
 
@@ -389,8 +387,7 @@
 
 }  // namespace std
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 std::ostream& DisplayListStreamDispatcher::startl() {
   for (int i = 0; i < cur_indent_; i++) {
@@ -978,5 +975,4 @@
 }
 // clang-format on
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/display_list_testing.h b/testing/display_list_testing.h
index 6dc8f81..8ffc5c0 100644
--- a/testing/display_list_testing.h
+++ b/testing/display_list_testing.h
@@ -11,8 +11,7 @@
 #include "flutter/display_list/display_list.h"
 #include "flutter/display_list/dl_op_receiver.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 [[nodiscard]] bool DisplayListsEQ_Verbose(const DisplayList* a,
                                           const DisplayList* b);
@@ -37,8 +36,7 @@
   return DisplayListsNE_Verbose(a.get(), b.get());
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 namespace std {
 
@@ -84,8 +82,7 @@
 
 }  // namespace std
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 class DisplayListStreamDispatcher final : public DlOpReceiver {
  public:
@@ -609,7 +606,6 @@
   uint32_t op_count_ = 0u;
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_DISPLAY_LIST_TESTING_H_
diff --git a/testing/elf_loader.cc b/testing/elf_loader.cc
index d420d84..d7cff00 100644
--- a/testing/elf_loader.cc
+++ b/testing/elf_loader.cc
@@ -11,8 +11,7 @@
 #include "flutter/runtime/dart_vm.h"
 #include "flutter/testing/testing.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 ELFAOTSymbols LoadELFSymbolFromFixturesIfNeccessary(std::string elf_filename) {
   if (!DartVM::IsRunningPrecompiledCode()) {
@@ -135,5 +134,4 @@
   return true;
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/elf_loader.h b/testing/elf_loader.h
index fb9ff47..6547ae7 100644
--- a/testing/elf_loader.h
+++ b/testing/elf_loader.h
@@ -11,8 +11,7 @@
 #include "flutter/fml/macros.h"
 #include "third_party/dart/runtime/bin/elf_loader.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 inline constexpr const char* kDefaultAOTAppELFFileName = "app_elf_snapshot.so";
 
@@ -81,7 +80,6 @@
 bool PrepareSettingsForAOTWithSymbols(Settings& settings,
                                       const ELFAOTSymbols& symbols);
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_ELF_LOADER_H_
diff --git a/testing/fixture_test.cc b/testing/fixture_test.cc
index dee7609..7d54779 100644
--- a/testing/fixture_test.cc
+++ b/testing/fixture_test.cc
@@ -8,8 +8,7 @@
 
 #include "flutter/testing/dart_fixture.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 FixtureTest::FixtureTest() : DartFixture() {}
 
@@ -20,5 +19,4 @@
                   std::move(elf_filename),
                   std::move(elf_split_filename)) {}
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/fixture_test.h b/testing/fixture_test.h
index f54bc80..df424f0 100644
--- a/testing/fixture_test.h
+++ b/testing/fixture_test.h
@@ -7,8 +7,7 @@
 
 #include "flutter/testing/dart_fixture.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 class FixtureTest : public DartFixture, public ThreadTest {
  public:
@@ -24,7 +23,6 @@
   FML_DISALLOW_COPY_AND_ASSIGN(FixtureTest);
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_FIXTURE_TEST_H_
diff --git a/testing/post_task_sync.cc b/testing/post_task_sync.cc
index 1a4b2a1..0861828 100644
--- a/testing/post_task_sync.cc
+++ b/testing/post_task_sync.cc
@@ -6,8 +6,7 @@
 
 #include "flutter/fml/synchronization/waitable_event.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 void PostTaskSync(const fml::RefPtr<fml::TaskRunner>& task_runner,
                   const std::function<void()>& function) {
@@ -19,5 +18,4 @@
   latch.Wait();
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/post_task_sync.h b/testing/post_task_sync.h
index ea9b64d..a551a48 100644
--- a/testing/post_task_sync.h
+++ b/testing/post_task_sync.h
@@ -7,13 +7,11 @@
 
 #include "flutter/fml/task_runner.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 void PostTaskSync(const fml::RefPtr<fml::TaskRunner>& task_runner,
                   const std::function<void()>& function);
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_POST_TASK_SYNC_H_
diff --git a/testing/stream_capture.cc b/testing/stream_capture.cc
index ed02282..a249e44 100644
--- a/testing/stream_capture.cc
+++ b/testing/stream_capture.cc
@@ -4,8 +4,7 @@
 
 #include "flutter/testing/stream_capture.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 StreamCapture::StreamCapture(std::ostream* ostream)
     : ostream_(ostream), old_buffer_(ostream_->rdbuf()) {
@@ -27,5 +26,4 @@
   return buffer_.str();
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/stream_capture.h b/testing/stream_capture.h
index 0b0db48..d19daab 100644
--- a/testing/stream_capture.h
+++ b/testing/stream_capture.h
@@ -9,8 +9,7 @@
 #include <sstream>
 #include <string>
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 // Temporarily replaces the specified stream's output buffer to capture output.
 //
@@ -41,7 +40,6 @@
   std::streambuf* old_buffer_;
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_STREAM_CAPTURE_H_
diff --git a/testing/test_args.cc b/testing/test_args.cc
index ace858c..60c077a 100644
--- a/testing/test_args.cc
+++ b/testing/test_args.cc
@@ -4,8 +4,7 @@
 
 #include "flutter/testing/test_args.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 static fml::CommandLine gProcessArgs;
 
@@ -17,5 +16,4 @@
   gProcessArgs = fml::CommandLineFromArgcArgv(argc, argv);
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_args.h b/testing/test_args.h
index 494359b..9b3ea25 100644
--- a/testing/test_args.h
+++ b/testing/test_args.h
@@ -7,14 +7,12 @@
 
 #include "flutter/fml/command_line.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 const fml::CommandLine& GetArgsForProcess();
 
 void SetArgsForProcess(int argc, char** argv);
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_ARGS_H_
diff --git a/testing/test_dart_native_resolver.cc b/testing/test_dart_native_resolver.cc
index b96371f..9c56a90 100644
--- a/testing/test_dart_native_resolver.cc
+++ b/testing/test_dart_native_resolver.cc
@@ -11,8 +11,7 @@
 #include "third_party/tonic/logging/dart_error.h"
 #include "tonic/converter/dart_converter.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 TestDartNativeResolver::TestDartNativeResolver() = default;
 
@@ -124,5 +123,4 @@
   }
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_dart_native_resolver.h b/testing/test_dart_native_resolver.h
index bd0a3fe..8717437 100644
--- a/testing/test_dart_native_resolver.h
+++ b/testing/test_dart_native_resolver.h
@@ -23,8 +23,7 @@
     return entrypoint;                                                      \
   })()
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 using NativeEntry = std::function<void(Dart_NativeArguments)>;
 
@@ -56,7 +55,6 @@
   FML_DISALLOW_COPY_AND_ASSIGN(TestDartNativeResolver);
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_DART_NATIVE_RESOLVER_H_
diff --git a/testing/test_gl_surface.cc b/testing/test_gl_surface.cc
index 198cdc0..d49c7ab 100644
--- a/testing/test_gl_surface.cc
+++ b/testing/test_gl_surface.cc
@@ -24,8 +24,7 @@
 #include "third_party/skia/include/gpu/ganesh/gl/GrGLDirectContext.h"
 #include "third_party/skia/include/gpu/ganesh/gl/GrGLTypes.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 static std::string GetEGLError() {
   std::stringstream stream;
@@ -433,5 +432,4 @@
   return result == EGL_TRUE;
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_gl_surface.h b/testing/test_gl_surface.h
index 437c718..12b14c9 100644
--- a/testing/test_gl_surface.h
+++ b/testing/test_gl_surface.h
@@ -12,8 +12,7 @@
 #include "third_party/skia/include/core/SkSurface.h"
 #include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 struct TestEGLContext {
   explicit TestEGLContext();
@@ -96,7 +95,6 @@
   FML_DISALLOW_COPY_AND_ASSIGN(TestGLSurface);
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_GL_SURFACE_H_
diff --git a/testing/test_metal_context.h b/testing/test_metal_context.h
index c0c8f8c..a0955f1 100644
--- a/testing/test_metal_context.h
+++ b/testing/test_metal_context.h
@@ -12,7 +12,7 @@
 #include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
 #include "third_party/skia/include/ports/SkCFObject.h"
 
-namespace flutter {
+namespace flutter::testing {
 
 struct MetalObjCFields;
 
@@ -48,6 +48,6 @@
   std::map<int64_t, sk_cfp<void*>> textures_;  // guarded by textures_mutex
 };
 
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_METAL_CONTEXT_H_
diff --git a/testing/test_metal_context.mm b/testing/test_metal_context.mm
index 38f5156..4301a0a 100644
--- a/testing/test_metal_context.mm
+++ b/testing/test_metal_context.mm
@@ -15,7 +15,7 @@
 
 static_assert(__has_feature(objc_arc), "ARC must be enabled.");
 
-namespace flutter {
+namespace flutter::testing {
 
 // TOOD(cbracken): https://github.com/flutter/flutter/issues/157942
 struct MetalObjCFields {
@@ -133,4 +133,4 @@
   }
 }
 
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_metal_surface.h b/testing/test_metal_surface.h
index 9d1698c..44441d8 100644
--- a/testing/test_metal_surface.h
+++ b/testing/test_metal_surface.h
@@ -11,7 +11,7 @@
 #include "third_party/skia/include/core/SkSurface.h"
 #include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
 
-namespace flutter {
+namespace flutter::testing {
 
 //------------------------------------------------------------------------------
 /// @brief      Creates a MTLTexture backed SkSurface and context that can be
@@ -53,6 +53,6 @@
   FML_DISALLOW_COPY_AND_ASSIGN(TestMetalSurface);
 };
 
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_METAL_SURFACE_H_
diff --git a/testing/test_metal_surface.mm b/testing/test_metal_surface.mm
index 8aa4b0d..43f67f8 100644
--- a/testing/test_metal_surface.mm
+++ b/testing/test_metal_surface.mm
@@ -9,7 +9,7 @@
 
 #include "third_party/skia/include/core/SkSurface.h"
 
-namespace flutter {
+namespace flutter::testing {
 
 bool TestMetalSurface::PlatformSupportsMetal() {
   return true;
@@ -52,4 +52,4 @@
   return impl_ ? impl_->GetTextureInfo() : TestMetalContext::TextureInfo();
 }
 
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_metal_surface_impl.h b/testing/test_metal_surface_impl.h
index fb96891..c3fdea2 100644
--- a/testing/test_metal_surface_impl.h
+++ b/testing/test_metal_surface_impl.h
@@ -11,7 +11,7 @@
 
 #include "third_party/skia/include/core/SkSurface.h"
 
-namespace flutter {
+namespace flutter::testing {
 
 class TestMetalSurfaceImpl : public TestMetalSurface {
  public:
@@ -52,6 +52,6 @@
   FML_DISALLOW_COPY_AND_ASSIGN(TestMetalSurfaceImpl);
 };
 
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_METAL_SURFACE_IMPL_H_
diff --git a/testing/test_metal_surface_impl.mm b/testing/test_metal_surface_impl.mm
index 8aac974..85e7450 100644
--- a/testing/test_metal_surface_impl.mm
+++ b/testing/test_metal_surface_impl.mm
@@ -22,7 +22,7 @@
 
 static_assert(__has_feature(objc_arc), "ARC must be enabled.");
 
-namespace flutter {
+namespace flutter::testing {
 
 void TestMetalSurfaceImpl::Init(const TestMetalContext::TextureInfo& texture_info,
                                 const SkISize& surface_size) {
@@ -121,4 +121,4 @@
   return IsValid() ? texture_info_ : TestMetalContext::TextureInfo();
 }
 
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_metal_surface_unittests.mm b/testing/test_metal_surface_unittests.mm
index 69bb436..975e4b0 100644
--- a/testing/test_metal_surface_unittests.mm
+++ b/testing/test_metal_surface_unittests.mm
@@ -6,8 +6,7 @@
 #include "flutter/testing/test_metal_surface.h"
 #include "flutter/testing/testing.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 #ifdef SHELL_ENABLE_METAL
 
@@ -37,5 +36,4 @@
 
 #endif
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_timeout_listener.cc b/testing/test_timeout_listener.cc
index 1163c92..afe4425 100644
--- a/testing/test_timeout_listener.cc
+++ b/testing/test_timeout_listener.cc
@@ -7,8 +7,7 @@
 #include <map>
 #include <sstream>
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 class PendingTests : public std::enable_shared_from_this<PendingTests> {
  public:
@@ -120,5 +119,4 @@
       });
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_timeout_listener.h b/testing/test_timeout_listener.h
index e6f466d..3a3872a 100644
--- a/testing/test_timeout_listener.h
+++ b/testing/test_timeout_listener.h
@@ -12,8 +12,7 @@
 #include "flutter/fml/thread.h"
 #include "flutter/testing/testing.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 class PendingTests;
 
@@ -38,7 +37,6 @@
   FML_DISALLOW_COPY_AND_ASSIGN(TestTimeoutListener);
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_TIMEOUT_LISTENER_H_
diff --git a/testing/test_vulkan_context.cc b/testing/test_vulkan_context.cc
index 084ac16..b600707 100644
--- a/testing/test_vulkan_context.cc
+++ b/testing/test_vulkan_context.cc
@@ -22,8 +22,7 @@
 #include "third_party/skia/include/gpu/vk/VulkanExtensions.h"
 #include "vulkan/vulkan_core.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 TestVulkanContext::TestVulkanContext() {
   // ---------------------------------------------------------------------------
@@ -185,5 +184,4 @@
   return context_;
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_vulkan_context.h b/testing/test_vulkan_context.h
index ff82a85..25a9d03 100644
--- a/testing/test_vulkan_context.h
+++ b/testing/test_vulkan_context.h
@@ -15,8 +15,7 @@
 #include "third_party/skia/include/core/SkSize.h"
 #include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 class TestVulkanContext : public fml::RefCountedThreadSafe<TestVulkanContext> {
  public:
@@ -42,7 +41,6 @@
   FML_DISALLOW_COPY_AND_ASSIGN(TestVulkanContext);
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_VULKAN_CONTEXT_H_
diff --git a/testing/test_vulkan_image.cc b/testing/test_vulkan_image.cc
index 4c36541..b1c04d5 100644
--- a/testing/test_vulkan_image.cc
+++ b/testing/test_vulkan_image.cc
@@ -6,8 +6,7 @@
 
 #include "flutter/testing/test_vulkan_context.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 TestVulkanImage::TestVulkanImage() = default;
 
@@ -20,5 +19,4 @@
   return image_;
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_vulkan_image.h b/testing/test_vulkan_image.h
index e0a030c..53ba687 100644
--- a/testing/test_vulkan_image.h
+++ b/testing/test_vulkan_image.h
@@ -11,8 +11,7 @@
 #include "flutter/vulkan/procs/vulkan_handle.h"
 #include "third_party/skia/include/core/SkSize.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 class TestVulkanContext;
 
@@ -40,7 +39,6 @@
   friend TestVulkanContext;
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_VULKAN_IMAGE_H_
diff --git a/testing/test_vulkan_surface.cc b/testing/test_vulkan_surface.cc
index b8c8cd1..1c68f7a 100644
--- a/testing/test_vulkan_surface.cc
+++ b/testing/test_vulkan_surface.cc
@@ -16,8 +16,7 @@
 #include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h"
 #include "third_party/skia/include/gpu/ganesh/vk/GrVkTypes.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 TestVulkanSurface::TestVulkanSurface(TestVulkanImage&& image)
     : image_(std::move(image)){};
@@ -110,5 +109,4 @@
   return image_.GetImage();
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/test_vulkan_surface.h b/testing/test_vulkan_surface.h
index 51bed5b..f889f9f 100644
--- a/testing/test_vulkan_surface.h
+++ b/testing/test_vulkan_surface.h
@@ -13,9 +13,7 @@
 #include "third_party/skia/include/core/SkSurface.h"
 #include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
 
-namespace flutter {
-
-namespace testing {
+namespace flutter::testing {
 
 class TestVulkanSurface {
  public:
@@ -36,7 +34,6 @@
   sk_sp<SkSurface> surface_;
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TEST_VULKAN_SURFACE_H_
diff --git a/testing/testing.cc b/testing/testing.cc
index a12f615..6fb2f4e 100644
--- a/testing/testing.cc
+++ b/testing/testing.cc
@@ -9,8 +9,7 @@
 #include "flutter/fml/file.h"
 #include "flutter/fml/paths.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 std::string GetCurrentTestName() {
   return ::testing::UnitTest::GetInstance()->current_test_info()->name();
@@ -121,5 +120,4 @@
   return MemsetPatternSetOrCheck(buffer.data(), buffer.size(), op);
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/testing.h b/testing/testing.h
index 369f66f..7a14ef2 100644
--- a/testing/testing.h
+++ b/testing/testing.h
@@ -14,8 +14,7 @@
 #include "gtest/gtest.h"
 #include "third_party/skia/include/core/SkData.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 const char* GetSourcePath();
 
@@ -115,7 +114,6 @@
 
 bool MemsetPatternSetOrCheck(std::vector<uint8_t>& buffer, MemsetPatternOp op);
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_TESTING_H_
diff --git a/testing/thread_test.cc b/testing/thread_test.cc
index 64b082f..1cfcfbb 100644
--- a/testing/thread_test.cc
+++ b/testing/thread_test.cc
@@ -6,8 +6,8 @@
 
 #include "flutter/testing/thread_test.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
+
 namespace {
 
 fml::RefPtr<fml::TaskRunner> GetDefaultTaskRunner() {
@@ -31,5 +31,4 @@
   return runner;
 }
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
diff --git a/testing/thread_test.h b/testing/thread_test.h
index 995bd45..1ba0431 100644
--- a/testing/thread_test.h
+++ b/testing/thread_test.h
@@ -14,8 +14,7 @@
 #include "flutter/fml/thread.h"
 #include "gtest/gtest.h"
 
-namespace flutter {
-namespace testing {
+namespace flutter::testing {
 
 //------------------------------------------------------------------------------
 /// @brief      A fixture that creates threads with running message loops that
@@ -65,7 +64,6 @@
   FML_DISALLOW_COPY_AND_ASSIGN(ThreadTest);
 };
 
-}  // namespace testing
-}  // namespace flutter
+}  // namespace flutter::testing
 
 #endif  // FLUTTER_TESTING_THREAD_TEST_H_