| 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 "chrome/test/remoting/remote_desktop_browsertest.h" | 5 #include "chrome/test/remoting/remote_desktop_browsertest.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/extensions/unpacked_installer.h" | 9 #include "chrome/browser/extensions/unpacked_installer.h" |
| 10 #include "chrome/browser/ui/extensions/application_launch.h" | 10 #include "chrome/browser/ui/extensions/application_launch.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 ASSERT_TRUE(code != NULL); | 392 ASSERT_TRUE(code != NULL); |
| 393 SimulateKeyPressWithCode(keyboard_code, code, false, shift, false, false); | 393 SimulateKeyPressWithCode(keyboard_code, code, false, shift, false, false); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void RemoteDesktopBrowserTest::SimulateStringInput(const std::string& input) { | 396 void RemoteDesktopBrowserTest::SimulateStringInput(const std::string& input) { |
| 397 for (size_t i = 0; i < input.length(); ++i) | 397 for (size_t i = 0; i < input.length(); ++i) |
| 398 SimulateCharInput(input[i]); | 398 SimulateCharInput(input[i]); |
| 399 } | 399 } |
| 400 | 400 |
| 401 void RemoteDesktopBrowserTest::SimulateMouseLeftClickAt(int x, int y) { | 401 void RemoteDesktopBrowserTest::SimulateMouseLeftClickAt(int x, int y) { |
| 402 SimulateMouseClickAt(0, WebKit::WebMouseEvent::ButtonLeft, x, y); | 402 SimulateMouseClickAt(0, blink::WebMouseEvent::ButtonLeft, x, y); |
| 403 } | 403 } |
| 404 | 404 |
| 405 void RemoteDesktopBrowserTest::SimulateMouseClickAt( | 405 void RemoteDesktopBrowserTest::SimulateMouseClickAt( |
| 406 int modifiers, WebKit::WebMouseEvent::Button button, int x, int y) { | 406 int modifiers, blink::WebMouseEvent::Button button, int x, int y) { |
| 407 // TODO(weitaosu): The coordinate translation doesn't work correctly for | 407 // TODO(weitaosu): The coordinate translation doesn't work correctly for |
| 408 // apps v2. | 408 // apps v2. |
| 409 ExecuteScript( | 409 ExecuteScript( |
| 410 "var clientPluginElement = " | 410 "var clientPluginElement = " |
| 411 "document.getElementById('session-client-plugin');" | 411 "document.getElementById('session-client-plugin');" |
| 412 "var clientPluginRect = clientPluginElement.getBoundingClientRect();"); | 412 "var clientPluginRect = clientPluginElement.getBoundingClientRect();"); |
| 413 | 413 |
| 414 int top = ExecuteScriptAndExtractInt("clientPluginRect.top"); | 414 int top = ExecuteScriptAndExtractInt("clientPluginRect.top"); |
| 415 int left = ExecuteScriptAndExtractInt("clientPluginRect.left"); | 415 int left = ExecuteScriptAndExtractInt("clientPluginRect.left"); |
| 416 int width = ExecuteScriptAndExtractInt("clientPluginRect.width"); | 416 int width = ExecuteScriptAndExtractInt("clientPluginRect.width"); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 } | 688 } |
| 689 | 689 |
| 690 // static | 690 // static |
| 691 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow( | 691 bool RemoteDesktopBrowserTest::IsAuthenticatedInWindow( |
| 692 content::WebContents* web_contents) { | 692 content::WebContents* web_contents) { |
| 693 return ExecuteScriptAndExtractBool( | 693 return ExecuteScriptAndExtractBool( |
| 694 web_contents, "remoting.identity.isAuthenticated()"); | 694 web_contents, "remoting.identity.isAuthenticated()"); |
| 695 } | 695 } |
| 696 | 696 |
| 697 } // namespace remoting | 697 } // namespace remoting |
| OLD | NEW |