| 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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 if (!g_resource_data_pack->GetStringPiece(message_id, &res)) { | 633 if (!g_resource_data_pack->GetStringPiece(message_id, &res)) { |
| 634 LOG(FATAL) << "failed to load webkit string with id " << message_id; | 634 LOG(FATAL) << "failed to load webkit string with id " << message_id; |
| 635 } | 635 } |
| 636 | 636 |
| 637 return string16(reinterpret_cast<const char16*>(res.data()), | 637 return string16(reinterpret_cast<const char16*>(res.data()), |
| 638 res.length() / 2); | 638 res.length() / 2); |
| 639 } | 639 } |
| 640 | 640 |
| 641 base::StringPiece GetDataResource(int resource_id) { | 641 base::StringPiece GetDataResource(int resource_id) { |
| 642 switch (resource_id) { | 642 switch (resource_id) { |
| 643 case IDR_FEED_PREVIEW: | |
| 644 // It is necessary to return a feed preview template that contains | |
| 645 // a {{URL}} substring where the feed URL should go; see the code | |
| 646 // that computes feed previews in feed_preview.cc:MakeFeedPreview. | |
| 647 // This fixes issue #932714. | |
| 648 resource_id = IDR_FEED_PREVIEW_TESTSHELL; | |
| 649 break; | |
| 650 case IDR_BROKENIMAGE: | 643 case IDR_BROKENIMAGE: |
| 651 resource_id = IDR_BROKENIMAGE_TESTSHELL; | 644 resource_id = IDR_BROKENIMAGE_TESTSHELL; |
| 652 break; | 645 break; |
| 653 case IDR_TEXTAREA_RESIZER: | 646 case IDR_TEXTAREA_RESIZER: |
| 654 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; | 647 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; |
| 655 break; | 648 break; |
| 656 } | 649 } |
| 657 return TestShell::NetResourceProvider(resource_id); | 650 return TestShell::NetResourceProvider(resource_id); |
| 658 } | 651 } |
| 659 | 652 |
| 660 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { | 653 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { |
| 661 NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); | 654 NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); |
| 662 } | 655 } |
| 663 | 656 |
| 664 } // namespace webkit_glue | 657 } // namespace webkit_glue |
| OLD | NEW |