| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "base/basictypes.h" | 35 #include "base/basictypes.h" |
| 36 #include "base/file_path.h" | 36 #include "base/file_path.h" |
| 37 #include "base/scoped_temp_dir.h" | 37 #include "base/scoped_temp_dir.h" |
| 38 #if defined(OS_MACOSX) | 38 #if defined(OS_MACOSX) |
| 39 #include "base/lazy_instance.h" | 39 #include "base/lazy_instance.h" |
| 40 #endif | 40 #endif |
| 41 #include "base/ref_counted.h" | 41 #include "base/ref_counted.h" |
| 42 #include "base/weak_ptr.h" | 42 #include "base/weak_ptr.h" |
| 43 #include "gfx/native_widget_types.h" | 43 #include "gfx/native_widget_types.h" |
| 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h
" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h
" |
| 45 #include "webkit/tools/test_shell/event_sending_controller.h" | |
| 46 #include "webkit/tools/test_shell/layout_test_controller.h" | 45 #include "webkit/tools/test_shell/layout_test_controller.h" |
| 47 #include "webkit/tools/test_shell/plain_text_controller.h" | |
| 48 #include "webkit/tools/test_shell/text_input_controller.h" | |
| 49 #include "webkit/tools/test_shell/webview_host.h" | 46 #include "webkit/tools/test_shell/webview_host.h" |
| 50 #include "webkit/tools/test_shell/webwidget_host.h" | 47 #include "webkit/tools/test_shell/webwidget_host.h" |
| 51 | 48 |
| 52 typedef std::list<gfx::NativeWindow> WindowList; | 49 typedef std::list<gfx::NativeWindow> WindowList; |
| 53 | 50 |
| 54 struct WebPreferences; | 51 struct WebPreferences; |
| 55 class AccessibilityController; | |
| 56 class GURL; | 52 class GURL; |
| 57 class TestNavigationEntry; | 53 class TestNavigationEntry; |
| 58 class TestNavigationController; | 54 class TestNavigationController; |
| 59 class TestNotificationPresenter; | 55 class TestNotificationPresenter; |
| 60 class TestShellDevToolsAgent; | 56 class TestShellDevToolsAgent; |
| 61 class TestShellDevToolsClient; | 57 class TestShellDevToolsClient; |
| 62 class TestWebViewDelegate; | 58 class TestWebViewDelegate; |
| 63 | 59 |
| 64 namespace base { | 60 namespace base { |
| 65 class StringPiece; | 61 class StringPiece; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 void TestTimedOut(); | 146 void TestTimedOut(); |
| 151 | 147 |
| 152 // Called to block the calling thread until TestFinished is called. | 148 // Called to block the calling thread until TestFinished is called. |
| 153 void WaitTestFinished(); | 149 void WaitTestFinished(); |
| 154 | 150 |
| 155 void Show(WebKit::WebNavigationPolicy policy); | 151 void Show(WebKit::WebNavigationPolicy policy); |
| 156 | 152 |
| 157 // We use this to avoid relying on Windows focus during layout test mode. | 153 // We use this to avoid relying on Windows focus during layout test mode. |
| 158 void SetFocus(WebWidgetHost* host, bool enable); | 154 void SetFocus(WebWidgetHost* host, bool enable); |
| 159 | 155 |
| 160 AccessibilityController* accessibility_controller() const { | |
| 161 return accessibility_controller_.get(); | |
| 162 } | |
| 163 LayoutTestController* layout_test_controller() { | 156 LayoutTestController* layout_test_controller() { |
| 164 return layout_test_controller_.get(); | 157 return layout_test_controller_.get(); |
| 165 } | 158 } |
| 166 TestWebViewDelegate* delegate() { return delegate_.get(); } | 159 TestWebViewDelegate* delegate() { return delegate_.get(); } |
| 167 TestWebViewDelegate* popup_delegate() { return popup_delegate_.get(); } | 160 TestWebViewDelegate* popup_delegate() { return popup_delegate_.get(); } |
| 168 TestNavigationController* navigation_controller() { | 161 TestNavigationController* navigation_controller() { |
| 169 return navigation_controller_.get(); | 162 return navigation_controller_.get(); |
| 170 } | 163 } |
| 171 EventSendingController* event_sending_controller() { | |
| 172 return event_sending_controller_.get(); | |
| 173 } | |
| 174 TestNotificationPresenter* notification_presenter() { | 164 TestNotificationPresenter* notification_presenter() { |
| 175 return notification_presenter_.get(); | 165 return notification_presenter_.get(); |
| 176 } | 166 } |
| 177 | 167 |
| 178 // Resets the LayoutTestController and EventSendingController. Should be | 168 // Resets the LayoutTestController and EventSendingController. Should be |
| 179 // called before loading a page, since some end-editing event notifications | 169 // called before loading a page, since some end-editing event notifications |
| 180 // may arrive after the previous page has finished dumping its text and | 170 // may arrive after the previous page has finished dumping its text and |
| 181 // therefore end up in the next test's results if the messages are still | 171 // therefore end up in the next test's results if the messages are still |
| 182 // enabled. | 172 // enabled. |
| 183 void ResetTestController(); | 173 void ResetTestController(); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 static bool layout_test_mode_; | 423 static bool layout_test_mode_; |
| 434 | 424 |
| 435 // True when we wish to allow test shell to load external pages like | 425 // True when we wish to allow test shell to load external pages like |
| 436 // www.google.com even when in --layout-test mode (used for QA to | 426 // www.google.com even when in --layout-test mode (used for QA to |
| 437 // produce images of the rendered page) | 427 // produce images of the rendered page) |
| 438 static bool allow_external_pages_; | 428 static bool allow_external_pages_; |
| 439 | 429 |
| 440 // Default timeout in ms for file page loads when in layout test mode. | 430 // Default timeout in ms for file page loads when in layout test mode. |
| 441 static int file_test_timeout_ms_; | 431 static int file_test_timeout_ms_; |
| 442 | 432 |
| 443 scoped_ptr<AccessibilityController> accessibility_controller_; | |
| 444 scoped_ptr<LayoutTestController> layout_test_controller_; | 433 scoped_ptr<LayoutTestController> layout_test_controller_; |
| 445 scoped_ptr<EventSendingController> event_sending_controller_; | |
| 446 scoped_ptr<PlainTextController> plain_text_controller_; | |
| 447 scoped_ptr<TextInputController> text_input_controller_; | |
| 448 scoped_ptr<TestNavigationController> navigation_controller_; | 434 scoped_ptr<TestNavigationController> navigation_controller_; |
| 449 scoped_ptr<TestNotificationPresenter> notification_presenter_; | 435 scoped_ptr<TestNotificationPresenter> notification_presenter_; |
| 450 | 436 |
| 451 scoped_ptr<TestWebViewDelegate> delegate_; | 437 scoped_ptr<TestWebViewDelegate> delegate_; |
| 452 scoped_ptr<TestWebViewDelegate> popup_delegate_; | 438 scoped_ptr<TestWebViewDelegate> popup_delegate_; |
| 453 | 439 |
| 454 base::WeakPtr<TestShell> devtools_shell_; | 440 base::WeakPtr<TestShell> devtools_shell_; |
| 455 scoped_ptr<TestShellDevToolsAgent> dev_tools_agent_; | 441 scoped_ptr<TestShellDevToolsAgent> dev_tools_agent_; |
| 456 scoped_ptr<TestShellDevToolsClient> dev_tools_client_; | 442 scoped_ptr<TestShellDevToolsClient> dev_tools_client_; |
| 457 scoped_ptr<WebKit::WebDeviceOrientationClientMock> | 443 scoped_ptr<WebKit::WebDeviceOrientationClientMock> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 #if defined(OS_WIN) | 487 #if defined(OS_WIN) |
| 502 // Used by the watchdog to know when it's finished. | 488 // Used by the watchdog to know when it's finished. |
| 503 HANDLE finished_event_; | 489 HANDLE finished_event_; |
| 504 #endif | 490 #endif |
| 505 | 491 |
| 506 // Dump the stats table counters on exit. | 492 // Dump the stats table counters on exit. |
| 507 bool dump_stats_table_on_exit_; | 493 bool dump_stats_table_on_exit_; |
| 508 }; | 494 }; |
| 509 | 495 |
| 510 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ | 496 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ |
| OLD | NEW |