chromium/chrome/browser/renderer_context_menu/spelling_options_submenu_observer_browsertest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/renderer_context_menu/spelling_options_submenu_observer.h"

#include <memory>

#include "base/values.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/renderer_context_menu/mock_render_view_context_menu.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/language/core/browser/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/spellcheck/browser/pref_names.h"
#include "content/public/browser/context_menu_params.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {

// A test class used in this file. This test should be a browser test because it
// accesses resources.
class SpellingOptionsSubMenuObserverTest : public InProcessBrowserTest {};

// Tests that selecting the "Use basic spell check" item toggles the value
// of the "browser.enable_spellchecking" profile.
IN_PROC_BROWSER_TEST_F(SpellingOptionsSubMenuObserverTest, ToggleSpelling) {}

IN_PROC_BROWSER_TEST_F(SpellingOptionsSubMenuObserverTest,
                       ToggleSpellingWithEnhancedSpellCheck) {}

// Single accept language is selected based on the dictionaries preference.
// Consequently selecting multilingual spellcheck should copy all accept
// languages into spellcheck dictionaries preference.
IN_PROC_BROWSER_TEST_F(SpellingOptionsSubMenuObserverTest, SelectMultilingual) {}

// Multilingual spellcheck is selected when all dictionaries are used for
// spellcheck. Consequently selecting "English (United States)" should set
// spellcheck dictionaries preferences to ["en-US"].
IN_PROC_BROWSER_TEST_F(SpellingOptionsSubMenuObserverTest,
                       SelectFirstLanguage) {}

// Single dictionary should be selected based on preferences.
IN_PROC_BROWSER_TEST_F(SpellingOptionsSubMenuObserverTest,
                       SingleLanguageSelected) {}

// Single dictionary should be deselected based on preferences. Selecting the
// dictionary should update the preference.
IN_PROC_BROWSER_TEST_F(SpellingOptionsSubMenuObserverTest,
                       SelectTheOnlyLanguage) {}

}  // namespace