| 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 "base/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "base/time.h" | 6 #include "base/time.h" |
| 7 #include "chrome/browser/bookmarks/bookmark_table_model.h" | 7 #include "chrome/browser/bookmarks/bookmark_table_model.h" |
| 8 #include "chrome/test/testing_profile.h" | 8 #include "chrome/test/testing_profile.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 #include "generated_resources.h" | 11 #include "generated_resources.h" |
| 12 | 12 |
| 13 using base::Time; |
| 14 using base::TimeDelta; |
| 15 |
| 13 // Base class for bookmark model tests. | 16 // Base class for bookmark model tests. |
| 14 // Initial state of the bookmark model is as follows: | 17 // Initial state of the bookmark model is as follows: |
| 15 // bb | 18 // bb |
| 16 // url1 (t0) | 19 // url1 (t0) |
| 17 // f1 | 20 // f1 |
| 18 // o | 21 // o |
| 19 // url2 (t0 + 2) | 22 // url2 (t0 + 2) |
| 20 // f2 | 23 // f2 |
| 21 // url3 (t0 + 1) | 24 // url3 (t0 + 1) |
| 22 class BookmarkTableModelTest : public testing::Test, | 25 class BookmarkTableModelTest : public testing::Test, |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // Change a folder, this shouldn't change the model. | 290 // Change a folder, this shouldn't change the model. |
| 288 bookmark_model()->SetTitle(bookmark_model()->other_node()->GetChild(1), | 291 bookmark_model()->SetTitle(bookmark_model()->other_node()->GetChild(1), |
| 289 L"new"); | 292 L"new"); |
| 290 VerifyAndClearOberserverCounts(0, 0, 0, 0); | 293 VerifyAndClearOberserverCounts(0, 0, 0, 0); |
| 291 | 294 |
| 292 // Change a url that isn't in the model, this shouldn't send change. | 295 // Change a url that isn't in the model, this shouldn't send change. |
| 293 bookmark_model()->SetTitle(bookmark_model()->other_node()->GetChild(0), | 296 bookmark_model()->SetTitle(bookmark_model()->other_node()->GetChild(0), |
| 294 L"new"); | 297 L"new"); |
| 295 VerifyAndClearOberserverCounts(0, 0, 0, 0); | 298 VerifyAndClearOberserverCounts(0, 0, 0, 0); |
| 296 } | 299 } |
| OLD | NEW |