| 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 // TODO(akalin): This file is basically just a unit test for | 5 // TODO(akalin): This file is basically just a unit test for |
| 6 // BookmarkChangeProcessor. Write unit tests for | 6 // BookmarkChangeProcessor. Write unit tests for |
| 7 // BookmarkModelAssociator separately. | 7 // BookmarkModelAssociator separately. |
| 8 | 8 |
| 9 #include <stack> | 9 #include <stack> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "content/test/test_browser_thread.h" | 37 #include "content/test/test_browser_thread.h" |
| 38 #include "testing/gmock/include/gmock/gmock.h" | 38 #include "testing/gmock/include/gmock/gmock.h" |
| 39 #include "testing/gtest/include/gtest/gtest.h" | 39 #include "testing/gtest/include/gtest/gtest.h" |
| 40 | 40 |
| 41 namespace browser_sync { | 41 namespace browser_sync { |
| 42 | 42 |
| 43 using testing::_; | 43 using testing::_; |
| 44 using testing::InvokeWithoutArgs; | 44 using testing::InvokeWithoutArgs; |
| 45 using testing::Mock; | 45 using testing::Mock; |
| 46 using testing::StrictMock; | 46 using testing::StrictMock; |
| 47 using content::BrowserThread; |
| 47 | 48 |
| 48 class TestBookmarkModelAssociator : public BookmarkModelAssociator { | 49 class TestBookmarkModelAssociator : public BookmarkModelAssociator { |
| 49 public: | 50 public: |
| 50 TestBookmarkModelAssociator( | 51 TestBookmarkModelAssociator( |
| 51 BookmarkModel* bookmark_model, | 52 BookmarkModel* bookmark_model, |
| 52 sync_api::UserShare* user_share, | 53 sync_api::UserShare* user_share, |
| 53 UnrecoverableErrorHandler* unrecoverable_error_handler) | 54 UnrecoverableErrorHandler* unrecoverable_error_handler) |
| 54 : BookmarkModelAssociator(bookmark_model, user_share, | 55 : BookmarkModelAssociator(bookmark_model, user_share, |
| 55 unrecoverable_error_handler), | 56 unrecoverable_error_handler), |
| 56 user_share_(user_share) {} | 57 user_share_(user_share) {} |
| (...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 // Make sure we're back in sync. In real life, the user would need | 1432 // Make sure we're back in sync. In real life, the user would need |
| 1432 // to reauthenticate before this happens, but in the test, authentication | 1433 // to reauthenticate before this happens, but in the test, authentication |
| 1433 // is sidestepped. | 1434 // is sidestepped. |
| 1434 ExpectBookmarkModelMatchesTestData(); | 1435 ExpectBookmarkModelMatchesTestData(); |
| 1435 ExpectModelMatch(); | 1436 ExpectModelMatch(); |
| 1436 } | 1437 } |
| 1437 | 1438 |
| 1438 } // namespace | 1439 } // namespace |
| 1439 | 1440 |
| 1440 } // namespace browser_sync | 1441 } // namespace browser_sync |
| OLD | NEW |