Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "webkit/tools/test_shell/test_shell.h" | 5 #include "webkit/tools/test_shell/test_shell.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <fontconfig/fontconfig.h> | 9 #include <fontconfig/fontconfig.h> |
| 10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 // Convert a FilePath into an FcChar* (used by fontconfig). | 36 // Convert a FilePath into an FcChar* (used by fontconfig). |
| 37 // The pointer only lives for the duration for the expression. | 37 // The pointer only lives for the duration for the expression. |
| 38 const FcChar8* FilePathAsFcChar(const FilePath& path) { | 38 const FcChar8* FilePathAsFcChar(const FilePath& path) { |
| 39 return reinterpret_cast<const FcChar8*>(path.value().c_str()); | 39 return reinterpret_cast<const FcChar8*>(path.value().c_str()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 } | 42 } |
| 43 | 43 |
| 44 extern "C" { | |
| 45 extern gint moz_gtk_init(); | |
|
Evan Martin
2009/01/14 18:58:19
#include "gtkdrawing.h"
?
| |
| 46 } | |
| 47 | |
| 44 // static | 48 // static |
| 45 void TestShell::InitializeTestShell(bool layout_test_mode) { | 49 void TestShell::InitializeTestShell(bool layout_test_mode) { |
| 46 window_list_ = new WindowList; | 50 window_list_ = new WindowList; |
| 47 layout_test_mode_ = layout_test_mode; | 51 layout_test_mode_ = layout_test_mode; |
| 48 | 52 |
| 53 moz_gtk_init(); | |
| 54 | |
| 49 web_prefs_ = new WebPreferences; | 55 web_prefs_ = new WebPreferences; |
| 50 | 56 |
| 51 ResetWebPreferences(); | 57 ResetWebPreferences(); |
| 52 | 58 |
| 53 // We wish to make the layout tests reproducable with respect to fonts. Skia | 59 // We wish to make the layout tests reproducable with respect to fonts. Skia |
| 54 // uses fontconfig to resolve font family names from WebKit into actual font | 60 // uses fontconfig to resolve font family names from WebKit into actual font |
| 55 // files found on the current system. This means that fonts vary based on the | 61 // files found on the current system. This means that fonts vary based on the |
| 56 // system and also on the fontconfig configuration. | 62 // system and also on the fontconfig configuration. |
| 57 // | 63 // |
| 58 // To avoid this we initialise fontconfig here and install a configuration | 64 // To avoid this we initialise fontconfig here and install a configuration |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 768 } | 774 } |
| 769 | 775 |
| 770 bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { | 776 bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { |
| 771 // TODO(port): Implement plugins someday. Don't let the error message | 777 // TODO(port): Implement plugins someday. Don't let the error message |
| 772 // of NOTIMPLEMENTED into our layout test diffs. | 778 // of NOTIMPLEMENTED into our layout test diffs. |
| 773 // NOTIMPLEMENTED(); | 779 // NOTIMPLEMENTED(); |
| 774 return false; | 780 return false; |
| 775 } | 781 } |
| 776 | 782 |
| 777 } // namespace webkit_glue | 783 } // namespace webkit_glue |
| OLD | NEW |