| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/autocomplete/autocomplete_edit.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 6 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 6 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" |
| 7 #include "chrome/test/testing_profile.h" | 7 #include "chrome/test/testing_profile.h" |
| 8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 TestingAutocompleteEditController() {} | 74 TestingAutocompleteEditController() {} |
| 75 virtual void OnAutocompleteWillClosePopup() {} | 75 virtual void OnAutocompleteWillClosePopup() {} |
| 76 virtual void OnAutocompleteLosingFocus(gfx::NativeView view_gaining_focus) {} | 76 virtual void OnAutocompleteLosingFocus(gfx::NativeView view_gaining_focus) {} |
| 77 virtual void OnAutocompleteWillAccept() {} | 77 virtual void OnAutocompleteWillAccept() {} |
| 78 virtual bool OnCommitSuggestedText(const std::wstring& typed_text) { | 78 virtual bool OnCommitSuggestedText(const std::wstring& typed_text) { |
| 79 return false; | 79 return false; |
| 80 } | 80 } |
| 81 virtual bool AcceptCurrentInstantPreview() { | 81 virtual bool AcceptCurrentInstantPreview() { |
| 82 return false; | 82 return false; |
| 83 } | 83 } |
| 84 virtual void OnSetSuggestedSearchText(const string16& suggested_text) {} | |
| 85 virtual void OnPopupBoundsChanged(const gfx::Rect& bounds) {} | 84 virtual void OnPopupBoundsChanged(const gfx::Rect& bounds) {} |
| 86 virtual void OnAutocompleteAccept(const GURL& url, | 85 virtual void OnAutocompleteAccept(const GURL& url, |
| 87 WindowOpenDisposition disposition, | 86 WindowOpenDisposition disposition, |
| 88 PageTransition::Type transition, | 87 PageTransition::Type transition, |
| 89 const GURL& alternate_nav_url) {} | 88 const GURL& alternate_nav_url) {} |
| 90 virtual void OnChanged() {} | 89 virtual void OnChanged() {} |
| 91 virtual void OnSelectionBoundsChanged() {} | 90 virtual void OnSelectionBoundsChanged() {} |
| 92 virtual void OnInputInProgress(bool in_progress) {} | 91 virtual void OnInputInProgress(bool in_progress) {} |
| 93 virtual void OnKillFocus() {} | 92 virtual void OnKillFocus() {} |
| 94 virtual void OnSetFocus() {} | 93 virtual void OnSetFocus() {} |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 GURL url; | 153 GURL url; |
| 155 bool write_url; | 154 bool write_url; |
| 156 model.AdjustTextForCopy(input[i].sel_start, input[i].is_all_selected, | 155 model.AdjustTextForCopy(input[i].sel_start, input[i].is_all_selected, |
| 157 &result, &url, &write_url); | 156 &result, &url, &write_url); |
| 158 EXPECT_EQ(input[i].expected_output, result) << "@: " << i; | 157 EXPECT_EQ(input[i].expected_output, result) << "@: " << i; |
| 159 EXPECT_EQ(input[i].write_url, write_url) << " @" << i; | 158 EXPECT_EQ(input[i].write_url, write_url) << " @" << i; |
| 160 if (write_url) | 159 if (write_url) |
| 161 EXPECT_EQ(input[i].expected_url, url.spec()) << " @" << i; | 160 EXPECT_EQ(input[i].expected_url, url.spec()) << " @" << i; |
| 162 } | 161 } |
| 163 } | 162 } |
| OLD | NEW |