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

Unified Diff: remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc

Issue 2310303002: Moving It2Me confirmation prompt into the Validation callback flow (Closed)
Patch Set: Addressing CR Feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/it2me/it2me_confirmation_dialog_proxy.cc ('k') | remoting/host/it2me/it2me_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc b/remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc
index 79f78d80058311c75f5cbb82eca84a28a63ef124..9e4ef749b1572c93be9ffada45490fc0efe478a7 100644
--- a/remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc
+++ b/remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc
@@ -20,6 +20,10 @@ using ::testing::CreateFunctor;
namespace remoting {
+namespace {
+const char kTestEmailAddress[] = "faux_remote_user@chromium_test.com";
+} // namespace
+
class StubIt2MeConfirmationDialog : public It2MeConfirmationDialog {
public:
explicit StubIt2MeConfirmationDialog(
@@ -38,9 +42,11 @@ class StubIt2MeConfirmationDialog : public It2MeConfirmationDialog {
MOCK_METHOD0(OnShow, void());
// It2MeConfirmationDialog implementation.
- void Show(const ResultCallback& callback) override {
+ void Show(const std::string& remote_user_email,
+ const ResultCallback& callback) override {
EXPECT_TRUE(callback_.is_null());
EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
+ EXPECT_EQ(remote_user_email.compare(kTestEmailAddress), 0);
callback_ = callback;
OnShow();
}
@@ -141,7 +147,7 @@ TEST_F(It2MeConfirmationDialogProxyTest, Show) {
.WillOnce(
InvokeWithoutArgs(this, &It2MeConfirmationDialogProxyTest::Quit));
- dialog_proxy()->Show(callback_target.MakeCallback());
+ dialog_proxy()->Show(kTestEmailAddress, callback_target.MakeCallback());
Run();
}
« no previous file with comments | « remoting/host/it2me/it2me_confirmation_dialog_proxy.cc ('k') | remoting/host/it2me/it2me_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698