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

Unified Diff: content/shell/app/webkit_test_platform_support_mac.mm

Issue 642813006: content: Rename webkit_test_platform_support* to blink_test_platform_support* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix GN 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/app/webkit_test_platform_support_mac.mm
diff --git a/content/shell/app/webkit_test_platform_support_mac.mm b/content/shell/app/webkit_test_platform_support_mac.mm
deleted file mode 100644
index bc042f9012bf91b9dd54acb0b92e6e9d1f042c3e..0000000000000000000000000000000000000000
--- a/content/shell/app/webkit_test_platform_support_mac.mm
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "base/mac/bundle_locations.h"
-#include "base/path_service.h"
-#include "content/public/common/content_switches.h"
-#include "content/shell/app/webkit_test_platform_support.h"
-
-#include <AppKit/AppKit.h>
-#include <Foundation/Foundation.h>
-
-namespace content {
-
-namespace {
-
-void SetDefaultsToLayoutTestValues(void) {
- // So we can match the WebKit layout tests, we want to force a bunch of
- // preferences that control appearance to match.
- // (We want to do this as early as possible in application startup so
- // the settings are in before any higher layers could cache values.)
-
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- // Do not set text-rendering prefs (AppleFontSmoothing,
- // AppleAntiAliasingThreshold) here: Skia picks the right settings for this
- // in layout test mode, see FontSkia.cpp in WebKit and
- // SkFontHost_mac_coretext.cpp in skia.
- const NSInteger kBlueTintedAppearance = 1;
- [defaults setInteger:kBlueTintedAppearance
- forKey:@"AppleAquaColorVariant"];
- [defaults setObject:@"0.709800 0.835300 1.000000"
- forKey:@"AppleHighlightColor"];
- [defaults setObject:@"0.500000 0.500000 0.500000"
- forKey:@"AppleOtherHighlightColor"];
- [defaults setObject:[NSArray arrayWithObject:@"en"]
- forKey:@"AppleLanguages"];
- [defaults setBool:NO
- forKey:@"AppleScrollAnimationEnabled"];
- [defaults setObject:@"Always"
- forKey:@"AppleShowScrollBars"];
-}
-
-} // namespace
-
-bool CheckLayoutSystemDeps() {
- return true;
-}
-
-bool WebKitTestPlatformInitialize() {
-
- SetDefaultsToLayoutTestValues();
-
- // Load font files in the resource folder.
- static const char* const fontFileNames[] = {
- "AHEM____.TTF", "ChromiumAATTest.ttf"
- };
-
- // mainBundle is Content Shell Helper.app. Go two levels up to find
- // Content Shell.app. Due to DumpRenderTree injecting the font files into
- // its direct dependents, it's not easily possible to put the ttf files into
- // the helper's resource directory instead of the outer bundle's resource
- // directory.
- NSString* bundle = [base::mac::FrameworkBundle() bundlePath];
- bundle = [bundle stringByAppendingPathComponent:@"../.."];
- NSURL* resources_directory = [[NSBundle bundleWithPath:bundle] resourceURL];
-
- NSMutableArray* font_urls = [NSMutableArray array];
- for (unsigned i = 0; i < arraysize(fontFileNames); ++i) {
- NSURL* font_url = [resources_directory
- URLByAppendingPathComponent:[NSString
- stringWithUTF8String:fontFileNames[i]]];
- [font_urls addObject:[font_url absoluteURL]];
- }
-
- CFArrayRef errors = 0;
- if (!CTFontManagerRegisterFontsForURLs((CFArrayRef)font_urls,
- kCTFontManagerScopeProcess,
- &errors)) {
- DLOG(FATAL) << "Fail to activate fonts.";
- CFRelease(errors);
- }
-
- // Add <app bundle's parent dir>/plugins to the plugin path so we can load
- // test plugins.
- base::FilePath plugins_dir;
- PathService::Get(base::DIR_EXE, &plugins_dir);
- plugins_dir = plugins_dir.AppendASCII("../../../plugins");
- CommandLine& command_line = *CommandLine::ForCurrentProcess();
- command_line.AppendSwitchPath(switches::kExtraPluginDir, plugins_dir);
-
- return true;
-}
-
-} // namespace
« no previous file with comments | « content/shell/app/webkit_test_platform_support_linux.cc ('k') | content/shell/app/webkit_test_platform_support_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698