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

Side by Side Diff: chrome/test/remoting/it2me_browsertest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 unified diff | Download patch
OLDNEW
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "chrome/test/remoting/remote_desktop_browsertest.h" 8 #include "chrome/test/remoting/remote_desktop_browsertest.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 class It2MeBrowserTest : public RemoteDesktopBrowserTest { 12 class It2MeBrowserTest : public RemoteDesktopBrowserTest {
13 protected: 13 protected:
14 std::string GetAccessCode(content::WebContents* contents); 14 std::string GetAccessCode(content::WebContents* contents);
15 15
16 // Launches a Chromoting app instance for the helper. 16 // Launches a Chromoting app instance for the helper.
17 content::WebContents* SetUpHelperInstance(); 17 content::WebContents* SetUpHelperInstance();
18 }; 18 };
19 19
20 std::string It2MeBrowserTest::GetAccessCode(content::WebContents* contents) { 20 std::string It2MeBrowserTest::GetAccessCode(content::WebContents* contents) {
21 RunJavaScriptTest(contents, "GetAccessCode", "{}"); 21 RunJavaScriptTest(contents, "GetAccessCode", "{}");
22 std::string access_code = RemoteTestHelper::ExecuteScriptAndExtractString( 22 std::string access_code = RemoteTestHelper::ExecuteScriptAndExtractString(
23 contents, "document.getElementById('access-code-display').innerText"); 23 contents, "document.getElementById('access-code-display').innerText");
24 return access_code; 24 return access_code;
25 } 25 }
26 26
27 content::WebContents* It2MeBrowserTest::SetUpHelperInstance() { 27 content::WebContents* It2MeBrowserTest::SetUpHelperInstance() {
28 content::WebContents* helper_content = 28 content::WebContents* helper_content =
29 LaunchChromotingApp(false, NEW_FOREGROUND_TAB); 29 LaunchChromotingApp(false, WindowOpenDisposition::NEW_FOREGROUND_TAB);
30 LoadBrowserTestJavaScript(helper_content); 30 LoadBrowserTestJavaScript(helper_content);
31 LoadScript(helper_content, FILE_PATH_LITERAL("it2me_browser_test.js")); 31 LoadScript(helper_content, FILE_PATH_LITERAL("it2me_browser_test.js"));
32 return helper_content; 32 return helper_content;
33 } 33 }
34 34
35 IN_PROC_BROWSER_TEST_F(It2MeBrowserTest, MANUAL_Connect) { 35 IN_PROC_BROWSER_TEST_F(It2MeBrowserTest, MANUAL_Connect) {
36 content::WebContents* helpee_content = SetUpTest(); 36 content::WebContents* helpee_content = SetUpTest();
37 LoadScript(helpee_content, FILE_PATH_LITERAL("it2me_browser_test.js")); 37 LoadScript(helpee_content, FILE_PATH_LITERAL("it2me_browser_test.js"));
38 38
39 content::WebContents* helper_content = SetUpHelperInstance(); 39 content::WebContents* helper_content = SetUpHelperInstance();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 content::WebContents* helper_content = SetUpHelperInstance(); 90 content::WebContents* helper_content = SetUpHelperInstance();
91 RunJavaScriptTest(helper_content, "InvalidAccessCode", "{" 91 RunJavaScriptTest(helper_content, "InvalidAccessCode", "{"
92 "accessCode: '" + invalid_access_code_string.str() + "'" 92 "accessCode: '" + invalid_access_code_string.str() + "'"
93 "}"); 93 "}");
94 94
95 Cleanup(); 95 Cleanup();
96 } 96 }
97 97
98 } // namespace remoting 98 } // namespace remoting
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | chrome/test/remoting/remote_desktop_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698