diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 20:46:38 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 20:46:38 +0000 |
commit | e326bb9ab32dea06c9419ee774a9a893fb02da52 (patch) | |
tree | 99a16786493a64b868a4dd81ceaff83961b44a11 /chrome | |
parent | 9a2f1db004542314746b2f21839964d8a9b4a122 (diff) | |
download | chromium_src-e326bb9ab32dea06c9419ee774a9a893fb02da52.zip chromium_src-e326bb9ab32dea06c9419ee774a9a893fb02da52.tar.gz chromium_src-e326bb9ab32dea06c9419ee774a9a893fb02da52.tar.bz2 |
Enable the html speech input API for all platforms.
Also removes the '--enable-input-speech' flag and associated browser test as they are no longer required.
BUG=53598
TEST=browser_tests --gtest_filter="SpeechInputBrowserTest.*"
Review URL: http://codereview.chromium.org/3550003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 1 | ||||
-rw-r--r-- | chrome/browser/speech/enable_speech_input_switch_browsertest.cc | 42 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 1 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/renderer/render_thread.cc | 4 | ||||
-rw-r--r-- | chrome/test/data/speech/enable_speech_input_switch_test.html | 22 |
7 files changed, 0 insertions, 74 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index b6939a6..8196f14 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -553,7 +553,6 @@ void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer( switches::kDisableDeviceOrientation, switches::kEnableIndexedDatabase, switches::kDisableSpeechInput, - switches::kEnableSpeechInput, switches::kDisableGeolocation, switches::kShowPaintRects, switches::kEnableOpenMax, diff --git a/chrome/browser/speech/enable_speech_input_switch_browsertest.cc b/chrome/browser/speech/enable_speech_input_switch_browsertest.cc deleted file mode 100644 index d67a0f4..0000000 --- a/chrome/browser/speech/enable_speech_input_switch_browsertest.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/command_line.h" -#include "base/file_path.h" -#include "chrome/browser/browser.h" -#include "chrome/browser/tab_contents/tab_contents.h" -#include "chrome/common/chrome_switches.h" -#include "chrome/test/in_process_browser_test.h" -#include "chrome/test/ui_test_utils.h" - -class SpeechInputEnableSwitchTest : public InProcessBrowserTest { - public: - GURL testUrl(const FilePath::CharType* filename) { - const FilePath kTestDir(FILE_PATH_LITERAL("speech")); - return ui_test_utils::GetTestUrl(kTestDir, FilePath(filename)); - } -}; - -// Speech input is enabled by default in windows, linux & mac builds for the -// next dev channel build, after which we'll remove this check and keep it -// disabled. -#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_LINUX) - -IN_PROC_BROWSER_TEST_F(SpeechInputEnableSwitchTest, UnavailabilityTest) { - // Test that speech input is not available to a web page if - // the runtime switch is disabled. - - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - bool has_switch = command_line.HasSwitch(switches::kEnableSpeechInput); - ASSERT_FALSE(has_switch) << "This test does not make sense if " - << "--enable-speech-input is set."; - - GURL test_url = testUrl( - FILE_PATH_LITERAL("enable_speech_input_switch_test.html")); - ui_test_utils::NavigateToURL(browser(), test_url); - std::string status = browser()->GetSelectedTabContents()->GetURL().ref(); - EXPECT_EQ("pass", status) << "Page detected speech input properties."; -} - -#endif diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 1960542..5f47b0b 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -1972,7 +1972,6 @@ 'browser/service/service_process_control_browsertest.cc', 'browser/sessions/session_restore_browsertest.cc', 'browser/sessions/tab_restore_service_browsertest.cc', - 'browser/speech/enable_speech_input_switch_browsertest.cc', 'browser/speech/speech_input_browsertest.cc', 'browser/speech/speech_input_bubble_browsertest.cc', 'browser/ssl/ssl_browser_tests.cc', diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index ef77ba2..244f3be 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -487,9 +487,6 @@ const char kEnablePrintPreview[] = "enable-print-preview"; // parameter to indicate if the provider should be the default. const char kEnableSearchProviderApiV2[] = "enable-search-provider-api-v2"; -// Enables speech input. -const char kEnableSpeechInput[] = "enable-speech-input"; - // Enables StatsTable, logging statistics to a global named shared memory table. const char kEnableStatsTable[] = "enable-stats-table"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index c62241d..82c580d 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -149,7 +149,6 @@ extern const char kEnablePreparsedJsCaching[]; extern const char kEnablePrintPreview[]; extern const char kEnableResourceContentSettings[]; extern const char kEnableSearchProviderApiV2[]; -extern const char kEnableSpeechInput[]; extern const char kEnableStatsTable[]; extern const char kEnableSync[]; extern const char kEnableSyncApps[]; diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 0c37652..446510c 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -219,11 +219,7 @@ class RenderViewZoomer : public RenderViewVisitor { }; bool IsSpeechInputEnabled(const CommandLine& command_line) { -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) return !command_line.HasSwitch(switches::kDisableSpeechInput); -#else - return command_line.HasSwitch(switches::kEnableSpeechInput); -#endif } } // namespace diff --git a/chrome/test/data/speech/enable_speech_input_switch_test.html b/chrome/test/data/speech/enable_speech_input_switch_test.html deleted file mode 100644 index 9524c7c..0000000 --- a/chrome/test/data/speech/enable_speech_input_switch_test.html +++ /dev/null @@ -1,22 +0,0 @@ -<html>
- <head>
- <title>SpeechInputEnableSwitchTest</title>
- <script type="text/javascript">
- function run() {
- var inputField = document.getElementById('inputField');
- if (inputField.speech) {
- document.getElementById('status').innerHTML = 'FAIL';
- document.location = '#fail';
- } else {
- document.getElementById('status').innerHTML = 'PASS';
- document.location = '#pass';
- }
- }
- </script>
- </head>
- <body onload="run()">
- <input id='inputField' speech><br>
- <div id="status">Running...</div>
- </body>
-</html>
-
|