| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/profile.h" | 5 #include "chrome/browser/profile.h" |
| 6 #include "chrome/browser/template_url.h" | 6 #include "chrome/browser/search_engines/template_url.h" |
| 7 #include "chrome/browser/template_url_model.h" | 7 #include "chrome/browser/search_engines/template_url_model.h" |
| 8 #include "chrome/browser/views/keyword_editor_view.h" | 8 #include "chrome/browser/views/keyword_editor_view.h" |
| 9 #include "chrome/test/testing_profile.h" | 9 #include "chrome/test/testing_profile.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 // Base class for keyword editor tests. Creates a profile containing an | 12 // Base class for keyword editor tests. Creates a profile containing an |
| 13 // empty TemplateURLModel. | 13 // empty TemplateURLModel. |
| 14 class KeywordEditorViewTest : public testing::Test, | 14 class KeywordEditorViewTest : public testing::Test, |
| 15 public views::TableModelObserver { | 15 public views::TableModelObserver { |
| 16 public: | 16 public: |
| 17 virtual void SetUp() { | 17 virtual void SetUp() { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 model_->Add(turl); | 136 model_->Add(turl); |
| 137 | 137 |
| 138 // Table model should have updated. | 138 // Table model should have updated. |
| 139 VerifyChangeCount(1, 0, 0, 0); | 139 VerifyChangeCount(1, 0, 0, 0); |
| 140 | 140 |
| 141 // And should contain the newly added TemplateURL. | 141 // And should contain the newly added TemplateURL. |
| 142 ASSERT_EQ(1, table_model()->RowCount()); | 142 ASSERT_EQ(1, table_model()->RowCount()); |
| 143 ASSERT_EQ(0, table_model()->IndexOfTemplateURL(turl)); | 143 ASSERT_EQ(0, table_model()->IndexOfTemplateURL(turl)); |
| 144 } | 144 } |
| 145 | 145 |
| OLD | NEW |