OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/exo/wayland/server.h" | 5 #include "components/exo/wayland/server.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <wayland-client-core.h> | 9 #include <wayland-client-core.h> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 g_next_socket_id.GetNext()); | 30 g_next_socket_id.GetNext()); |
31 } | 31 } |
32 | 32 |
33 class ServerTest : public testing::Test { | 33 class ServerTest : public testing::Test { |
34 public: | 34 public: |
35 ServerTest() {} | 35 ServerTest() {} |
36 ~ServerTest() override {} | 36 ~ServerTest() override {} |
37 | 37 |
38 void SetUp() override { | 38 void SetUp() override { |
39 ASSERT_TRUE(xdg_temp_dir_.CreateUniqueTempDir()); | 39 ASSERT_TRUE(xdg_temp_dir_.CreateUniqueTempDir()); |
40 setenv("XDG_RUNTIME_DIR", xdg_temp_dir_.path().MaybeAsASCII().c_str(), | 40 setenv("XDG_RUNTIME_DIR", xdg_temp_dir_.GetPath().MaybeAsASCII().c_str(), |
41 1 /* overwrite */); | 41 1 /* overwrite */); |
42 testing::Test::SetUp(); | 42 testing::Test::SetUp(); |
43 } | 43 } |
44 | 44 |
45 private: | 45 private: |
46 base::ScopedTempDir xdg_temp_dir_; | 46 base::ScopedTempDir xdg_temp_dir_; |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(ServerTest); | 48 DISALLOW_COPY_AND_ASSIGN(ServerTest); |
49 }; | 49 }; |
50 | 50 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 bool rv = server->AddSocket(GetUniqueSocketName()); | 112 bool rv = server->AddSocket(GetUniqueSocketName()); |
113 EXPECT_TRUE(rv); | 113 EXPECT_TRUE(rv); |
114 | 114 |
115 // Just call Flush to check that it doesn't have any bad side-effects. | 115 // Just call Flush to check that it doesn't have any bad side-effects. |
116 server->Flush(); | 116 server->Flush(); |
117 } | 117 } |
118 | 118 |
119 } // namespace | 119 } // namespace |
120 } // namespace wayland | 120 } // namespace wayland |
121 } // namespace exo | 121 } // namespace exo |
OLD | NEW |