OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 model->AddURL(bb_node, i, child->GetTitle(), | 780 model->AddURL(bb_node, i, child->GetTitle(), |
781 GURL("http://" + UTF16ToASCII(child->GetTitle()))); | 781 GURL("http://" + UTF16ToASCII(child->GetTitle()))); |
782 } | 782 } |
783 } | 783 } |
784 } | 784 } |
785 | 785 |
786 // Test class that creates a BookmarkModel with a real history backend. | 786 // Test class that creates a BookmarkModel with a real history backend. |
787 class BookmarkModelTestWithProfile : public testing::Test { | 787 class BookmarkModelTestWithProfile : public testing::Test { |
788 public: | 788 public: |
789 BookmarkModelTestWithProfile() | 789 BookmarkModelTestWithProfile() |
790 : ui_thread_(BrowserThread::UI, &message_loop_), | 790 : bb_model_(NULL), |
| 791 ui_thread_(BrowserThread::UI, &message_loop_), |
791 file_thread_(BrowserThread::FILE, &message_loop_) {} | 792 file_thread_(BrowserThread::FILE, &message_loop_) {} |
792 | 793 |
793 // testing::Test: | 794 // testing::Test: |
794 virtual void TearDown() OVERRIDE { | 795 virtual void TearDown() OVERRIDE { |
795 profile_.reset(NULL); | 796 profile_.reset(NULL); |
796 } | 797 } |
797 | 798 |
798 protected: | 799 protected: |
799 // Verifies the contents of the bookmark bar node match the contents of the | 800 // Verifies the contents of the bookmark bar node match the contents of the |
800 // TestNode. | 801 // TestNode. |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 AssertExtensiveChangesObserverCount(1, 0); | 1162 AssertExtensiveChangesObserverCount(1, 0); |
1162 model_.EndExtensiveChanges(); | 1163 model_.EndExtensiveChanges(); |
1163 EXPECT_TRUE(model_.IsDoingExtensiveChanges()); | 1164 EXPECT_TRUE(model_.IsDoingExtensiveChanges()); |
1164 AssertExtensiveChangesObserverCount(1, 0); | 1165 AssertExtensiveChangesObserverCount(1, 0); |
1165 model_.EndExtensiveChanges(); | 1166 model_.EndExtensiveChanges(); |
1166 EXPECT_FALSE(model_.IsDoingExtensiveChanges()); | 1167 EXPECT_FALSE(model_.IsDoingExtensiveChanges()); |
1167 AssertExtensiveChangesObserverCount(1, 1); | 1168 AssertExtensiveChangesObserverCount(1, 1); |
1168 } | 1169 } |
1169 | 1170 |
1170 } // namespace | 1171 } // namespace |
OLD | NEW |