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

Unified Diff: remoting/host/chromeos/clipboard_aura_unittest.cc

Issue 923773003: Revert of Remove dependency on content from remoting_host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/chromeos/clipboard_aura.cc ('k') | remoting/host/chromoting_host_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromeos/clipboard_aura_unittest.cc
diff --git a/remoting/host/chromeos/clipboard_aura_unittest.cc b/remoting/host/chromeos/clipboard_aura_unittest.cc
index 66836b6e42047aa708c03658b66b8189758f8160..5201c11ee4276565168bb07f82572156fda95bf7 100644
--- a/remoting/host/chromeos/clipboard_aura_unittest.cc
+++ b/remoting/host/chromeos/clipboard_aura_unittest.cc
@@ -55,6 +55,7 @@
void StopAndResetClipboard();
base::MessageLoopForUI message_loop_;
+ base::RunLoop run_loop_;
ClientClipboard* client_clipboard_;
scoped_ptr<ClipboardAura> clipboard_;
};
@@ -70,13 +71,12 @@
scoped_refptr<base::SingleThreadTaskRunner> task_runner =
message_loop_.message_loop_proxy();
client_clipboard_ = new ClientClipboard();
- clipboard_.reset(new ClipboardAura());
+ clipboard_.reset(new ClipboardAura(task_runner));
+ clipboard_->Start(make_scoped_ptr(client_clipboard_));
EXPECT_GT(TestTimeouts::tiny_timeout(), kTestOverridePollingInterval * 10)
<< "The test timeout should be greater than the polling interval";
clipboard_->SetPollingIntervalForTesting(kTestOverridePollingInterval);
-
- clipboard_->Start(make_scoped_ptr(client_clipboard_));
}
void ClipboardAuraTest::TearDown() {
@@ -95,7 +95,7 @@
clipboard_->InjectClipboardEvent(event);
StopAndResetClipboard();
- base::RunLoop().RunUntilIdle();
+ run_loop_.RunUntilIdle();
std::string clipboard_data;
ui::Clipboard* aura_clipboard = ui::Clipboard::GetForCurrentThread();
@@ -106,8 +106,6 @@
}
TEST_F(ClipboardAuraTest, MonitorClipboardChanges) {
- base::RunLoop().RunUntilIdle();
-
{
// |clipboard_writer| will write to the clipboard when it goes out of scope.
ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_COPY_PASTE);
@@ -118,15 +116,14 @@
InjectClipboardEvent(Property(&protocol::ClipboardEvent::data,
Eq("Test data.")))).Times(1);
- base::RunLoop run_loop;
message_loop_.PostDelayedTask(
FROM_HERE, base::Bind(&ClipboardAuraTest_MonitorClipboardChanges_Test::
StopAndResetClipboard,
base::Unretained(this)),
TestTimeouts::tiny_timeout());
- message_loop_.PostDelayedTask(FROM_HERE, run_loop.QuitClosure(),
+ message_loop_.PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(),
TestTimeouts::tiny_timeout());
- run_loop.Run();
+ message_loop_.Run();
}
} // namespace remoting
« no previous file with comments | « remoting/host/chromeos/clipboard_aura.cc ('k') | remoting/host/chromoting_host_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698