Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: remoting/host/chromeos/clipboard_aura_unittest.cc

Issue 2315883002: Remove calls to deprecated MessageLoop methods in remoting. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698