OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The Chromium Authors. All rights reserved. | 2 * Copyright 2013 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 #include "chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h" | 6 #include "chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h" |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 VirtualKeyboardBrowserTestConfig::VirtualKeyboardBrowserTestConfig() | 49 VirtualKeyboardBrowserTestConfig::VirtualKeyboardBrowserTestConfig() |
50 : base_framework_(kBaseKeyboardTestFramework), | 50 : base_framework_(kBaseKeyboardTestFramework), |
51 extension_id_(kExtensionId), | 51 extension_id_(kExtensionId), |
52 test_dir_(kVirtualKeyboardTestDir), | 52 test_dir_(kVirtualKeyboardTestDir), |
53 url_(kVirtualKeyboardURL) { | 53 url_(kVirtualKeyboardURL) { |
54 } | 54 } |
55 | 55 |
56 VirtualKeyboardBrowserTestConfig::~VirtualKeyboardBrowserTestConfig() {}; | 56 VirtualKeyboardBrowserTestConfig::~VirtualKeyboardBrowserTestConfig() {}; |
57 | 57 |
58 void VirtualKeyboardBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 58 void VirtualKeyboardBrowserTest::SetUpCommandLine( |
| 59 base::CommandLine* command_line) { |
59 command_line->AppendSwitch(keyboard::switches::kEnableVirtualKeyboard); | 60 command_line->AppendSwitch(keyboard::switches::kEnableVirtualKeyboard); |
60 } | 61 } |
61 | 62 |
62 void VirtualKeyboardBrowserTest::RunTest( | 63 void VirtualKeyboardBrowserTest::RunTest( |
63 const base::FilePath& file, | 64 const base::FilePath& file, |
64 const VirtualKeyboardBrowserTestConfig& config) { | 65 const VirtualKeyboardBrowserTestConfig& config) { |
65 ui_test_utils::NavigateToURL(browser(), GURL(config.url_)); | 66 ui_test_utils::NavigateToURL(browser(), GURL(config.url_)); |
66 content::WebContents* web_contents = | 67 content::WebContents* web_contents = |
67 browser()->tab_strip_model()->GetActiveWebContents(); | 68 browser()->tab_strip_model()->GetActiveWebContents(); |
68 EXPECT_TRUE(content::WaitForLoadStop(web_contents)); | 69 EXPECT_TRUE(content::WaitForLoadStop(web_contents)); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 bool success = false; | 186 bool success = false; |
186 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 187 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
187 browser_rvh, | 188 browser_rvh, |
188 "success ? verifyInput('a') : waitForInput('a');", | 189 "success ? verifyInput('a') : waitForInput('a');", |
189 &success)); | 190 &success)); |
190 ASSERT_TRUE(success); | 191 ASSERT_TRUE(success); |
191 } | 192 } |
192 | 193 |
193 // TODO(kevers|rsadam|bshe): Add UI tests for remaining virtual keyboard | 194 // TODO(kevers|rsadam|bshe): Add UI tests for remaining virtual keyboard |
194 // functionality. | 195 // functionality. |
OLD | NEW |