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

Side by Side Diff: ui/base/resource/resource_bundle_unittest.cc

Issue 611513003: Disable DelegateGetFontList test on Android through C++. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 6 years, 2 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 | « build/android/pylib/gtest/filter/ui_unittests_disabled ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/base/resource/resource_bundle.h" 5 #include "ui/base/resource/resource_bundle.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/big_endian.h" 8 #include "base/big_endian.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 EXPECT_CALL(delegate, GetLocalizedStringMock(resource_id)).Times(1).WillOnce( 336 EXPECT_CALL(delegate, GetLocalizedStringMock(resource_id)).Times(1).WillOnce(
337 Return(delegate_data)); 337 Return(delegate_data));
338 338
339 base::string16 override_data = base::ASCIIToUTF16("My override data"); 339 base::string16 override_data = base::ASCIIToUTF16("My override data");
340 340
341 base::string16 result = resource_bundle->GetLocalizedString(resource_id); 341 base::string16 result = resource_bundle->GetLocalizedString(resource_id);
342 EXPECT_EQ(delegate_data, result); 342 EXPECT_EQ(delegate_data, result);
343 } 343 }
344 344
345 #if defined(USE_OZONE) && !defined(USE_PANGO) 345 #if (defined(USE_OZONE) && !defined(USE_PANGO)) || defined(OS_ANDROID)
346 #define MAYBE_DelegateGetFontList DISABLED_DelegateGetFontList 346 #define MAYBE_DelegateGetFontList DISABLED_DelegateGetFontList
347 #else 347 #else
348 #define MAYBE_DelegateGetFontList DelegateGetFontList 348 #define MAYBE_DelegateGetFontList DelegateGetFontList
349 #endif 349 #endif
350 350
351 TEST_F(ResourceBundleTest, MAYBE_DelegateGetFontList) { 351 TEST_F(ResourceBundleTest, MAYBE_DelegateGetFontList) {
352 MockResourceBundleDelegate delegate; 352 MockResourceBundleDelegate delegate;
353 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate); 353 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
354 354
355 // Should be called once for each font type. When we return NULL the default 355 // Should be called once for each font type. When we return NULL the default
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); 621 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE);
622 622
623 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); 623 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3);
624 EXPECT_EQ(1u, image_skia->image_reps().size()); 624 EXPECT_EQ(1u, image_skia->image_reps().size());
625 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); 625 EXPECT_TRUE(image_skia->image_reps()[0].unscaled());
626 EXPECT_EQ(ui::SCALE_FACTOR_100P, 626 EXPECT_EQ(ui::SCALE_FACTOR_100P,
627 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); 627 GetSupportedScaleFactor(image_skia->image_reps()[0].scale()));
628 } 628 }
629 629
630 } // namespace ui 630 } // namespace ui
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/filter/ui_unittests_disabled ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698