| OLD | NEW |
| 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 "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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 } // namespace | 150 } // namespace |
| 151 | 151 |
| 152 // static | 152 // static |
| 153 void TestShell::InitializeTestShell(bool layout_test_mode, | 153 void TestShell::InitializeTestShell(bool layout_test_mode, |
| 154 bool allow_external_pages) { | 154 bool allow_external_pages) { |
| 155 window_list_ = new WindowList; | 155 window_list_ = new WindowList; |
| 156 layout_test_mode_ = layout_test_mode; | 156 layout_test_mode_ = layout_test_mode; |
| 157 allow_external_pages_ = allow_external_pages; | 157 allow_external_pages_ = allow_external_pages; |
| 158 | 158 |
| 159 web_prefs_ = new WebPreferences; | 159 web_prefs_ = new webkit_glue::WebPreferences; |
| 160 | 160 |
| 161 FilePath data_path; | 161 FilePath data_path; |
| 162 PathService::Get(base::DIR_EXE, &data_path); | 162 PathService::Get(base::DIR_EXE, &data_path); |
| 163 data_path = data_path.Append("test_shell.pak"); | 163 data_path = data_path.Append("test_shell.pak"); |
| 164 ResourceBundle::InitSharedInstanceWithPakFile(data_path); | 164 ResourceBundle::InitSharedInstanceWithPakFile(data_path); |
| 165 | 165 |
| 166 FilePath resources_dir; | 166 FilePath resources_dir; |
| 167 PathService::Get(base::DIR_SOURCE_ROOT, &resources_dir); | 167 PathService::Get(base::DIR_SOURCE_ROOT, &resources_dir); |
| 168 resources_dir = resources_dir.Append("webkit/tools/test_shell/resources"); | 168 resources_dir = resources_dir.Append("webkit/tools/test_shell/resources"); |
| 169 | 169 |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 switch (resource_id) { | 572 switch (resource_id) { |
| 573 case IDR_BROKENIMAGE: | 573 case IDR_BROKENIMAGE: |
| 574 resource_id = IDR_BROKENIMAGE_TESTSHELL; | 574 resource_id = IDR_BROKENIMAGE_TESTSHELL; |
| 575 break; | 575 break; |
| 576 case IDR_TEXTAREA_RESIZER: | 576 case IDR_TEXTAREA_RESIZER: |
| 577 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; | 577 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; |
| 578 break; | 578 break; |
| 579 } | 579 } |
| 580 return TestShell::ResourceProvider(resource_id); | 580 return TestShell::ResourceProvider(resource_id); |
| 581 } | 581 } |
| OLD | NEW |