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

Unified Diff: PRESUBMIT_test.py

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
« no previous file with comments | « no previous file | apps/app_lifetime_monitor_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT_test.py
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index e0de9674d3372498ad8ea94828154e46135dd9be..f57159fb35fffe43c2411cc4fd12d1a905899e6d 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -389,10 +389,10 @@ class BadExtensionsTest(unittest.TestCase):
class CheckSingletonInHeadersTest(unittest.TestCase):
def testSingletonInArbitraryHeader(self):
diff_singleton_h = ['base::subtle::AtomicWord '
- 'Singleton<Type, Traits, DifferentiatingType>::']
- diff_foo_h = ['// Singleton<Foo> in comment.',
- 'friend class Singleton<Foo>']
- diff_bad_h = ['Foo* foo = Singleton<Foo>::get();']
+ 'base::Singleton<Type, Traits, DifferentiatingType>::']
+ diff_foo_h = ['// base::Singleton<Foo> in comment.',
+ 'friend class base::Singleton<Foo>']
+ diff_bad_h = ['Foo* foo = base::Singleton<Foo>::get();']
mock_input_api = MockInputApi()
mock_input_api.files = [MockAffectedFile('base/memory/singleton.h',
diff_singleton_h),
@@ -402,10 +402,10 @@ class CheckSingletonInHeadersTest(unittest.TestCase):
MockOutputApi())
self.assertEqual(1, len(warnings))
self.assertEqual('error', warnings[0].type)
- self.assertTrue('Found Singleton<T>' in warnings[0].message)
+ self.assertTrue('Found base::Singleton<T>' in warnings[0].message)
def testSingletonInCC(self):
- diff_cc = ['Foo* foo = Singleton<Foo>::get();']
+ diff_cc = ['Foo* foo = base::Singleton<Foo>::get();']
mock_input_api = MockInputApi()
mock_input_api.files = [MockAffectedFile('some/path/foo.cc', diff_cc)]
warnings = PRESUBMIT._CheckSingletonInHeaders(mock_input_api,
« no previous file with comments | « no previous file | apps/app_lifetime_monitor_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698