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

Side by Side Diff: chrome/browser/chromeos/login/oobe_localization_browsertest.cc

Issue 2649873009: cros: Fold NetworkModel into NetworkScreen (Closed)
Patch Set: Address comments Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // Returns true on success, false on timeout. 109 // Returns true on success, false on timeout.
110 bool Wait() { 110 bool Wait() {
111 if (LanguageListReady()) 111 if (LanguageListReady())
112 return true; 112 return true;
113 113
114 return loop_.Run(); 114 return loop_.Run();
115 } 115 }
116 116
117 private: 117 private:
118 bool LanguageListReady() const { 118 bool LanguageListReady() const { return network_screen_->language_list(); }
119 return network_screen_->GetLanguageList();
120 }
121 119
122 void CheckLanguageList() { 120 void CheckLanguageList() {
123 if (LanguageListReady()) 121 if (LanguageListReady())
124 loop_.Quit(); 122 loop_.Quit();
125 } 123 }
126 124
127 NetworkScreen* network_screen_; 125 NetworkScreen* network_screen_;
128 TimedRunLoop loop_; 126 TimedRunLoop loop_;
129 }; 127 };
130 128
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 RunLocalizationTest(); 427 RunLocalizationTest();
430 } 428 }
431 429
432 INSTANTIATE_TEST_CASE_P( 430 INSTANTIATE_TEST_CASE_P(
433 StructSequence, 431 StructSequence,
434 OobeLocalizationTest, 432 OobeLocalizationTest,
435 testing::Range(&oobe_localization_test_parameters[0], 433 testing::Range(&oobe_localization_test_parameters[0],
436 &oobe_localization_test_parameters[arraysize( 434 &oobe_localization_test_parameters[arraysize(
437 oobe_localization_test_parameters)])); 435 oobe_localization_test_parameters)]));
438 } // namespace chromeos 436 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/login/screens/mock_network_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698