Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_unittest.cc

Issue 6462009: Allow dragging and dropping of URLs to any portion of the toolbar view.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_profile.h" 8 #include "chrome/test/testing_profile.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 virtual bool OnAfterPossibleChange() { return false; } 55 virtual bool OnAfterPossibleChange() { return false; }
56 virtual gfx::NativeView GetNativeView() const { return 0; } 56 virtual gfx::NativeView GetNativeView() const { return 0; }
57 virtual CommandUpdater* GetCommandUpdater() { return NULL; } 57 virtual CommandUpdater* GetCommandUpdater() { return NULL; }
58 virtual void SetInstantSuggestion(const string16& input) {} 58 virtual void SetInstantSuggestion(const string16& input) {}
59 virtual string16 GetInstantSuggestion() const { return string16(); } 59 virtual string16 GetInstantSuggestion() const { return string16(); }
60 virtual int TextWidth() const { return 0; } 60 virtual int TextWidth() const { return 0; }
61 virtual bool IsImeComposing() const { return false; } 61 virtual bool IsImeComposing() const { return false; }
62 62
63 #if defined(TOOLKIT_VIEWS) 63 #if defined(TOOLKIT_VIEWS)
64 virtual views::View* AddToView(views::View* parent) { return NULL; } 64 virtual views::View* AddToView(views::View* parent) { return NULL; }
65 virtual int OnPerformDrop(const views::DropTargetEvent& event) { return 0; }
65 #endif 66 #endif
66 67
67 private: 68 private:
68 DISALLOW_COPY_AND_ASSIGN(TestingAutocompleteEditView); 69 DISALLOW_COPY_AND_ASSIGN(TestingAutocompleteEditView);
69 }; 70 };
70 71
71 class TestingAutocompleteEditController : public AutocompleteEditController { 72 class TestingAutocompleteEditController : public AutocompleteEditController {
72 public: 73 public:
73 TestingAutocompleteEditController() {} 74 TestingAutocompleteEditController() {}
74 virtual void OnAutocompleteWillClosePopup() {} 75 virtual void OnAutocompleteWillClosePopup() {}
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 GURL url; 153 GURL url;
153 bool write_url; 154 bool write_url;
154 model.AdjustTextForCopy(input[i].sel_start, input[i].is_all_selected, 155 model.AdjustTextForCopy(input[i].sel_start, input[i].is_all_selected,
155 &result, &url, &write_url); 156 &result, &url, &write_url);
156 EXPECT_EQ(ASCIIToUTF16(input[i].expected_output), result) << "@: " << i; 157 EXPECT_EQ(ASCIIToUTF16(input[i].expected_output), result) << "@: " << i;
157 EXPECT_EQ(input[i].write_url, write_url) << " @" << i; 158 EXPECT_EQ(input[i].write_url, write_url) << " @" << i;
158 if (write_url) 159 if (write_url)
159 EXPECT_EQ(input[i].expected_url, url.spec()) << " @" << i; 160 EXPECT_EQ(input[i].expected_url, url.spec()) << " @" << i;
160 } 161 }
161 } 162 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698