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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc

Issue 12556002: Always Close the Autofill UI through the same path (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Disable Test On Linux Created 7 years, 9 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
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/memory/weak_ptr.h" 6 #include "base/memory/weak_ptr.h"
7 #include "base/prefs/testing_pref_service.h" 7 #include "base/prefs/testing_pref_service.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autofill/autofill_external_delegate.h" 9 #include "chrome/browser/autofill/autofill_external_delegate.h"
10 #include "chrome/browser/autofill/autofill_manager.h" 10 #include "chrome/browser/autofill/autofill_manager.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 AutofillPopupControllerImpl::GetOrCreate( 316 AutofillPopupControllerImpl::GetOrCreate(
317 test_controller->GetWeakPtr(), 317 test_controller->GetWeakPtr(),
318 &delegate, 318 &delegate,
319 NULL, 319 NULL,
320 bounds); 320 bounds);
321 EXPECT_EQ( 321 EXPECT_EQ(
322 bounds, 322 bounds,
323 static_cast<AutofillPopupController*>(controller3)->element_bounds()); 323 static_cast<AutofillPopupController*>(controller3)->element_bounds());
324 controller3->Hide(); 324 controller3->Hide();
325 325
326 delete test_controller; 326 // Hide the test_controller to delete it.
327 test_controller->DoHide();
327 } 328 }
328 329
329 #if !defined(OS_ANDROID) 330 #if !defined(OS_ANDROID)
330 TEST_F(AutofillPopupControllerUnitTest, ElideText) { 331 TEST_F(AutofillPopupControllerUnitTest, ElideText) {
331 std::vector<string16> names; 332 std::vector<string16> names;
332 names.push_back(ASCIIToUTF16("Text that will need to be trimmed")); 333 names.push_back(ASCIIToUTF16("Text that will need to be trimmed"));
333 names.push_back(ASCIIToUTF16("Untrimmed")); 334 names.push_back(ASCIIToUTF16("Untrimmed"));
334 335
335 std::vector<string16> subtexts; 336 std::vector<string16> subtexts;
336 subtexts.push_back(ASCIIToUTF16("Label that will be trimmed")); 337 subtexts.push_back(ASCIIToUTF16("Label that will be trimmed"));
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 autofill_popup_controller->Show(names, names, names, autofill_ids); 427 autofill_popup_controller->Show(names, names, names, autofill_ids);
427 428
428 EXPECT_EQ(expected_popup_bounds[i].ToString(), 429 EXPECT_EQ(expected_popup_bounds[i].ToString(),
429 autofill_popup_controller->popup_bounds().ToString()) << 430 autofill_popup_controller->popup_bounds().ToString()) <<
430 "Popup bounds failed to match for test " << i; 431 "Popup bounds failed to match for test " << i;
431 432
432 // Hide the controller to delete it. 433 // Hide the controller to delete it.
433 autofill_popup_controller->DoHide(); 434 autofill_popup_controller->DoHide();
434 } 435 }
435 } 436 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_impl.cc ('k') | chrome/browser/ui/autofill/autofill_popup_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698