Commit c2929c2d authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

[VK] Remove useless ShowVirtualKeyboard call in browser test.

There is a call to ShowVirtualKeyboard in
DefaultKeyboardExtensionBrowserTest::GetKeyboardWebContents, which is
quite confusing, because the virtual keyboard should be showing up from
focus/clicking and not an explicit call.

I don't really know why that code is there (maybe it's to load the
extension). However, when --enable-virtual-keyboard flag is on, we
begin loading the extension anyway.

Bug: 849995
Change-Id: Icae6c405ccde304ece80456190802012e487ebc5
Reviewed-on: https://chromium-review.googlesource.com/1215432
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: default avatarYuichiro Hanada <yhanada@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590552}
parent c8781ee2
......@@ -7,7 +7,6 @@
#include <vector>
#include "ash/shell.h"
#include "base/command_line.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
......@@ -87,17 +86,9 @@ void DefaultKeyboardExtensionBrowserTest::RunTest(
EXPECT_TRUE(ExecuteWebUIResourceTest(web_contents, resource_ids));
}
void DefaultKeyboardExtensionBrowserTest::ShowVirtualKeyboard() {
aura::Window* window = ash::Shell::GetPrimaryRootWindow();
ui::InputMethod* input_method = window->GetHost()->GetInputMethod();
ASSERT_TRUE(input_method);
input_method->ShowVirtualKeyboardIfEnabled();
}
content::WebContents*
DefaultKeyboardExtensionBrowserTest::GetKeyboardWebContents(
const std::string& id) {
ShowVirtualKeyboard();
GURL url = extensions::Extension::GetBaseURLFromExtensionId(id);
std::unique_ptr<content::RenderWidgetHostIterator> widgets(
content::RenderWidgetHost::GetRenderWidgetHosts());
......
......@@ -44,8 +44,6 @@ class DefaultKeyboardExtensionBrowserTest : public InProcessBrowserTest {
void RunTest(const base::FilePath& file,
const DefaultKeyboardExtensionBrowserTestConfig& config);
void ShowVirtualKeyboard();
// Returns the WebContents that the keyboard with extension |id| is in.
content::WebContents* GetKeyboardWebContents(const std::string& id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment