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

Side by Side Diff: chrome/browser/ui/views/crypto_module_password_dialog_view_unittest.cc

Issue 120503005: Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix touch drag and drop unit test. Created 6 years, 11 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/views/crypto_module_password_dialog_view.h" 5 #include "chrome/browser/ui/views/crypto_module_password_dialog_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 27 matching lines...) Expand all
38 base::Bind(&CryptoModulePasswordDialogViewTest::Capture, 38 base::Bind(&CryptoModulePasswordDialogViewTest::Capture,
39 base::Unretained(this))); 39 base::Unretained(this)));
40 CreateCryptoDialog(cb); 40 CreateCryptoDialog(cb);
41 EXPECT_EQ(dialog_->password_entry_, dialog_->GetInitiallyFocusedView()); 41 EXPECT_EQ(dialog_->password_entry_, dialog_->GetInitiallyFocusedView());
42 EXPECT_TRUE(dialog_->GetModalType() != ui::MODAL_TYPE_NONE); 42 EXPECT_TRUE(dialog_->GetModalType() != ui::MODAL_TYPE_NONE);
43 const std::string kPassword = "diAl0g"; 43 const std::string kPassword = "diAl0g";
44 dialog_->password_entry_->SetText(base::ASCIIToUTF16(kPassword)); 44 dialog_->password_entry_->SetText(base::ASCIIToUTF16(kPassword));
45 EXPECT_TRUE(dialog_->Accept()); 45 EXPECT_TRUE(dialog_->Accept());
46 EXPECT_EQ(kPassword, text_); 46 EXPECT_EQ(kPassword, text_);
47 const base::string16 empty; 47 const base::string16 empty;
48 EXPECT_EQ(empty, dialog_->password_entry_->text()); 48 EXPECT_EQ(empty, dialog_->password_entry_->GetText());
49 } 49 }
50 50
51 } // namespace chrome 51 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698