1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "mojo/public/cpp/base/file_path_mojom_traits.h" 6 #include "mojo/public/cpp/test_support/test_utils.h" 7 #include "mojo/public/mojom/base/file_path.mojom.h" 8 #include "testing/gtest/include/gtest/gtest.h" 9 10 namespace mojo_base { 11 namespace file_path_unittest { 12 TEST(FilePathTest,File)13TEST(FilePathTest, File) { 14 base::FilePath dir(FILE_PATH_LITERAL("hello")); 15 base::FilePath file = dir.Append(FILE_PATH_LITERAL("world")); 16 base::FilePath file_out; 17 18 ASSERT_TRUE( 19 mojo::test::SerializeAndDeserialize<mojom::FilePath>(&file, &file_out)); 20 ASSERT_EQ(file, file_out); 21 } 22 23 } // namespace file_path_unittest 24 } // namespace mojo_base 25