| 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 <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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 // ResetTestController may have closed the window we were holding on to. | 507 // ResetTestController may have closed the window we were holding on to. |
| 508 // Grab the first window again. | 508 // Grab the first window again. |
| 509 window = *(TestShell::windowList()->begin()); | 509 window = *(TestShell::windowList()->begin()); |
| 510 shell = window_map_.Get()[window]; | 510 shell = window_map_.Get()[window]; |
| 511 DCHECK(shell); | 511 DCHECK(shell); |
| 512 | 512 |
| 513 // Clear focus between tests. | 513 // Clear focus between tests. |
| 514 shell->m_focusedWidgetHost = NULL; | 514 shell->m_focusedWidgetHost = NULL; |
| 515 | 515 |
| 516 // Make sure the previous load is stopped. | 516 // Make sure the previous load is stopped. |
| 517 shell->webView()->StopLoading(); | 517 shell->webView()->mainFrame()->stopLoading(); |
| 518 shell->navigation_controller()->Reset(); | 518 shell->navigation_controller()->Reset(); |
| 519 | 519 |
| 520 // Clean up state between test runs. | 520 // Clean up state between test runs. |
| 521 webkit_glue::ResetBeforeTestRun(shell->webView()); | 521 webkit_glue::ResetBeforeTestRun(shell->webView()); |
| 522 ResetWebPreferences(); | 522 ResetWebPreferences(); |
| 523 web_prefs_->Apply(shell->webView()); | 523 web_prefs_->Apply(shell->webView()); |
| 524 | 524 |
| 525 // Hide the window. We can't actually use NSWindow's |-setFrameTopLeftPoint:| | 525 // Hide the window. We can't actually use NSWindow's |-setFrameTopLeftPoint:| |
| 526 // because it leaves a chunk of the window visible instead of moving it | 526 // because it leaves a chunk of the window visible instead of moving it |
| 527 // offscreen. | 527 // offscreen. |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 return false; | 689 return false; |
| 690 } | 690 } |
| 691 | 691 |
| 692 void DidLoadPlugin(const std::string& filename) { | 692 void DidLoadPlugin(const std::string& filename) { |
| 693 } | 693 } |
| 694 | 694 |
| 695 void DidUnloadPlugin(const std::string& filename) { | 695 void DidUnloadPlugin(const std::string& filename) { |
| 696 } | 696 } |
| 697 | 697 |
| 698 } // namespace webkit_glue | 698 } // namespace webkit_glue |
| OLD | NEW |