diff --git a/tracker/test/issueentry_test.py b/tracker/test/issueentry_test.py
index b7461ae..b18f70b 100644
--- a/tracker/test/issueentry_test.py
+++ b/tracker/test/issueentry_test.py
@@ -1,7 +1,6 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file or at
-# https://developers.google.com/open-source/licenses/bsd
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
 
 """Unittests for the issueentry servlet."""
 from __future__ import print_function
@@ -19,7 +18,6 @@
 
 from google.appengine.ext import testbed
 from mock import Mock, patch
-import webapp2
 
 from framework import framework_bizobj
 from framework import framework_views
@@ -30,8 +28,8 @@
 from testing import testing_helpers
 from tracker import issueentry
 from tracker import tracker_bizobj
-from proto import tracker_pb2
-from proto import user_pb2
+from mrproto import tracker_pb2
+from mrproto import user_pb2
 
 
 class IssueEntryTest(unittest.TestCase):
@@ -51,10 +49,7 @@
         template=Mock(spec=template_svc.TemplateService),
         features=fake.FeaturesService())
     self.project = self.services.project.TestAddProject('proj', project_id=987)
-    request = webapp2.Request.blank('/p/proj/issues/entry')
-    response = webapp2.Response()
-    self.servlet = issueentry.IssueEntry(
-        request, response, services=self.services)
+    self.servlet = issueentry.IssueEntry(services=self.services)
     self.user = self.services.user.TestAddUser('to_pass_tests', 0)
     self.services.features.TestAddHotlist(
         name='dontcare', summary='', owner_ids=[0])
@@ -752,6 +747,46 @@
     self.assertEqual(field_values[0].int_value, 3)
     self.assertEqual(field_values[1].int_value, 3737)
 
+  def testProcessFormData_RejectNewLabels(self):
+    """We raise an AssertionError when new labels are added."""
+    mr = testing_helpers.MakeMonorailRequest(path='/p/proj/issues/entry')
+    mr.perms = permissions.USER_PERMISSIONSET
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    post_data = fake.PostData(
+        template_name=['rutabaga'],
+        summary=['Nya nya I modified the summary'],
+        comment=[self.template.content],
+        status=['New'],
+        label=['freeze_new_label'])
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr,
+        component_required=None,
+        fields=[],
+        initial_blocked_on='',
+        initial_blocking='',
+        initial_cc='',
+        initial_comment=self.template.content,
+        initial_components='',
+        initial_owner='',
+        initial_status='New',
+        initial_summary='Nya nya I modified the summary',
+        initial_hotlists='',
+        labels=['freeze_new_label'],
+        template_name='rutabaga')
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(
+        (
+            "The creation of new labels is blocked for the Chromium project"
+            " in Monorail. To continue with editing your issue, please"
+            " remove: freeze_new_label label(s)."),
+        mr.errors.labels,
+    )
+    self.assertIsNone(url)
+
   def testProcessFormData_RejectRestrictedFields(self):
     """We raise an AssertionError when restricted fields are set w/o perms."""
     mr = testing_helpers.MakeMonorailRequest(
