summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsadrul <sadrul@chromium.org>2015-05-06 11:27:14 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 18:27:39 +0000
commit7486759b94d87eb987a89b4314939e80b8900307 (patch)
treef2d170393f20e411d4d19fb6211f47c40cac3e2c
parent87eb715c8a009ba592587125dfc39d56d3d248a6 (diff)
downloadchromium_src-7486759b94d87eb987a89b4314939e80b8900307.zip
chromium_src-7486759b94d87eb987a89b4314939e80b8900307.tar.gz
chromium_src-7486759b94d87eb987a89b4314939e80b8900307.tar.bz2
virtual keyboard: It is not longer necessary to 'reset' for tests.
The virtual keyboard used to install a WebUIControllerFactory during initialization, and it was necessary to reset the initialization state for the keyboard so that it could reinstall the factory for each test. But the virtual keyboard no longer uses webui. So remove the reset function. BUG=none Review URL: https://codereview.chromium.org/1130753004 Cr-Commit-Position: refs/heads/master@{#328561}
-rw-r--r--ash/test/ash_test_helper.cc2
-rw-r--r--ui/keyboard/keyboard.cc7
-rw-r--r--ui/keyboard/keyboard.h5
3 files changed, 1 insertions, 13 deletions
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
index 6cab8fd..60b8f3e 100644
--- a/ash/test/ash_test_helper.cc
+++ b/ash/test/ash_test_helper.cc
@@ -29,7 +29,6 @@
#if defined(OS_CHROMEOS)
#include "chromeos/audio/cras_audio_handler.h"
#include "chromeos/dbus/dbus_thread_manager.h"
-#include "ui/keyboard/keyboard.h"
#endif
#if defined(OS_WIN)
@@ -126,7 +125,6 @@ void AshTestHelper::TearDown() {
chromeos::DBusThreadManager::Shutdown();
dbus_thread_manager_initialized_ = false;
}
- keyboard::ResetKeyboardForTesting();
#endif
aura::Env::DeleteInstance();
diff --git a/ui/keyboard/keyboard.cc b/ui/keyboard/keyboard.cc
index 436b935..4e26637 100644
--- a/ui/keyboard/keyboard.cc
+++ b/ui/keyboard/keyboard.cc
@@ -10,13 +10,8 @@
namespace keyboard {
-static bool initialized = false;
-
-void ResetKeyboardForTesting() {
- initialized = false;
-}
-
void InitializeKeyboard() {
+ static bool initialized = false;
if (initialized)
return;
initialized = true;
diff --git a/ui/keyboard/keyboard.h b/ui/keyboard/keyboard.h
index a0aed8a..0878b7b 100644
--- a/ui/keyboard/keyboard.h
+++ b/ui/keyboard/keyboard.h
@@ -14,11 +14,6 @@ namespace keyboard {
// after the first call.
KEYBOARD_EXPORT void InitializeKeyboard();
-// Resets the keyboard to an uninitialized state. Required for
-// BrowserWithTestWindowTest tests as they tear down the controller factory
-// after each test yet resume testing in the same process.
-KEYBOARD_EXPORT void ResetKeyboardForTesting();
-
} // namespace keyboard
#endif // UI_KEYBOARD_KEYBOARD_H_