Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 #include "chrome/browser/sync/profile_sync_service_harness.h" 6 #include "chrome/browser/sync/profile_sync_service_harness.h"
7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
8 #include "chrome/browser/sync/test/integration/sync_test.h" 8 #include "chrome/browser/sync/test/integration/sync_test.h"
9 #include "ui/base/layout.h" 9 #include "ui/base/layout.h"
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // of storing the favicon data from sync to the database or in the process 156 // of storing the favicon data from sync to the database or in the process
157 // of requesting data from the database for sync. 157 // of requesting data from the database for sync.
158 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, 158 IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest,
159 SetFaviconHiDPIDifferentCodec) { 159 SetFaviconHiDPIDifferentCodec) {
160 // Set the supported scale factors to 1x and 2x such that 160 // Set the supported scale factors to 1x and 2x such that
161 // BookmarkModel::GetFavicon() requests both 1x and 2x. 161 // BookmarkModel::GetFavicon() requests both 1x and 2x.
162 // 1x -> for sync, 2x -> for the UI. 162 // 1x -> for sync, 2x -> for the UI.
163 std::vector<ui::ScaleFactor> supported_scale_factors; 163 std::vector<ui::ScaleFactor> supported_scale_factors;
164 supported_scale_factors.push_back(ui::SCALE_FACTOR_100P); 164 supported_scale_factors.push_back(ui::SCALE_FACTOR_100P);
165 supported_scale_factors.push_back(ui::SCALE_FACTOR_200P); 165 supported_scale_factors.push_back(ui::SCALE_FACTOR_200P);
166 ui::test::SetSupportedScaleFactors(supported_scale_factors); 166 ui::SetSupportedScaleFactors(supported_scale_factors);
167 167
168 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 168 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
169 ASSERT_TRUE(ModelMatchesVerifier(0)); 169 ASSERT_TRUE(ModelMatchesVerifier(0));
170 170
171 const GURL page_url("http://www.google.com"); 171 const GURL page_url("http://www.google.com");
172 const GURL icon_url("http://www.google.com/favicon.ico"); 172 const GURL icon_url("http://www.google.com/favicon.ico");
173 const BookmarkNode* bookmark = AddURL(0, L"title", page_url); 173 const BookmarkNode* bookmark = AddURL(0, L"title", page_url);
174 174
175 // Simulate receiving a favicon from sync encoded by a different PNG encoder 175 // Simulate receiving a favicon from sync encoded by a different PNG encoder
176 // than the one native to the OS. This tests the PNG data is not decoded to 176 // than the one native to the OS. This tests the PNG data is not decoded to
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 // Remove all 238 // Remove all
239 RemoveAll(0); 239 RemoveAll(0);
240 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("All Bookmarks removed.")); 240 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("All Bookmarks removed."));
241 // Verify other node has no children now. 241 // Verify other node has no children now.
242 EXPECT_EQ(0, GetOtherNode(0)->child_count()); 242 EXPECT_EQ(0, GetOtherNode(0)->child_count());
243 EXPECT_EQ(0, GetBookmarkBarNode(0)->child_count()); 243 EXPECT_EQ(0, GetBookmarkBarNode(0)->child_count());
244 // Verify model matches verifier. 244 // Verify model matches verifier.
245 ASSERT_TRUE(ModelMatchesVerifier(0)); 245 ASSERT_TRUE(ModelMatchesVerifier(0));
246 } 246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698