| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <windows.h> | 7 #include <windows.h> |
| 8 #include <commdlg.h> | 8 #include <commdlg.h> |
| 9 #include <objbase.h> | 9 #include <objbase.h> |
| 10 #include <process.h> | 10 #include <process.h> |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 231 } |
| 232 | 232 |
| 233 HWND hwnd = *(TestShell::windowList()->begin()); | 233 HWND hwnd = *(TestShell::windowList()->begin()); |
| 234 TestShell* shell = | 234 TestShell* shell = |
| 235 static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); | 235 static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); |
| 236 | 236 |
| 237 // Clear focus between tests. | 237 // Clear focus between tests. |
| 238 shell->m_focusedWidgetHost = NULL; | 238 shell->m_focusedWidgetHost = NULL; |
| 239 | 239 |
| 240 // Make sure the previous load is stopped. | 240 // Make sure the previous load is stopped. |
| 241 shell->webView()->StopLoading(); | 241 shell->webView()->mainFrame()->stopLoading(); |
| 242 shell->navigation_controller()->Reset(); | 242 shell->navigation_controller()->Reset(); |
| 243 | 243 |
| 244 // StopLoading may update state maintained in the test controller (for | 244 // StopLoading may update state maintained in the test controller (for |
| 245 // example, whether the WorkQueue is frozen) as such, we need to reset it | 245 // example, whether the WorkQueue is frozen) as such, we need to reset it |
| 246 // after we invoke StopLoading. | 246 // after we invoke StopLoading. |
| 247 shell->ResetTestController(); | 247 shell->ResetTestController(); |
| 248 | 248 |
| 249 // ResetTestController may have closed the window we were holding on to. | 249 // ResetTestController may have closed the window we were holding on to. |
| 250 // Grab the first window again. | 250 // Grab the first window again. |
| 251 hwnd = *(TestShell::windowList()->begin()); | 251 hwnd = *(TestShell::windowList()->begin()); |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 break; | 540 break; |
| 541 case IDC_NAV_FORWARD: | 541 case IDC_NAV_FORWARD: |
| 542 shell->GoBackOrForward(1); | 542 shell->GoBackOrForward(1); |
| 543 break; | 543 break; |
| 544 case IDC_NAV_RELOAD: | 544 case IDC_NAV_RELOAD: |
| 545 case IDC_NAV_STOP: | 545 case IDC_NAV_STOP: |
| 546 { | 546 { |
| 547 if (wmId == IDC_NAV_RELOAD) { | 547 if (wmId == IDC_NAV_RELOAD) { |
| 548 shell->Reload(); | 548 shell->Reload(); |
| 549 } else { | 549 } else { |
| 550 shell->webView()->StopLoading(); | 550 shell->webView()->mainFrame()->stopLoading(); |
| 551 } | 551 } |
| 552 } | 552 } |
| 553 break; | 553 break; |
| 554 case IDM_DUMP_BODY_TEXT: | 554 case IDM_DUMP_BODY_TEXT: |
| 555 shell->DumpDocumentText(); | 555 shell->DumpDocumentText(); |
| 556 break; | 556 break; |
| 557 case IDM_DUMP_RENDER_TREE: | 557 case IDM_DUMP_RENDER_TREE: |
| 558 shell->DumpRenderTree(); | 558 shell->DumpRenderTree(); |
| 559 break; | 559 break; |
| 560 } | 560 } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 | 744 |
| 745 bool EnsureFontLoaded(HFONT font) { | 745 bool EnsureFontLoaded(HFONT font) { |
| 746 return true; | 746 return true; |
| 747 } | 747 } |
| 748 | 748 |
| 749 bool DownloadUrl(const std::string& url, HWND caller_window) { | 749 bool DownloadUrl(const std::string& url, HWND caller_window) { |
| 750 return false; | 750 return false; |
| 751 } | 751 } |
| 752 | 752 |
| 753 } // namespace webkit_glue | 753 } // namespace webkit_glue |
| OLD | NEW |