OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/scoped_nsobject.h" | 5 #include "base/scoped_nsobject.h" |
6 #include "chrome/browser/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
7 #include "chrome/browser/search_engines/template_url.h" | 7 #include "chrome/browser/search_engines/template_url.h" |
8 #include "chrome/browser/search_engines/template_url_model.h" | 8 #include "chrome/browser/search_engines/template_url_model.h" |
9 #include "chrome/browser/ui/cocoa/browser_test_helper.h" | 9 #include "chrome/browser/ui/cocoa/browser_test_helper.h" |
10 #import "chrome/browser/ui/cocoa/search_engine_list_model.h" | 10 #import "chrome/browser/ui/cocoa/search_engine_list_model.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #import "testing/gtest_mac.h" | 12 #import "testing/gtest_mac.h" |
13 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
14 | 14 |
15 // A helper for NSNotifications. Makes a note that it's been called back. | 15 // A helper for NSNotifications. Makes a note that it's been called back. |
16 @interface SearchEngineListHelper : NSObject { | 16 @interface SearchEngineListHelper : NSObject { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // Add one more item to force a notification. | 143 // Add one more item to force a notification. |
144 TemplateURL* t_url = new TemplateURL(); | 144 TemplateURL* t_url = new TemplateURL(); |
145 t_url->SetURL("http://www.google3.com/foo/bar", 0, 0); | 145 t_url->SetURL("http://www.google3.com/foo/bar", 0, 0); |
146 t_url->set_keyword(L"keyword3"); | 146 t_url->set_keyword(L"keyword3"); |
147 t_url->set_short_name(L"google3"); | 147 t_url->set_short_name(L"google3"); |
148 t_url->set_show_in_default_list(true); | 148 t_url->set_show_in_default_list(true); |
149 template_model_->Add(t_url); | 149 template_model_->Add(t_url); |
150 | 150 |
151 EXPECT_TRUE(notification_helper_.get()->sawNotification_); | 151 EXPECT_TRUE(notification_helper_.get()->sawNotification_); |
152 } | 152 } |
OLD | NEW |