| 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 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 std::string library_content; | 111 std::string library_content; |
| 112 ASSERT_TRUE(base::ReadFileToString(path, &library_content)) | 112 ASSERT_TRUE(base::ReadFileToString(path, &library_content)) |
| 113 << path.value(); | 113 << path.value(); |
| 114 utf8_content_.append(library_content); | 114 utf8_content_.append(library_content); |
| 115 utf8_content_.append(";\n"); | 115 utf8_content_.append(";\n"); |
| 116 } | 116 } |
| 117 | 117 |
| 118 std::string utf8_content_; | 118 std::string utf8_content_; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, AttributesTest) { | 121 // Broken due to Polymer version mismatch http://crbug.com/357946. |
| 122 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, DISABLED_AttributesTest) { |
| 122 RunTest(base::FilePath(FILE_PATH_LITERAL("attributes_test.js"))); | 123 RunTest(base::FilePath(FILE_PATH_LITERAL("attributes_test.js"))); |
| 123 } | 124 } |
| 124 | 125 |
| 125 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, TypingTest) { | 126 // Broken due to Polymer version mismatch http://crbug.com/357946. |
| 127 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, DISABLED_TypingTest) { |
| 126 RunTest(base::FilePath(FILE_PATH_LITERAL("typing_test.js"))); | 128 RunTest(base::FilePath(FILE_PATH_LITERAL("typing_test.js"))); |
| 127 } | 129 } |
| 128 | 130 |
| 129 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, ControlKeysTest) { | 131 // Broken due to Polymer version mismatch http://crbug.com/357946. |
| 132 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, DISABLED_ControlKeysTest) { |
| 130 RunTest(base::FilePath(FILE_PATH_LITERAL("control_keys_test.js"))); | 133 RunTest(base::FilePath(FILE_PATH_LITERAL("control_keys_test.js"))); |
| 131 } | 134 } |
| 132 | 135 |
| 133 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, HideKeyboardKeyTest) { | 136 // Broken due to Polymer version mismatch http://crbug.com/357946. |
| 137 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, |
| 138 DISABLED_HideKeyboardKeyTest) { |
| 134 RunTest(base::FilePath(FILE_PATH_LITERAL("hide_keyboard_key_test.js"))); | 139 RunTest(base::FilePath(FILE_PATH_LITERAL("hide_keyboard_key_test.js"))); |
| 135 } | 140 } |
| 136 | 141 |
| 137 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, KeysetTransitionTest) { | 142 // Broken due to Polymer version mismatch http://crbug.com/357946. |
| 143 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, |
| 144 DISABLED_KeysetTransitionTest) { |
| 138 RunTest(base::FilePath(FILE_PATH_LITERAL("keyset_transition_test.js"))); | 145 RunTest(base::FilePath(FILE_PATH_LITERAL("keyset_transition_test.js"))); |
| 139 } | 146 } |
| 140 | 147 |
| 141 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, IsKeyboardLoaded) { | 148 // Broken due to Polymer version mismatch http://crbug.com/357946. |
| 149 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, DISABLED_IsKeyboardLoaded) { |
| 142 content::RenderViewHost* keyboard_rvh = GetKeyboardRenderViewHost(); | 150 content::RenderViewHost* keyboard_rvh = GetKeyboardRenderViewHost(); |
| 143 ASSERT_TRUE(keyboard_rvh); | 151 ASSERT_TRUE(keyboard_rvh); |
| 144 bool loaded = false; | 152 bool loaded = false; |
| 145 std::string script = "!!chrome.virtualKeyboardPrivate"; | 153 std::string script = "!!chrome.virtualKeyboardPrivate"; |
| 146 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 154 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
| 147 keyboard_rvh, | 155 keyboard_rvh, |
| 148 "window.domAutomationController.send(" + script + ");", | 156 "window.domAutomationController.send(" + script + ");", |
| 149 &loaded)); | 157 &loaded)); |
| 150 // Catches the regression in crbug.com/308653. | 158 // Catches the regression in crbug.com/308653. |
| 151 ASSERT_TRUE(loaded); | 159 ASSERT_TRUE(loaded); |
| 152 } | 160 } |
| 153 | 161 |
| 154 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, EndToEndTest) { | 162 // Broken due to Polymer version mismatch http://crbug.com/357946. |
| 163 IN_PROC_BROWSER_TEST_F(VirtualKeyboardBrowserTest, DISABLED_EndToEndTest) { |
| 155 // Get the virtual keyboard's render view host. | 164 // Get the virtual keyboard's render view host. |
| 156 content::RenderViewHost* keyboard_rvh = GetKeyboardRenderViewHost(); | 165 content::RenderViewHost* keyboard_rvh = GetKeyboardRenderViewHost(); |
| 157 ASSERT_TRUE(keyboard_rvh); | 166 ASSERT_TRUE(keyboard_rvh); |
| 158 | 167 |
| 159 // Get the test page's render view host. | 168 // Get the test page's render view host. |
| 160 content::RenderViewHost* browser_rvh = browser()->tab_strip_model()-> | 169 content::RenderViewHost* browser_rvh = browser()->tab_strip_model()-> |
| 161 GetActiveWebContents()->GetRenderViewHost(); | 170 GetActiveWebContents()->GetRenderViewHost(); |
| 162 ASSERT_TRUE(browser_rvh); | 171 ASSERT_TRUE(browser_rvh); |
| 163 | 172 |
| 164 // Set up the test page. | 173 // Set up the test page. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 179 bool success = false; | 188 bool success = false; |
| 180 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 189 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
| 181 browser_rvh, | 190 browser_rvh, |
| 182 "success ? verifyInput('a') : waitForInput('a');", | 191 "success ? verifyInput('a') : waitForInput('a');", |
| 183 &success)); | 192 &success)); |
| 184 ASSERT_TRUE(success); | 193 ASSERT_TRUE(success); |
| 185 } | 194 } |
| 186 | 195 |
| 187 // TODO(kevers|rsadam|bshe): Add UI tests for remaining virtual keyboard | 196 // TODO(kevers|rsadam|bshe): Add UI tests for remaining virtual keyboard |
| 188 // functionality. | 197 // functionality. |
| OLD | NEW |