| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // ResetTestController may have closed the window we were holding on to. | 251 // ResetTestController may have closed the window we were holding on to. |
| 252 // Grab the first window again. | 252 // Grab the first window again. |
| 253 hwnd = *(TestShell::windowList()->begin()); | 253 hwnd = *(TestShell::windowList()->begin()); |
| 254 shell = static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); | 254 shell = static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); |
| 255 DCHECK(shell); | 255 DCHECK(shell); |
| 256 | 256 |
| 257 if (strstr(params.test_url.c_str(), "/inspector/") || | 257 if (strstr(params.test_url.c_str(), "/inspector/") || |
| 258 strstr(params.test_url.c_str(), "\\inspector\\")) | 258 strstr(params.test_url.c_str(), "\\inspector\\")) |
| 259 inspector_test_mode_ = true; | 259 inspector_test_mode_ = true; |
| 260 | 260 |
| 261 developer_extras_enabled_ = inspector_test_mode_ || |
| 262 strstr(params.test_url.c_str(), "/inspector-enabled/") || |
| 263 strstr(params.test_url.c_str(), "\\inspector-enabled\\"); |
| 264 |
| 261 // Clean up state between test runs. | 265 // Clean up state between test runs. |
| 262 webkit_glue::ResetBeforeTestRun(shell->webView()); | 266 webkit_glue::ResetBeforeTestRun(shell->webView()); |
| 263 ResetWebPreferences(); | 267 ResetWebPreferences(); |
| 264 web_prefs_->Apply(shell->webView()); | 268 web_prefs_->Apply(shell->webView()); |
| 265 | 269 |
| 266 SetWindowPos(shell->m_mainWnd, NULL, | 270 SetWindowPos(shell->m_mainWnd, NULL, |
| 267 kTestWindowXLocation, kTestWindowYLocation, 0, 0, | 271 kTestWindowXLocation, kTestWindowYLocation, 0, 0, |
| 268 SWP_NOSIZE | SWP_NOZORDER); | 272 SWP_NOSIZE | SWP_NOZORDER); |
| 269 shell->ResizeSubViews(); | 273 shell->ResizeSubViews(); |
| 270 | 274 |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 | 808 |
| 805 bool EnsureFontLoaded(HFONT font) { | 809 bool EnsureFontLoaded(HFONT font) { |
| 806 return true; | 810 return true; |
| 807 } | 811 } |
| 808 | 812 |
| 809 bool DownloadUrl(const std::string& url, HWND caller_window) { | 813 bool DownloadUrl(const std::string& url, HWND caller_window) { |
| 810 return false; | 814 return false; |
| 811 } | 815 } |
| 812 | 816 |
| 813 } // namespace webkit_glue | 817 } // namespace webkit_glue |
| OLD | NEW |