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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 6 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
7 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 7 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" |
8 #include "chrome/test/testing_browser_process.h" | 8 #include "chrome/test/testing_browser_process.h" |
9 #include "chrome/test/testing_profile.h" | 9 #include "chrome/test/testing_profile.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 bool save_original_selection) {} | 49 bool save_original_selection) {} |
50 virtual bool OnInlineAutocompleteTextMaybeChanged( | 50 virtual bool OnInlineAutocompleteTextMaybeChanged( |
51 const string16& display_text, size_t user_text_length) { | 51 const string16& display_text, size_t user_text_length) { |
52 return false; | 52 return false; |
53 } | 53 } |
54 virtual void OnRevertTemporaryText() {} | 54 virtual void OnRevertTemporaryText() {} |
55 virtual void OnBeforePossibleChange() {} | 55 virtual void OnBeforePossibleChange() {} |
56 virtual bool OnAfterPossibleChange() { return false; } | 56 virtual bool OnAfterPossibleChange() { return false; } |
57 virtual gfx::NativeView GetNativeView() const { return 0; } | 57 virtual gfx::NativeView GetNativeView() const { return 0; } |
58 virtual CommandUpdater* GetCommandUpdater() { return NULL; } | 58 virtual CommandUpdater* GetCommandUpdater() { return NULL; } |
59 virtual void SetInstantSuggestion(const string16& input) {} | 59 virtual void SetInstantSuggestion(const string16& input, |
| 60 bool animate_to_complete) {} |
60 virtual string16 GetInstantSuggestion() const { return string16(); } | 61 virtual string16 GetInstantSuggestion() const { return string16(); } |
61 virtual int TextWidth() const { return 0; } | 62 virtual int TextWidth() const { return 0; } |
62 virtual bool IsImeComposing() const { return false; } | 63 virtual bool IsImeComposing() const { return false; } |
63 | 64 |
64 #if defined(TOOLKIT_VIEWS) | 65 #if defined(TOOLKIT_VIEWS) |
65 virtual views::View* AddToView(views::View* parent) { return NULL; } | 66 virtual views::View* AddToView(views::View* parent) { return NULL; } |
66 virtual int OnPerformDrop(const views::DropTargetEvent& event) { return 0; } | 67 virtual int OnPerformDrop(const views::DropTargetEvent& event) { return 0; } |
67 #endif | 68 #endif |
68 | 69 |
69 private: | 70 private: |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 GURL url; | 150 GURL url; |
150 bool write_url; | 151 bool write_url; |
151 model.AdjustTextForCopy(input[i].sel_start, input[i].is_all_selected, | 152 model.AdjustTextForCopy(input[i].sel_start, input[i].is_all_selected, |
152 &result, &url, &write_url); | 153 &result, &url, &write_url); |
153 EXPECT_EQ(ASCIIToUTF16(input[i].expected_output), result) << "@: " << i; | 154 EXPECT_EQ(ASCIIToUTF16(input[i].expected_output), result) << "@: " << i; |
154 EXPECT_EQ(input[i].write_url, write_url) << " @" << i; | 155 EXPECT_EQ(input[i].write_url, write_url) << " @" << i; |
155 if (write_url) | 156 if (write_url) |
156 EXPECT_EQ(input[i].expected_url, url.spec()) << " @" << i; | 157 EXPECT_EQ(input[i].expected_url, url.spec()) << " @" << i; |
157 } | 158 } |
158 } | 159 } |
OLD | NEW |