OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gtk/keyword_editor_view.h" | 5 #include "chrome/browser/ui/gtk/keyword_editor_view.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "chrome/browser/gtk/gtk_tree.h" | |
16 #include "chrome/browser/search_engines/template_url.h" | 15 #include "chrome/browser/search_engines/template_url.h" |
17 #include "chrome/browser/search_engines/template_url_model.h" | 16 #include "chrome/browser/search_engines/template_url_model.h" |
18 #include "chrome/browser/search_engines/template_url_table_model.h" | 17 #include "chrome/browser/search_engines/template_url_table_model.h" |
| 18 #include "chrome/browser/ui/gtk/gtk_tree.h" |
19 #include "chrome/test/testing_profile.h" | 19 #include "chrome/test/testing_profile.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
22 class KeywordEditorViewTest : public testing::Test { | 22 class KeywordEditorViewTest : public testing::Test { |
23 public: | 23 public: |
24 virtual void SetUp() { | 24 virtual void SetUp() { |
25 profile_.reset(new TestingProfile()); | 25 profile_.reset(new TestingProfile()); |
26 profile_->CreateTemplateURLModel(); | 26 profile_->CreateTemplateURLModel(); |
27 } | 27 } |
28 | 28 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 editor.OnEditedKeyword(d, ASCIIToUTF16("DD"), ASCIIToUTF16("d"), | 262 editor.OnEditedKeyword(d, ASCIIToUTF16("DD"), ASCIIToUTF16("d"), |
263 "example.com"); | 263 "example.com"); |
264 EXPECT_STREQ("!,_,AA,BBB,_,@,_,C,DD", | 264 EXPECT_STREQ("!,_,AA,BBB,_,@,_,C,DD", |
265 GetDisplayedEngines(editor).c_str()); | 265 GetDisplayedEngines(editor).c_str()); |
266 | 266 |
267 editor.OnEditedKeyword(c, ASCIIToUTF16("CC"), ASCIIToUTF16("cc"), | 267 editor.OnEditedKeyword(c, ASCIIToUTF16("CC"), ASCIIToUTF16("cc"), |
268 "example.com"); | 268 "example.com"); |
269 EXPECT_STREQ("!,_,AA,BBB,_,@,_,CC,DD", | 269 EXPECT_STREQ("!,_,AA,BBB,_,@,_,CC,DD", |
270 GetDisplayedEngines(editor).c_str()); | 270 GetDisplayedEngines(editor).c_str()); |
271 } | 271 } |
OLD | NEW |