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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 TestShell(); | 85 TestShell(); |
86 virtual ~TestShell(); | 86 virtual ~TestShell(); |
87 | 87 |
88 // Initialization and clean up of logging. | 88 // Initialization and clean up of logging. |
89 static void InitLogging(bool suppress_error_dialogs, | 89 static void InitLogging(bool suppress_error_dialogs, |
90 bool running_layout_tests, | 90 bool running_layout_tests, |
91 bool enable_gp_fault_error_box); | 91 bool enable_gp_fault_error_box); |
92 static void CleanupLogging(); | 92 static void CleanupLogging(); |
93 | 93 |
94 // Initialization and clean up of a static member variable. | 94 // Initialization and clean up of a static member variable. |
95 static void InitializeTestShell(bool layout_test_mode, | 95 static void InitializeTestShell(bool layout_test_mode, |
96 bool allow_external_pages); | 96 bool allow_external_pages); |
97 static void ShutdownTestShell(); | 97 static void ShutdownTestShell(); |
98 | 98 |
99 static bool layout_test_mode() { return layout_test_mode_; } | 99 static bool layout_test_mode() { return layout_test_mode_; } |
100 static bool allow_external_pages() { return allow_external_pages_; } | 100 static bool allow_external_pages() { return allow_external_pages_; } |
101 | 101 |
102 // Called from the destructor to let each platform do any necessary | 102 // Called from the destructor to let each platform do any necessary |
103 // cleanup. | 103 // cleanup. |
104 void PlatformCleanUp(); | 104 void PlatformCleanUp(); |
105 | 105 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 layout_test_controller_->ShouldDumpEditingCallbacks(); | 180 layout_test_controller_->ShouldDumpEditingCallbacks(); |
181 } | 181 } |
182 bool ShouldDumpFrameLoadCallbacks() { | 182 bool ShouldDumpFrameLoadCallbacks() { |
183 return layout_test_mode_ && (test_is_preparing_ || test_is_pending_) && | 183 return layout_test_mode_ && (test_is_preparing_ || test_is_pending_) && |
184 layout_test_controller_->ShouldDumpFrameLoadCallbacks(); | 184 layout_test_controller_->ShouldDumpFrameLoadCallbacks(); |
185 } | 185 } |
186 bool ShouldDumpResourceLoadCallbacks() { | 186 bool ShouldDumpResourceLoadCallbacks() { |
187 return layout_test_mode_ && (test_is_preparing_ || test_is_pending_) && | 187 return layout_test_mode_ && (test_is_preparing_ || test_is_pending_) && |
188 layout_test_controller_->ShouldDumpResourceLoadCallbacks(); | 188 layout_test_controller_->ShouldDumpResourceLoadCallbacks(); |
189 } | 189 } |
| 190 bool ShouldDumpResourceResponseMIMETypes() { |
| 191 return layout_test_mode_ && (test_is_preparing_ || test_is_pending_) && |
| 192 layout_test_controller_->ShouldDumpResourceResponseMIMETypes(); |
| 193 } |
190 bool ShouldDumpTitleChanges() { | 194 bool ShouldDumpTitleChanges() { |
191 return layout_test_mode_ && | 195 return layout_test_mode_ && |
192 layout_test_controller_->ShouldDumpTitleChanges(); | 196 layout_test_controller_->ShouldDumpTitleChanges(); |
193 } | 197 } |
194 bool AcceptsEditing() { | 198 bool AcceptsEditing() { |
195 return layout_test_controller_->AcceptsEditing(); | 199 return layout_test_controller_->AcceptsEditing(); |
196 } | 200 } |
197 | 201 |
198 void LoadFile(const FilePath& file); | 202 void LoadFile(const FilePath& file); |
199 void LoadURL(const GURL& url); | 203 void LoadURL(const GURL& url); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 | 377 |
374 #if defined(OS_WIN) | 378 #if defined(OS_WIN) |
375 static HINSTANCE instance_handle_; | 379 static HINSTANCE instance_handle_; |
376 #endif | 380 #endif |
377 | 381 |
378 // True if developer extras should be enabled. | 382 // True if developer extras should be enabled. |
379 static bool developer_extras_enabled_; | 383 static bool developer_extras_enabled_; |
380 | 384 |
381 // True when the app is being run using the --layout-tests switch. | 385 // True when the app is being run using the --layout-tests switch. |
382 static bool layout_test_mode_; | 386 static bool layout_test_mode_; |
383 | 387 |
384 // True when we wish to allow test shell to load external pages like | 388 // True when we wish to allow test shell to load external pages like |
385 // www.google.com even when in --layout-test mode (used for QA to | 389 // www.google.com even when in --layout-test mode (used for QA to |
386 // produce images of the rendered page) | 390 // produce images of the rendered page) |
387 static bool allow_external_pages_; | 391 static bool allow_external_pages_; |
388 | 392 |
389 // Default timeout in ms for file page loads when in layout test mode. | 393 // Default timeout in ms for file page loads when in layout test mode. |
390 static int file_test_timeout_ms_; | 394 static int file_test_timeout_ms_; |
391 | 395 |
392 scoped_ptr<AccessibilityController> accessibility_controller_; | 396 scoped_ptr<AccessibilityController> accessibility_controller_; |
393 scoped_ptr<LayoutTestController> layout_test_controller_; | 397 scoped_ptr<LayoutTestController> layout_test_controller_; |
394 scoped_ptr<EventSendingController> event_sending_controller_; | 398 scoped_ptr<EventSendingController> event_sending_controller_; |
395 scoped_ptr<PlainTextController> plain_text_controller_; | 399 scoped_ptr<PlainTextController> plain_text_controller_; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 #if defined(OS_WIN) | 432 #if defined(OS_WIN) |
429 // Used by the watchdog to know when it's finished. | 433 // Used by the watchdog to know when it's finished. |
430 HANDLE finished_event_; | 434 HANDLE finished_event_; |
431 #endif | 435 #endif |
432 | 436 |
433 // Dump the stats table counters on exit. | 437 // Dump the stats table counters on exit. |
434 bool dump_stats_table_on_exit_; | 438 bool dump_stats_table_on_exit_; |
435 }; | 439 }; |
436 | 440 |
437 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ | 441 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ |
OLD | NEW |