| OLD | NEW | 
|    1 // Copyright 2013 The Chromium Authors. All rights reserved. |    1 // Copyright 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 #import "chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h" |    5 #import "chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h" | 
|    6  |    6  | 
|    7 #include "base/mac/scoped_nsobject.h" |    7 #include "base/mac/scoped_nsobject.h" | 
|    8 #include "base/strings/utf_string_conversions.h" |    8 #include "base/strings/utf_string_conversions.h" | 
|    9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |    9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 
|   10 #include "testing/gtest_mac.h" |   10 #include "testing/gtest_mac.h" | 
|   11 #import "ui/base/test/ui_cocoa_test_helper.h" |   11 #import "ui/base/test/ui_cocoa_test_helper.h" | 
|   12  |   12  | 
 |   13 using base::ASCIIToUTF16; | 
 |   14  | 
|   13 namespace { |   15 namespace { | 
|   14  |   16  | 
|   15 class AutofillNotificationControllerTest : public ui::CocoaTest { |   17 class AutofillNotificationControllerTest : public ui::CocoaTest { | 
|   16  public: |   18  public: | 
|   17   virtual void SetUp() { |   19   virtual void SetUp() { | 
|   18     CocoaTest::SetUp(); |   20     CocoaTest::SetUp(); | 
|   19     InitControllerWithNotification( |   21     InitControllerWithNotification( | 
|   20         autofill::DialogNotification(autofill::DialogNotification::NONE, |   22         autofill::DialogNotification(autofill::DialogNotification::NONE, | 
|   21                                      ASCIIToUTF16("A notification title"))); |   23                                      ASCIIToUTF16("A notification title"))); | 
|   22   } |   24   } | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   98           autofill::DialogNotification::WALLET_USAGE_CONFIRMATION, |  100           autofill::DialogNotification::WALLET_USAGE_CONFIRMATION, | 
|   99           ASCIIToUTF16("A notification title")); |  101           ASCIIToUTF16("A notification title")); | 
|  100   ASSERT_TRUE(notification.HasCheckbox()); |  102   ASSERT_TRUE(notification.HasCheckbox()); | 
|  101   notification.set_tooltip_text(ASCIIToUTF16("My very informative tooltip.")); |  103   notification.set_tooltip_text(ASCIIToUTF16("My very informative tooltip.")); | 
|  102   InitControllerWithNotification(notification); |  104   InitControllerWithNotification(notification); | 
|  103  |  105  | 
|  104   EXPECT_TRUE([[controller_ textview] isHidden]); |  106   EXPECT_TRUE([[controller_ textview] isHidden]); | 
|  105   EXPECT_FALSE([[controller_ checkbox] isHidden]); |  107   EXPECT_FALSE([[controller_ checkbox] isHidden]); | 
|  106   EXPECT_FALSE([[controller_ tooltipView] isHidden]); |  108   EXPECT_FALSE([[controller_ tooltipView] isHidden]); | 
|  107 } |  109 } | 
| OLD | NEW |