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

Side by Side Diff: chrome/browser/manifest/manifest_icon_selector_unittest.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: GetNativeScreen Created 4 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/manifest/manifest_icon_selector.h" 5 #include "chrome/browser/manifest/manifest_icon_selector.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/gfx/screen.h" 13 #include "ui/gfx/screen.h"
14 #include "ui/gfx/screen_type_delegate.h"
15 #include "ui/gfx/test/test_screen.h" 14 #include "ui/gfx/test/test_screen.h"
16 15
17 class ManifestIconSelectorTest : public testing::Test { 16 class ManifestIconSelectorTest : public testing::Test {
18 protected: 17 protected:
19 ManifestIconSelectorTest() { 18 ManifestIconSelectorTest() {
20 test_screen_.display()->set_id(0x1337); 19 test_screen_.display()->set_id(0x1337);
21 test_screen_.display()->set_bounds(gfx::Rect(0, 0, 2560, 1440)); 20 test_screen_.display()->set_bounds(gfx::Rect(0, 0, 2560, 1440));
22 } 21 }
23 22
24 ~ManifestIconSelectorTest() override {} 23 ~ManifestIconSelectorTest() override {}
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 479
481 std::vector<content::Manifest::Icon> icons; 480 std::vector<content::Manifest::Icon> icons;
482 icons.push_back(CreateIcon("http://foo.com/icon_no.png", "", 1.0, sizes)); 481 icons.push_back(CreateIcon("http://foo.com/icon_no.png", "", 1.0, sizes));
483 icons.push_back(CreateIcon("http://foo.com/icon.png", "", 3.0, sizes)); 482 icons.push_back(CreateIcon("http://foo.com/icon.png", "", 3.0, sizes));
484 483
485 SetDisplayDeviceScaleFactor(3.0f); 484 SetDisplayDeviceScaleFactor(3.0f);
486 GURL url = FindBestMatchingIcon(icons); 485 GURL url = FindBestMatchingIcon(icons);
487 EXPECT_EQ("http://foo.com/icon.png", url.spec()); 486 EXPECT_EQ("http://foo.com/icon.png", url.spec());
488 } 487 }
489 } 488 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698