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

Side by Side Diff: chrome/browser/themes/browser_theme_pack_unittest.cc

Issue 19471005: Add custom default theme support and create a managed user default theme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't call NotifyThemeChanged if not ready. Created 7 years, 5 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/themes/browser_theme_pack.h" 5 #include "chrome/browser/themes/browser_theme_pack.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/themes/theme_properties.h" 13 #include "chrome/browser/themes/theme_properties.h"
14 #include "chrome/common/chrome_paths.h" 14 #include "chrome/common/chrome_paths.h"
15 #include "content/public/test/test_browser_thread.h" 15 #include "content/public/test/test_browser_thread.h"
16 #include "grit/theme_resources.h" 16 #include "grit/theme_resources.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "ui/gfx/color_utils.h" 18 #include "ui/gfx/color_utils.h"
19 #include "ui/gfx/image/image.h"
19 #include "ui/gfx/image/image_skia.h" 20 #include "ui/gfx/image/image_skia.h"
20 #include "ui/gfx/image/image_skia_rep.h" 21 #include "ui/gfx/image/image_skia_rep.h"
21 22
22 using content::BrowserThread; 23 using content::BrowserThread;
23 using extensions::Extension; 24 using extensions::Extension;
24 25
25 // Maps scale factors (enum values) to file path. 26 // Maps scale factors (enum values) to file path.
26 // A similar typedef in BrowserThemePack is private. 27 // A similar typedef in BrowserThemePack is private.
27 typedef std::map<ui::ScaleFactor, base::FilePath> TestScaleFactorToFileMap; 28 typedef std::map<ui::ScaleFactor, base::FilePath> TestScaleFactorToFileMap;
28 29
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } 602 }
602 603
603 // Part 2: Try to read back the data pack that we just wrote to disk. 604 // Part 2: Try to read back the data pack that we just wrote to disk.
604 { 605 {
605 scoped_refptr<BrowserThemePack> pack = 606 scoped_refptr<BrowserThemePack> pack =
606 BrowserThemePack::BuildFromDataPack(file, "gllekhaobjnhgeag"); 607 BrowserThemePack::BuildFromDataPack(file, "gllekhaobjnhgeag");
607 ASSERT_TRUE(pack.get()); 608 ASSERT_TRUE(pack.get());
608 VerifyHiDpiTheme(pack.get()); 609 VerifyHiDpiTheme(pack.get());
609 } 610 }
610 } 611 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | chrome/browser/themes/custom_theme_supplier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698