| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
| 26 #include "ui/base/win/scoped_ole_initializer.h" | 26 #include "ui/base/win/scoped_ole_initializer.h" |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 namespace autofill { | 29 namespace autofill { |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 base::string16 BackingCard() { | 33 base::string16 BackingCard() { |
| 34 return ASCIIToUTF16("Visa - 1111"); | 34 return base::ASCIIToUTF16("Visa - 1111"); |
| 35 } | 35 } |
| 36 | 36 |
| 37 base::string16 FrontingCard() { | 37 base::string16 FrontingCard() { |
| 38 return ASCIIToUTF16("Mastercard - 4444"); | 38 return base::ASCIIToUTF16("Mastercard - 4444"); |
| 39 } | 39 } |
| 40 | 40 |
| 41 base::string16 RangeOfString(const base::string16& string, | 41 base::string16 RangeOfString(const base::string16& string, |
| 42 const gfx::Range& range) { | 42 const gfx::Range& range) { |
| 43 return string.substr(range.start(), range.end() - range.start()); | 43 return string.substr(range.start(), range.end() - range.start()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 class GeneratedCreditCardBubbleControllerTest : public testing::Test { | 46 class GeneratedCreditCardBubbleControllerTest : public testing::Test { |
| 47 public: | 47 public: |
| 48 GeneratedCreditCardBubbleControllerTest() | 48 GeneratedCreditCardBubbleControllerTest() |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 167 |
| 168 // If the user reloads or the page redirects or submits a form, the bubble | 168 // If the user reloads or the page redirects or submits a form, the bubble |
| 169 // should stay showing. | 169 // should stay showing. |
| 170 NavigateWithTransition(content::PAGE_TRANSITION_CLIENT_REDIRECT); | 170 NavigateWithTransition(content::PAGE_TRANSITION_CLIENT_REDIRECT); |
| 171 NavigateWithTransition(content::PAGE_TRANSITION_FORM_SUBMIT); | 171 NavigateWithTransition(content::PAGE_TRANSITION_FORM_SUBMIT); |
| 172 NavigateWithTransition(content::PAGE_TRANSITION_RELOAD); | 172 NavigateWithTransition(content::PAGE_TRANSITION_RELOAD); |
| 173 EXPECT_TRUE(controller()->GetTestingBubble()->showing()); | 173 EXPECT_TRUE(controller()->GetTestingBubble()->showing()); |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace autofill | 176 } // namespace autofill |
| OLD | NEW |