| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "chrome/test/remoting/remote_desktop_browsertest.h" | 7 #include "chrome/test/remoting/remote_desktop_browsertest.h" |
| 8 #include "chrome/test/remoting/waiter.h" | 8 #include "chrome/test/remoting/waiter.h" |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Typing a command which writes to a temp file and then verify the contents of | 80 // Typing a command which writes to a temp file and then verify the contents of |
| 81 // the file. | 81 // the file. |
| 82 void Me2MeBrowserTest::TestKeyboardInput() { | 82 void Me2MeBrowserTest::TestKeyboardInput() { |
| 83 // Start a terminal window with ctrl+alt+T | 83 // Start a terminal window with ctrl+alt+T |
| 84 SimulateKeyPressWithCode(ui::VKEY_T, "KeyT", true, false, true, false); | 84 SimulateKeyPressWithCode(ui::VKEY_T, "KeyT", true, false, true, false); |
| 85 | 85 |
| 86 // Wait for the keyboard events to be sent to and processed by the host. | 86 // Wait for the keyboard events to be sent to and processed by the host. |
| 87 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromMilliseconds(300)).Wait()); | 87 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromMilliseconds(300)).Wait()); |
| 88 | 88 |
| 89 base::FilePath temp_file; | 89 base::FilePath temp_file; |
| 90 EXPECT_TRUE(file_util::CreateTemporaryFile(&temp_file)); | 90 EXPECT_TRUE(base::CreateTemporaryFile(&temp_file)); |
| 91 | 91 |
| 92 // Write some text into the temp file. | 92 // Write some text into the temp file. |
| 93 std::string text = "Abigail"; | 93 std::string text = "Abigail"; |
| 94 std::string command = "echo -n " + text + " > " + | 94 std::string command = "echo -n " + text + " > " + |
| 95 temp_file.MaybeAsASCII() + "\n"; | 95 temp_file.MaybeAsASCII() + "\n"; |
| 96 SimulateStringInput(command); | 96 SimulateStringInput(command); |
| 97 SimulateStringInput("exit\n"); | 97 SimulateStringInput("exit\n"); |
| 98 | 98 |
| 99 // Wait for the keyboard events to be sent to and processed by the host. | 99 // Wait for the keyboard events to be sent to and processed by the host. |
| 100 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(1)).Wait()); | 100 ASSERT_TRUE(TimeoutWaiter(base::TimeDelta::FromSeconds(1)).Wait()); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 ClickOnControl("close-paired-client-manager-dialog"); | 159 ClickOnControl("close-paired-client-manager-dialog"); |
| 160 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-dialog")); | 160 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-dialog")); |
| 161 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-message")); | 161 ASSERT_FALSE(HtmlElementVisible("paired-client-manager-message")); |
| 162 } | 162 } |
| 163 | 163 |
| 164 bool Me2MeBrowserTest::IsPairingSpinnerHidden() { | 164 bool Me2MeBrowserTest::IsPairingSpinnerHidden() { |
| 165 return !HtmlElementVisible("paired-client-manager-dialog-working"); | 165 return !HtmlElementVisible("paired-client-manager-dialog-working"); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace remoting | 168 } // namespace remoting |
| OLD | NEW |