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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/timer.h" | 6 #include "base/timer.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // Sanity check that bookmarks from different profiles are separate. | 100 // Sanity check that bookmarks from different profiles are separate. |
101 // DISABLED_ because it regularly times out: http://crbug.com/159002. | 101 // DISABLED_ because it regularly times out: http://crbug.com/159002. |
102 IN_PROC_BROWSER_TEST_F(BookmarkBrowsertest, DISABLED_MultiProfile) { | 102 IN_PROC_BROWSER_TEST_F(BookmarkBrowsertest, DISABLED_MultiProfile) { |
103 base::ScopedTempDir temp_dir; | 103 base::ScopedTempDir temp_dir; |
104 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 104 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
105 | 105 |
106 BookmarkModel* bookmark_model1 = WaitForBookmarkModel(browser()->profile()); | 106 BookmarkModel* bookmark_model1 = WaitForBookmarkModel(browser()->profile()); |
107 | 107 |
108 ui_test_utils::BrowserAddedObserver observer; | 108 ui_test_utils::BrowserAddedObserver observer; |
109 g_browser_process->profile_manager()->CreateMultiProfileAsync( | 109 g_browser_process->profile_manager()->CreateMultiProfileAsync( |
110 string16(), string16(), ProfileManager::CreateCallback(), | 110 string16(), string16(), ProfileManager::CreateCallback(), false); |
111 chrome::HOST_DESKTOP_TYPE_NATIVE, false); | |
112 Browser* browser2 = observer.WaitForSingleNewBrowser(); | 111 Browser* browser2 = observer.WaitForSingleNewBrowser(); |
113 BookmarkModel* bookmark_model2 = WaitForBookmarkModel(browser2->profile()); | 112 BookmarkModel* bookmark_model2 = WaitForBookmarkModel(browser2->profile()); |
114 | 113 |
115 bookmark_utils::AddIfNotBookmarked( | 114 bookmark_utils::AddIfNotBookmarked( |
116 bookmark_model1, GURL(kPersistBookmarkURL), | 115 bookmark_model1, GURL(kPersistBookmarkURL), |
117 ASCIIToUTF16(kPersistBookmarkTitle)); | 116 ASCIIToUTF16(kPersistBookmarkTitle)); |
118 std::vector<BookmarkService::URLAndTitle> urls1, urls2; | 117 std::vector<BookmarkService::URLAndTitle> urls1, urls2; |
119 bookmark_model1->GetBookmarks(&urls1); | 118 bookmark_model1->GetBookmarks(&urls1); |
120 bookmark_model2->GetBookmarks(&urls2); | 119 bookmark_model2->GetBookmarks(&urls2); |
121 ASSERT_EQ(1u, urls1.size()); | 120 ASSERT_EQ(1u, urls1.size()); |
122 ASSERT_TRUE(urls2.empty()); | 121 ASSERT_TRUE(urls2.empty()); |
123 } | 122 } |
124 | 123 |
125 #endif | 124 #endif |
OLD | NEW |