| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "remoting/host/chromeos/clipboard_aura.h" | 5 #include "remoting/host/chromeos/clipboard_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // |clipboard_writer| will write to the clipboard when it goes out of scope. | 113 // |clipboard_writer| will write to the clipboard when it goes out of scope. |
| 114 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_COPY_PASTE); | 114 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_COPY_PASTE); |
| 115 clipboard_writer.WriteText(base::UTF8ToUTF16("Test data.")); | 115 clipboard_writer.WriteText(base::UTF8ToUTF16("Test data.")); |
| 116 } | 116 } |
| 117 | 117 |
| 118 EXPECT_CALL(*client_clipboard_, | 118 EXPECT_CALL(*client_clipboard_, |
| 119 InjectClipboardEvent(Property(&protocol::ClipboardEvent::data, | 119 InjectClipboardEvent(Property(&protocol::ClipboardEvent::data, |
| 120 Eq("Test data.")))).Times(1); | 120 Eq("Test data.")))).Times(1); |
| 121 | 121 |
| 122 base::RunLoop run_loop; | 122 base::RunLoop run_loop; |
| 123 message_loop_.PostDelayedTask( | 123 message_loop_.task_runner()->PostDelayedTask( |
| 124 FROM_HERE, base::Bind(&ClipboardAuraTest_MonitorClipboardChanges_Test:: | 124 FROM_HERE, base::Bind(&ClipboardAuraTest_MonitorClipboardChanges_Test:: |
| 125 StopAndResetClipboard, | 125 StopAndResetClipboard, |
| 126 base::Unretained(this)), | 126 base::Unretained(this)), |
| 127 TestTimeouts::tiny_timeout()); | 127 TestTimeouts::tiny_timeout()); |
| 128 message_loop_.PostDelayedTask(FROM_HERE, run_loop.QuitClosure(), | 128 message_loop_.task_runner()->PostDelayedTask( |
| 129 TestTimeouts::tiny_timeout()); | 129 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::tiny_timeout()); |
| 130 run_loop.Run(); | 130 run_loop.Run(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace remoting | 133 } // namespace remoting |
| OLD | NEW |