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

Side by Side Diff: base/test/test_suite.cc

Issue 2226063002: Add a ScopedFeatureList class for testing and start using it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/test/test_suite.h" 5 #include "base/test/test_suite.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 debug::WaitForDebugger(60, true); 304 debug::WaitForDebugger(60, true);
305 } 305 }
306 #endif 306 #endif
307 307
308 // Set up a FeatureList instance, so that code using that API will not hit a 308 // Set up a FeatureList instance, so that code using that API will not hit a
309 // an error that it's not set. If a FeatureList was created in this way (i.e. 309 // an error that it's not set. If a FeatureList was created in this way (i.e.
310 // one didn't exist previously), it will be cleared in Shutdown() via 310 // one didn't exist previously), it will be cleared in Shutdown() via
311 // ClearInstanceForTesting(). 311 // ClearInstanceForTesting().
312 created_feature_list_ = 312 created_feature_list_ =
313 FeatureList::InitializeInstance(std::string(), std::string()); 313 FeatureList::InitializeInstance(std::string(), std::string());
314 printf("initing the instance\n");
Ilya Sherman 2016/08/09 01:06:57 Plz revert ;)
Alexei Svitkine (slow) 2016/08/09 01:26:16 Done.
314 315
315 #if defined(OS_IOS) 316 #if defined(OS_IOS)
316 InitIOSTestMessageLoop(); 317 InitIOSTestMessageLoop();
317 #endif // OS_IOS 318 #endif // OS_IOS
318 319
319 #if defined(OS_ANDROID) 320 #if defined(OS_ANDROID)
320 InitAndroidTest(); 321 InitAndroidTest();
321 #else 322 #else
322 // Initialize logging. 323 // Initialize logging.
323 FilePath exe; 324 FilePath exe;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 384
384 void TestSuite::Shutdown() { 385 void TestSuite::Shutdown() {
385 base::debug::StopProfiling(); 386 base::debug::StopProfiling();
386 387
387 // Clear the FeatureList that was created by Initialize(). 388 // Clear the FeatureList that was created by Initialize().
388 if (created_feature_list_) 389 if (created_feature_list_)
389 FeatureList::ClearInstanceForTesting(); 390 FeatureList::ClearInstanceForTesting();
390 } 391 }
391 392
392 } // namespace base 393 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698