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

Side by Side Diff: chrome/browser/font_family_cache_unittest.cc

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/font_family_cache.h" 5 #include "chrome/browser/font_family_cache.h"
6 6
7 #include "base/macros.h"
7 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
9 #include "components/syncable_prefs/testing_pref_service_syncable.h" 10 #include "components/syncable_prefs/testing_pref_service_syncable.h"
10 #include "content/public/test/test_browser_thread_bundle.h" 11 #include "content/public/test/test_browser_thread_bundle.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 namespace { 14 namespace {
14 15
15 class TestingFontFamilyCache : public FontFamilyCache { 16 class TestingFontFamilyCache : public FontFamilyCache {
16 public: 17 public:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 EXPECT_EQ(font1, result); 70 EXPECT_EQ(font1, result);
70 EXPECT_EQ(1, cache.fetch_font_count_); 71 EXPECT_EQ(1, cache.fetch_font_count_);
71 72
72 // Changing the preferences invalidates the cache. 73 // Changing the preferences invalidates the cache.
73 prefs->SetString(pref_name.c_str(), font2.c_str()); 74 prefs->SetString(pref_name.c_str(), font2.c_str());
74 result = base::UTF16ToUTF8( 75 result = base::UTF16ToUTF8(
75 cache.FetchAndCacheFont(script.c_str(), map_name.c_str())); 76 cache.FetchAndCacheFont(script.c_str(), map_name.c_str()));
76 EXPECT_EQ(font2, result); 77 EXPECT_EQ(font2, result);
77 EXPECT_EQ(2, cache.fetch_font_count_); 78 EXPECT_EQ(2, cache.fetch_font_count_);
78 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/font_family_cache.cc ('k') | chrome/browser/geolocation/chrome_access_token_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698