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

Side by Side Diff: chrome/browser/ui/webui/options/managed_user_set_passphrase_browsertest.js

Issue 14325003: Clean up managed user settings dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix broken merge Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 GEN('#include "chrome/browser/ui/webui/options/' + 5 GEN('#include "chrome/browser/ui/webui/options/' +
6 'managed_user_set_passphrase_test.h"'); 6 'managed_user_set_passphrase_test.h"');
7 7
8 /** 8 /**
9 * Test fixture for managed user set passphrase WebUI testing. 9 * Test fixture for managed user set passphrase WebUI testing.
10 * @constructor 10 * @constructor
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 this.mockHandler.expects(once()).setPassphrase(['test_passphrase']); 80 this.mockHandler.expects(once()).setPassphrase(['test_passphrase']);
81 this.savePassphrase(); 81 this.savePassphrase();
82 }); 82 });
83 83
84 // Verify that empty passphrase is not allowed. 84 // Verify that empty passphrase is not allowed.
85 TEST_F('ManagedUserSetPassphraseTest', 'EmptyPassphrase', 85 TEST_F('ManagedUserSetPassphraseTest', 'EmptyPassphrase',
86 function() { 86 function() {
87 this.setPassphrase(); 87 this.setPassphrase();
88 this.enterPassphrase(''); 88 this.enterPassphrase('');
89 this.confirmPassphrase(''); 89 this.confirmPassphrase('');
90 this.mockHandler.expects(never()).setPassphrase(ANYTHING); 90 this.mockHandler.expects(once()).setPassphrase(['']);
91 this.savePassphrase(); 91 this.savePassphrase();
92 }); 92 });
93 93
94 // Verify that the confirm passphrase input needs to contain the same 94 // Verify that the confirm passphrase input needs to contain the same
95 // passphrase as the passphrase input. 95 // passphrase as the passphrase input.
96 TEST_F('ManagedUserSetPassphraseTest', 'DifferentPassphrase', 96 TEST_F('ManagedUserSetPassphraseTest', 'DifferentPassphrase',
97 function() { 97 function() {
98 this.setPassphrase(); 98 this.setPassphrase();
99 this.enterPassphrase('test_passphrase'); 99 this.enterPassphrase('test_passphrase');
100 this.confirmPassphrase('confirm_passphrase'); 100 this.confirmPassphrase('confirm_passphrase');
101 this.mockHandler.expects(never()).setPassphrase(ANYTHING); 101 this.mockHandler.expects(never()).setPassphrase(ANYTHING);
102 this.savePassphrase(); 102 this.savePassphrase();
103 }); 103 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698