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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc

Issue 2902153002: arc: Support non-standard display scale factors. (Closed)
Patch Set: rebase + unit test update to match this CL Created 3 years, 7 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
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_unittest.cc ('k') | ui/gfx/image/image_skia.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 2297
2298 // Register fake ARC apps. 2298 // Register fake ARC apps.
2299 SendListOfArcApps(); 2299 SendListOfArcApps();
2300 // Use first fake ARC app for testing. 2300 // Use first fake ARC app for testing.
2301 const std::string arc_app_id = ArcAppTest::GetAppId(arc_test_.fake_apps()[0]); 2301 const std::string arc_app_id = ArcAppTest::GetAppId(arc_test_.fake_apps()[0]);
2302 2302
2303 // Generate icon for the testing app and use compressed png content as test 2303 // Generate icon for the testing app and use compressed png content as test
2304 // input. 2304 // input.
2305 std::string png_data; 2305 std::string png_data;
2306 EXPECT_TRUE(arc_test_.app_instance()->GenerateAndSendIcon( 2306 EXPECT_TRUE(arc_test_.app_instance()->GenerateAndSendIcon(
2307 arc_test_.fake_apps()[0], arc::mojom::ScaleFactor::SCALE_FACTOR_300P, 2307 arc_test_.fake_apps()[0], arc::mojom::ScaleFactor::SCALE_FACTOR_100P,
2308 &png_data)); 2308 &png_data));
2309 EXPECT_FALSE(png_data.empty()); 2309 EXPECT_FALSE(png_data.empty());
2310 // Some input that represents invalid png content. 2310 // Some input that represents invalid png content.
2311 std::string invalid_png_data("aaaaaa"); 2311 std::string invalid_png_data("aaaaaa");
2312 2312
2313 EXPECT_FALSE(launcher_controller_->GetItem(ash::ShelfID(arc_app_id))); 2313 EXPECT_FALSE(launcher_controller_->GetItem(ash::ShelfID(arc_app_id)));
2314 std::string window_app_id1("org.chromium.arc.1"); 2314 std::string window_app_id1("org.chromium.arc.1");
2315 std::string window_app_id2("org.chromium.arc.2"); 2315 std::string window_app_id2("org.chromium.arc.2");
2316 views::Widget* window1 = CreateArcWindow(window_app_id1); 2316 views::Widget* window1 = CreateArcWindow(window_app_id1);
2317 ASSERT_TRUE(window1 && window1->GetNativeWindow()); 2317 ASSERT_TRUE(window1 && window1->GetNativeWindow());
(...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
4285 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 4285 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
4286 shelf_controller->auto_hide()); 4286 shelf_controller->auto_hide());
4287 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); 4287 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count());
4288 4288
4289 PrefService* prefs = profile()->GetTestingPrefService(); 4289 PrefService* prefs = profile()->GetTestingPrefService();
4290 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); 4290 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal));
4291 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); 4291 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment));
4292 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); 4292 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal));
4293 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); 4293 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior));
4294 } 4294 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_unittest.cc ('k') | ui/gfx/image/image_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698