| OLD | NEW |
| 1 /* | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 * | 3 // found in the LICENSE file. |
| 4 * Redistribution and use in source and binary forms, with or without | |
| 5 * modification, are permitted provided that the following conditions | |
| 6 * are met: | |
| 7 * 1. Redistributions of source code must retain the above copyright | |
| 8 * notice, this list of conditions and the following disclaimer. | |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | |
| 10 * notice, this list of conditions and the following disclaimer in the | |
| 11 * documentation and/or other materials provided with the distribution. | |
| 12 * | |
| 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | |
| 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
| 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | |
| 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
| 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
| 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 24 */ | |
| 25 | 4 |
| 26 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ |
| 27 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ |
| 28 | 7 |
| 29 #pragma once | 8 #pragma once |
| 30 | 9 |
| 31 #include <list> | 10 #include <list> |
| 32 #include <string> | 11 #include <string> |
| 33 #include <vector> | 12 #include <vector> |
| 34 | 13 |
| 35 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 36 #include "base/file_path.h" | 15 #include "base/file_path.h" |
| 37 #include "base/scoped_temp_dir.h" | 16 #include "base/scoped_temp_dir.h" |
| 38 #include "base/string_piece.h" | 17 #include "base/string_piece.h" |
| 39 #if defined(OS_MACOSX) | 18 #if defined(OS_MACOSX) |
| 40 #include "base/lazy_instance.h" | 19 #include "base/lazy_instance.h" |
| 41 #endif | 20 #endif |
| 42 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
| 43 #include "base/memory/weak_ptr.h" | 22 #include "base/memory/weak_ptr.h" |
| 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h
" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h
" |
| 45 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
| 46 #include "webkit/tools/test_shell/layout_test_controller.h" | 25 #include "webkit/tools/test_shell/layout_test_controller.h" |
| 47 #include "webkit/tools/test_shell/webview_host.h" | 26 #include "webkit/tools/test_shell/webview_host.h" |
| 48 #include "webkit/tools/test_shell/webwidget_host.h" | 27 #include "webkit/tools/test_shell/webwidget_host.h" |
| 49 | 28 |
| 50 typedef std::list<gfx::NativeWindow> WindowList; | 29 typedef std::list<gfx::NativeWindow> WindowList; |
| 51 | 30 |
| 31 namespace webkit_glue { |
| 52 struct WebPreferences; | 32 struct WebPreferences; |
| 33 } |
| 34 |
| 53 class GURL; | 35 class GURL; |
| 54 class TestNavigationEntry; | 36 class TestNavigationEntry; |
| 55 class TestNavigationController; | 37 class TestNavigationController; |
| 56 class TestNotificationPresenter; | 38 class TestNotificationPresenter; |
| 57 class TestShellDevToolsAgent; | 39 class TestShellDevToolsAgent; |
| 58 class TestShellDevToolsClient; | 40 class TestShellDevToolsClient; |
| 59 class TestWebViewDelegate; | 41 class TestWebViewDelegate; |
| 60 | 42 |
| 61 namespace WebKit { | 43 namespace WebKit { |
| 62 class WebDeviceOrientationClientMock; | 44 class WebDeviceOrientationClientMock; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // Writes the back-forward list data for this test shell into result. | 209 // Writes the back-forward list data for this test shell into result. |
| 228 void DumpBackForwardList(string16* result); | 210 void DumpBackForwardList(string16* result); |
| 229 | 211 |
| 230 static void ResetWebPreferences(); | 212 static void ResetWebPreferences(); |
| 231 | 213 |
| 232 static void SetAllowScriptsToCloseWindows(); | 214 static void SetAllowScriptsToCloseWindows(); |
| 233 | 215 |
| 234 static void SetAccelerated2dCanvasEnabled(bool enabled); | 216 static void SetAccelerated2dCanvasEnabled(bool enabled); |
| 235 static void SetAcceleratedCompositingEnabled(bool enabled); | 217 static void SetAcceleratedCompositingEnabled(bool enabled); |
| 236 | 218 |
| 237 static WebPreferences* GetWebPreferences(); | 219 static webkit_glue::WebPreferences* GetWebPreferences(); |
| 238 | 220 |
| 239 // Some layout tests hardcode a file:///tmp/LayoutTests URL. We get around | 221 // Some layout tests hardcode a file:///tmp/LayoutTests URL. We get around |
| 240 // this by substituting "tmp" with the path to the LayoutTests parent dir. | 222 // this by substituting "tmp" with the path to the LayoutTests parent dir. |
| 241 static std::string RewriteLocalUrl(const std::string& url); | 223 static std::string RewriteLocalUrl(const std::string& url); |
| 242 | 224 |
| 243 // Set the timeout for running a test. | 225 // Set the timeout for running a test. |
| 244 static void SetFileTestTimeout(int timeout_ms) { | 226 static void SetFileTestTimeout(int timeout_ms) { |
| 245 file_test_timeout_ms_ = timeout_ms; | 227 file_test_timeout_ms_ = timeout_ms; |
| 246 } | 228 } |
| 247 | 229 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 bool is_modal_; | 400 bool is_modal_; |
| 419 | 401 |
| 420 // True if the page is loading. | 402 // True if the page is loading. |
| 421 bool is_loading_; | 403 bool is_loading_; |
| 422 | 404 |
| 423 bool allow_images_; | 405 bool allow_images_; |
| 424 bool allow_plugins_; | 406 bool allow_plugins_; |
| 425 bool allow_scripts_; | 407 bool allow_scripts_; |
| 426 | 408 |
| 427 // The preferences for the test shell. | 409 // The preferences for the test shell. |
| 428 static WebPreferences* web_prefs_; | 410 static webkit_glue::WebPreferences* web_prefs_; |
| 429 | 411 |
| 430 #if defined(OS_WIN) | 412 #if defined(OS_WIN) |
| 431 // Used by the watchdog to know when it's finished. | 413 // Used by the watchdog to know when it's finished. |
| 432 HANDLE finished_event_; | 414 HANDLE finished_event_; |
| 433 #endif | 415 #endif |
| 434 | 416 |
| 435 // Dump the stats table counters on exit. | 417 // Dump the stats table counters on exit. |
| 436 bool dump_stats_table_on_exit_; | 418 bool dump_stats_table_on_exit_; |
| 437 }; | 419 }; |
| 438 | 420 |
| 439 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ | 421 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ |
| OLD | NEW |