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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 | 563 |
564 std::wstring frame_string; | 564 std::wstring frame_string; |
565 if (frame_name) | 565 if (frame_name) |
566 frame_string = frame_name; | 566 frame_string = frame_name; |
567 | 567 |
568 std::wstring path(url); | 568 std::wstring path(url); |
569 GURL gurl; | 569 GURL gurl; |
570 // PathExists will reject any string with no leading '/' | 570 // PathExists will reject any string with no leading '/' |
571 // as well as empty strings. | 571 // as well as empty strings. |
572 if (file_util::AbsolutePath(&path)) | 572 if (file_util::AbsolutePath(&path)) |
573 gurl = net::FilePathToFileURL(path); | 573 gurl = net::FilePathToFileURL(FilePath::FromWStringHack(path)); |
574 else | 574 else |
575 gurl = GURL(WideToUTF8(url)); | 575 gurl = GURL(WideToUTF8(url)); |
576 | 576 |
577 navigation_controller_->LoadEntry(new TestNavigationEntry( | 577 navigation_controller_->LoadEntry(new TestNavigationEntry( |
578 -1, gurl, std::wstring(), frame_string)); | 578 -1, gurl, std::wstring(), frame_string)); |
579 } | 579 } |
580 | 580 |
581 // TODO(agl): PromptForSaveFile should use FilePath | 581 // TODO(agl): PromptForSaveFile should use FilePath |
582 bool TestShell::PromptForSaveFile(const wchar_t* prompt_title, | 582 bool TestShell::PromptForSaveFile(const wchar_t* prompt_title, |
583 std::wstring* result) { | 583 std::wstring* result) { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 break; | 668 break; |
669 } | 669 } |
670 return TestShell::NetResourceProvider(resource_id).as_string(); | 670 return TestShell::NetResourceProvider(resource_id).as_string(); |
671 } | 671 } |
672 | 672 |
673 bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { | 673 bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { |
674 return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); | 674 return NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); |
675 } | 675 } |
676 | 676 |
677 } // namespace webkit_glue | 677 } // namespace webkit_glue |
OLD | NEW |