OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const base::TimeDelta timeout_; | 87 const base::TimeDelta timeout_; |
88 const std::string message_; | 88 const std::string message_; |
89 base::RunLoop loop_; | 89 base::RunLoop loop_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(TimedRunLoop); | 91 DISALLOW_COPY_AND_ASSIGN(TimedRunLoop); |
92 }; | 92 }; |
93 | 93 |
94 class LanguageListWaiter : public NetworkScreen::Observer { | 94 class LanguageListWaiter : public NetworkScreen::Observer { |
95 public: | 95 public: |
96 LanguageListWaiter() | 96 LanguageListWaiter() |
97 : network_screen_( | 97 : network_screen_(NetworkScreen::Get( |
98 NetworkScreen::Get(WizardController::default_controller())), | 98 WizardController::default_controller()->screen_manager())), |
99 loop_(base::TimeDelta::FromSeconds(kTimeoutSeconds), "LanguageList") { | 99 loop_(base::TimeDelta::FromSeconds(kTimeoutSeconds), "LanguageList") { |
100 network_screen_->AddObserver(this); | 100 network_screen_->AddObserver(this); |
101 CheckLanguageList(); | 101 CheckLanguageList(); |
102 } | 102 } |
103 | 103 |
104 ~LanguageListWaiter() override { network_screen_->RemoveObserver(this); } | 104 ~LanguageListWaiter() override { network_screen_->RemoveObserver(this); } |
105 | 105 |
106 // NetworkScreen::Observer implementation: | 106 // NetworkScreen::Observer implementation: |
107 void OnLanguageListReloaded() override { CheckLanguageList(); } | 107 void OnLanguageListReloaded() override { CheckLanguageList(); } |
108 | 108 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 RunLocalizationTest(); | 427 RunLocalizationTest(); |
428 } | 428 } |
429 | 429 |
430 INSTANTIATE_TEST_CASE_P( | 430 INSTANTIATE_TEST_CASE_P( |
431 StructSequence, | 431 StructSequence, |
432 OobeLocalizationTest, | 432 OobeLocalizationTest, |
433 testing::Range(&oobe_localization_test_parameters[0], | 433 testing::Range(&oobe_localization_test_parameters[0], |
434 &oobe_localization_test_parameters[arraysize( | 434 &oobe_localization_test_parameters[arraysize( |
435 oobe_localization_test_parameters)])); | 435 oobe_localization_test_parameters)])); |
436 } // namespace chromeos | 436 } // namespace chromeos |
OLD | NEW |