| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_path.h" | 5 #include "base/file_path.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 virtual void TearDown() { | 95 virtual void TearDown() { |
| 96 CloseSessions(); | 96 CloseSessions(); |
| 97 thread_.message_loop()->PostTask( | 97 thread_.message_loop()->PostTask( |
| 98 FROM_HERE, NewRunnableMethod( | 98 FROM_HERE, NewRunnableMethod( |
| 99 this, &JingleSessionTest::DoCloseSessionManager)); | 99 this, &JingleSessionTest::DoCloseSessionManager)); |
| 100 thread_.Stop(); | 100 thread_.Stop(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void CreateServerPair() { | 103 void CreateServerPair() { |
| 104 // SessionManagerPair must be initialized on the jingle thread. | 104 // Sessions must be initialized on the jingle thread. |
| 105 thread_.message_loop()->PostTask( | 105 thread_.message_loop()->PostTask( |
| 106 FROM_HERE, NewRunnableMethod( | 106 FROM_HERE, NewRunnableMethod( |
| 107 this, &JingleSessionTest::DoCreateServerPair)); | 107 this, &JingleSessionTest::DoCreateServerPair)); |
| 108 SyncWithJingleThread(); | 108 SyncWithJingleThread(); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void CloseSessions() { | 111 void CloseSessions() { |
| 112 thread_.message_loop()->PostTask( | 112 thread_.message_loop()->PostTask( |
| 113 FROM_HERE, NewRunnableMethod( | 113 FROM_HERE, NewRunnableMethod( |
| 114 this, &JingleSessionTest::DoCloseSessions)); | 114 this, &JingleSessionTest::DoCloseSessions)); |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 << tester->GetElapsedTime().InMilliseconds() << " ms."; | 747 << tester->GetElapsedTime().InMilliseconds() << " ms."; |
| 748 | 748 |
| 749 // Connections must be closed while |tester| still exists. | 749 // Connections must be closed while |tester| still exists. |
| 750 CloseSessions(); | 750 CloseSessions(); |
| 751 } | 751 } |
| 752 | 752 |
| 753 #endif | 753 #endif |
| 754 | 754 |
| 755 } // namespace protocol | 755 } // namespace protocol |
| 756 } // namespace remoting | 756 } // namespace remoting |
| OLD | NEW |