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

Unified Diff: components/sync/PRESUBMIT_test.py

Issue 2426613003: [sync] Add store version to model type store backend (Closed)
Patch Set: Created 4 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: components/sync/PRESUBMIT_test.py
diff --git a/components/sync/PRESUBMIT_test.py b/components/sync/PRESUBMIT_test.py
index fdcae2453b092443a66ae0091eab420b5304b518..0fd049de560336c32bc1f1b1e73f0f59cd1d10cb 100644
--- a/components/sync/PRESUBMIT_test.py
+++ b/components/sync/PRESUBMIT_test.py
@@ -8,7 +8,8 @@ import sys
import unittest
import PRESUBMIT
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+sys.path.append(
+ os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
from PRESUBMIT_test_mocks import MockOutputApi, MockChange
class MockInputApi(object):
@@ -63,6 +64,7 @@ MOCK_PROTOFILE_CONTENTS = ('\n'
'optional AutofillSpecifics autofill = 123;\n'
'optional AppSpecifics app = 456;\n'
'optional AppSettingSpecifics app_setting = 789;\n'
+ 'optional ExtensionSettingSpecifics extension_setting = 910;\n'
'//comment\n'
'}\n')
@@ -125,6 +127,14 @@ class ModelTypeInfoChangeTest(unittest.TestCase):
self.assertEqual(6, len(results))
self.assertTrue('APP_SETTINGS' in results[0].message)
+ def testBlacklistedRootTag(self):
+ results = self._testChange('{EXTENSION_SETTING, "EXTENSION_SETTING",\n'
+ '"_mts_schema_descriptor","Extension Setting",\n'
+ 'sync_pb::EntitySpecifics::kExtensionSettingFieldNumber, 6},')
+ self.assertEqual(2, len(results))
+ self.assertTrue('_mts_schema_descriptor' in results[0].message)
+ self.assertTrue("blacklist" in results[0].message)
+
def _testChange(self, modeltype_literal):
mock_input_api = MockInputApi()
mock_input_api.files = [

Powered by Google App Engine
This is Rietveld 408576698