Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5296)

Unified Diff: chrome/browser/chromeos/login/oobe_localization_browsertest.cc

Issue 598023006: Add browser test for initial languages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/oobe_localization_browsertest.cc
diff --git a/chrome/browser/chromeos/login/oobe_localization_browsertest.cc b/chrome/browser/chromeos/login/oobe_localization_browsertest.cc
index f6802185e5dcb16e6baeb900b2a61708f5bce12c..68ae106df7cd3646e4160956a1c3623ebcb3f889 100644
--- a/chrome/browser/chromeos/login/oobe_localization_browsertest.cc
+++ b/chrome/browser/chromeos/login/oobe_localization_browsertest.cc
@@ -18,6 +18,7 @@
#include "chromeos/ime/extension_ime_util.h"
#include "chromeos/ime/input_method_manager.h"
#include "chromeos/ime/input_method_whitelist.h"
+#include "chromeos/system/fake_statistics_provider.h"
#include "chromeos/system/statistics_provider.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
@@ -40,55 +41,6 @@ const char* kUSLayout = "xkb:us::eng";
}
-namespace system {
-
-// Custom StatisticsProvider that will return each set of region settings.
-class FakeStatisticsProvider : public StatisticsProvider {
- public:
- virtual ~FakeStatisticsProvider() {}
-
- void set_locale(const std::string& locale) {
- initial_locale_ = locale;
- }
-
- void set_keyboard_layout(const std::string& keyboard_layout) {
- keyboard_layout_ = keyboard_layout;
- }
-
- private:
- // StatisticsProvider overrides.
- virtual void StartLoadingMachineStatistics(
- const scoped_refptr<base::TaskRunner>& file_task_runner,
- bool load_oem_manifest) OVERRIDE {
- }
-
- // Populates the named machine statistic for initial_locale and
- // keyboard_layout only.
- virtual bool GetMachineStatistic(const std::string& name,
- std::string* result) OVERRIDE {
- if (name == "initial_locale")
- *result = initial_locale_;
- else if (name == "keyboard_layout")
- *result = keyboard_layout_;
- else
- return false;
-
- return true;
- }
-
- virtual bool GetMachineFlag(const std::string& name, bool* result) OVERRIDE {
- return false;
- }
-
- virtual void Shutdown() OVERRIDE {
- }
-
- std::string initial_locale_;
- std::string keyboard_layout_;
-};
-
-} // namespace system
-
class OobeLocalizationTest : public InProcessBrowserTest {
public:
OobeLocalizationTest();

Powered by Google App Engine
This is Rietveld 408576698