| 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 #include "chrome/browser/ui/views/sync/bubble_sync_promo_view.h" | 5 #include "chrome/browser/ui/views/sync/bubble_sync_promo_view.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | |
| 8 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/browser/ui/sync/bubble_sync_promo_delegate.h" | 11 #include "chrome/browser/ui/sync/bubble_sync_promo_delegate.h" |
| 12 #include "chrome/grit/chromium_strings.h" | 12 #include "chrome/grit/chromium_strings.h" |
| 13 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "ui/events/event_constants.h" | 15 #include "ui/events/event_constants.h" |
| 16 #include "ui/gfx/range/range.h" | 16 #include "ui/gfx/range/range.h" |
| 17 #include "ui/views/controls/styled_label.h" | 17 #include "ui/views/controls/styled_label.h" |
| 18 | 18 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 37 sync_promo.reset(new BubbleSyncPromoView(this, IDS_BOOKMARK_SYNC_PROMO_LINK, | 37 sync_promo.reset(new BubbleSyncPromoView(this, IDS_BOOKMARK_SYNC_PROMO_LINK, |
| 38 IDS_BOOKMARK_SYNC_PROMO_MESSAGE)); | 38 IDS_BOOKMARK_SYNC_PROMO_MESSAGE)); |
| 39 | 39 |
| 40 // Simulate clicking the "Sign in" link. | 40 // Simulate clicking the "Sign in" link. |
| 41 views::StyledLabel styled_label(base::ASCIIToUTF16("test"), nullptr); | 41 views::StyledLabel styled_label(base::ASCIIToUTF16("test"), nullptr); |
| 42 views::StyledLabelListener* listener = sync_promo.get(); | 42 views::StyledLabelListener* listener = sync_promo.get(); |
| 43 listener->StyledLabelLinkClicked(&styled_label, gfx::Range(), ui::EF_NONE); | 43 listener->StyledLabelLinkClicked(&styled_label, gfx::Range(), ui::EF_NONE); |
| 44 | 44 |
| 45 EXPECT_EQ(1, sign_in_clicked_count_); | 45 EXPECT_EQ(1, sign_in_clicked_count_); |
| 46 } | 46 } |
| OLD | NEW |