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

Side by Side Diff: chrome/browser/ui/webui/chromeos/enterprise_enrollment_ui_unittest.cc

Issue 8436002: [cros] Remove Views implementation for login/OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "grit/generated_resources.h"
6 #include "testing/gmock/include/gmock/gmock.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/base/l10n/l10n_util.h"
9
10 using testing::HasSubstr;
11 using testing::Not;
12
13 void TestStringStillOkForEnterpriseEnrollment(int resource_id) {
14 std::string resource_string = l10n_util::GetStringUTF8(resource_id);
15 EXPECT_THAT(resource_string, Not(HasSubstr("Sync")));
16 EXPECT_THAT(resource_string, Not(HasSubstr("sync")));
17 }
18
19 // This set of strings to test was generated from
20 // CloudPrintSetupSource::StartDataRequest. If any of these trip, notify the
21 // cloud printing team and we'll split the strings.
22 TEST(EnterpriseEnrollmentResources, SharedStringsCheck) {
23 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_LOGIN_SIGNIN_PREFIX);
24 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_LOGIN_SIGNIN_SUFFIX);
25 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_CANNOT_BE_BLANK);
26 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_LOGIN_EMAIL_SAME_LINE);
27 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_LOGIN_PASSWORD_SAME_LINE);
28 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_INVALID_USER_CREDENTIALS);
29 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_SIGNIN);
30 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_LOGIN_COULD_NOT_CONNECT);
31 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_LOGIN_SETTING_UP);
32 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_SUCCESS);
33 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_ERROR_SIGNING_IN);
34 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_GAIA_CAPTCHA_INSTRUCTIONS);
35 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_INVALID_ACCESS_CODE_LABEL);
36 TestStringStillOkForEnterpriseEnrollment(IDS_SYNC_ENTER_ACCESS_CODE_LABEL);
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698