OLD | NEW |
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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.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 15 matching lines...) Expand all Loading... |
26 javascript)); | 26 javascript)); |
27 bool result = waiter.Wait(); | 27 bool result = waiter.Wait(); |
28 // Entering or leaving full-screen mode causes local and remote desktop | 28 // Entering or leaving full-screen mode causes local and remote desktop |
29 // reconfigurations that can take a while to settle down, so wait a few | 29 // reconfigurations that can take a while to settle down, so wait a few |
30 // seconds before continuing. | 30 // seconds before continuing. |
31 TimeoutWaiter(base::TimeDelta::FromSeconds(10)).Wait(); | 31 TimeoutWaiter(base::TimeDelta::FromSeconds(10)).Wait(); |
32 return result; | 32 return result; |
33 } | 33 } |
34 | 34 |
35 IN_PROC_BROWSER_TEST_F(FullscreenBrowserTest, MANUAL_Me2Me_Fullscreen) { | 35 IN_PROC_BROWSER_TEST_F(FullscreenBrowserTest, MANUAL_Me2Me_Fullscreen) { |
36 SetUpTestForMe2Me(); | 36 SetUpTest(); |
37 ConnectToLocalHost(false); | 37 ConnectToLocalHost(false); |
38 | 38 |
39 // Verify that we're initially not full-screen. | 39 // Verify that we're initially not full-screen. |
40 EXPECT_FALSE(ExecuteScriptAndExtractBool( | 40 EXPECT_FALSE(ExecuteScriptAndExtractBool( |
41 "remoting.fullscreen.isActive()")); | 41 "remoting.fullscreen.isActive()")); |
42 | 42 |
43 // Click the full-screen button and verify that it activates full-screen mode. | 43 // Click the full-screen button and verify that it activates full-screen mode. |
44 ClickOnControl("toggle-full-screen"); | 44 ClickOnControl("toggle-full-screen"); |
45 EXPECT_TRUE(WaitForFullscreenChange(true)); | 45 EXPECT_TRUE(WaitForFullscreenChange(true)); |
46 | 46 |
47 // Click the full-screen button again and verify that it deactivates | 47 // Click the full-screen button again and verify that it deactivates |
48 // full-screen mode. | 48 // full-screen mode. |
49 ClickOnControl("toggle-full-screen"); | 49 ClickOnControl("toggle-full-screen"); |
50 EXPECT_TRUE(WaitForFullscreenChange(false)); | 50 EXPECT_TRUE(WaitForFullscreenChange(false)); |
51 | 51 |
52 // Enter full-screen mode again, then disconnect and verify that full-screen | 52 // Enter full-screen mode again, then disconnect and verify that full-screen |
53 // mode is deactivated upon disconnection. | 53 // mode is deactivated upon disconnection. |
54 // TODO(jamiewalch): For the v2 app, activate full-screen mode indirectly by | 54 // TODO(jamiewalch): For the v2 app, activate full-screen mode indirectly by |
55 // maximizing the window for the second test. | 55 // maximizing the window for the second test. |
56 ClickOnControl("toggle-full-screen"); | 56 ClickOnControl("toggle-full-screen"); |
57 EXPECT_TRUE(WaitForFullscreenChange(true)); | 57 EXPECT_TRUE(WaitForFullscreenChange(true)); |
58 DisconnectMe2Me(); | 58 DisconnectMe2Me(); |
59 EXPECT_TRUE(WaitForFullscreenChange(false)); | 59 EXPECT_TRUE(WaitForFullscreenChange(false)); |
60 | 60 |
61 Cleanup(); | 61 Cleanup(); |
62 } | 62 } |
63 | 63 |
64 IN_PROC_BROWSER_TEST_F(FullscreenBrowserTest, MANUAL_Me2Me_Bump_Scroll) { | 64 IN_PROC_BROWSER_TEST_F(FullscreenBrowserTest, MANUAL_Me2Me_Bump_Scroll) { |
65 SetUpTestForMe2Me(); | 65 content::WebContents* content = SetUpTest(); |
66 | |
67 content::WebContents* content = app_web_content(); | |
68 LoadScript(content, FILE_PATH_LITERAL("bump_scroll_browser_test.js")); | 66 LoadScript(content, FILE_PATH_LITERAL("bump_scroll_browser_test.js")); |
69 | 67 |
70 RunJavaScriptTest(content, "Bump_Scroll", "{pin: '" + me2me_pin() + "'}"); | 68 RunJavaScriptTest(content, "Bump_Scroll", "{pin: '" + me2me_pin() + "'}"); |
71 | 69 |
72 Cleanup(); | 70 Cleanup(); |
73 } | 71 } |
74 | 72 |
75 } // namespace remoting | 73 } // namespace remoting |
OLD | NEW |