| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <ApplicationServices/ApplicationServices.h> | 5 #include <ApplicationServices/ApplicationServices.h> |
| 6 #import <Cocoa/Cocoa.h> | 6 #import <Cocoa/Cocoa.h> |
| 7 #import <objc/objc-runtime.h> | 7 #import <objc/objc-runtime.h> |
| 8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
| 9 | 9 |
| 10 #include "webkit/tools/test_shell/test_shell.h" | 10 #include "webkit/tools/test_shell/test_shell.h" |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 NSWindow* window = *iter; | 525 NSWindow* window = *iter; |
| 526 WindowMap::iterator it = window_map_.Get().find(window); | 526 WindowMap::iterator it = window_map_.Get().find(window); |
| 527 if (it != window_map_.Get().end()) | 527 if (it != window_map_.Get().end()) |
| 528 it->second->DumpBackForwardList(result); | 528 it->second->DumpBackForwardList(result); |
| 529 else | 529 else |
| 530 LOG(ERROR) << "Failed to find shell for window during dump"; | 530 LOG(ERROR) << "Failed to find shell for window during dump"; |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 | 533 |
| 534 void TestShell::LoadURLForFrame(const GURL& url, | 534 void TestShell::LoadURLForFrame(const GURL& url, |
| 535 const std::wstring& frame_name) { | 535 const string16& frame_name) { |
| 536 if (!url.is_valid()) | 536 if (!url.is_valid()) |
| 537 return; | 537 return; |
| 538 | 538 |
| 539 if (IsSVGTestURL(url)) { | 539 if (IsSVGTestURL(url)) { |
| 540 SizeTo(kSVGTestWindowWidth, kSVGTestWindowHeight); | 540 SizeTo(kSVGTestWindowWidth, kSVGTestWindowHeight); |
| 541 } else { | 541 } else { |
| 542 // only resize back to the default when running tests | 542 // only resize back to the default when running tests |
| 543 if (layout_test_mode()) | 543 if (layout_test_mode()) |
| 544 SizeToDefault(); | 544 SizeToDefault(); |
| 545 } | 545 } |
| 546 | 546 |
| 547 navigation_controller_->LoadEntry( | 547 navigation_controller_->LoadEntry( |
| 548 new TestNavigationEntry(-1, url, std::wstring(), frame_name)); | 548 new TestNavigationEntry(-1, url, frame_name)); |
| 549 } | 549 } |
| 550 | 550 |
| 551 bool TestShell::PromptForSaveFile(const wchar_t* prompt_title, | 551 bool TestShell::PromptForSaveFile(const wchar_t* prompt_title, |
| 552 FilePath* result) | 552 FilePath* result) |
| 553 { | 553 { |
| 554 NSSavePanel* save_panel = [NSSavePanel savePanel]; | 554 NSSavePanel* save_panel = [NSSavePanel savePanel]; |
| 555 | 555 |
| 556 /* set up new attributes */ | 556 /* set up new attributes */ |
| 557 [save_panel setRequiredFileType:@"txt"]; | 557 [save_panel setRequiredFileType:@"txt"]; |
| 558 [save_panel setMessage: | 558 [save_panel setMessage: |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 return false; | 691 return false; |
| 692 } | 692 } |
| 693 | 693 |
| 694 void DidLoadPlugin(const std::string& filename) { | 694 void DidLoadPlugin(const std::string& filename) { |
| 695 } | 695 } |
| 696 | 696 |
| 697 void DidUnloadPlugin(const std::string& filename) { | 697 void DidUnloadPlugin(const std::string& filename) { |
| 698 } | 698 } |
| 699 | 699 |
| 700 } // namespace webkit_glue | 700 } // namespace webkit_glue |
| OLD | NEW |