1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h"
14 #include "content/shell/renderer/test_runner/WebTask.h"
15 #include "content/shell/renderer/test_runner/WebTestRunner.h"
16 #include "v8/include/v8.h"
20 class WebNotificationPresenter
;
21 class WebPermissionClient
;
27 class ArrayBufferView
;
31 namespace WebTestRunner
{
33 class WebTestDelegate
;
38 class InvokeCallbackTask
;
39 class NotificationPresenter
;
40 class TestPageOverlay
;
42 class WebTestProxyBase
;
44 class TestRunner
: public ::WebTestRunner::WebTestRunner
,
45 public base::SupportsWeakPtr
<TestRunner
> {
47 explicit TestRunner(::WebTestRunner::TestInterfaces
*);
48 virtual ~TestRunner();
50 void Install(blink::WebFrame
* frame
);
52 void SetDelegate(::WebTestRunner::WebTestDelegate
*);
53 void SetWebView(blink::WebView
*, WebTestProxyBase
*);
57 ::WebTestRunner::WebTaskList
* taskList() { return &task_list_
; }
59 void SetTestIsRunning(bool);
60 bool TestIsRunning() const { return test_is_running_
; }
62 bool UseMockTheme() const { return use_mock_theme_
; }
64 void InvokeCallback(scoped_ptr
<InvokeCallbackTask
> callback
);
66 // WebTestRunner implementation.
67 virtual bool shouldGeneratePixelResults() OVERRIDE
;
68 virtual bool shouldDumpAsAudio() const OVERRIDE
;
69 virtual void getAudioData(std::vector
<unsigned char>* bufferView
) const
71 virtual bool shouldDumpBackForwardList() const OVERRIDE
;
72 virtual blink::WebPermissionClient
* webPermissions() const OVERRIDE
;
74 // Methods used by WebTestProxyBase.
75 bool shouldDumpSelectionRect() const;
76 bool isPrinting() const;
77 bool shouldDumpAsText();
78 bool shouldDumpAsTextWithPixelResults();
79 bool shouldDumpAsMarkup();
80 bool shouldDumpChildFrameScrollPositions() const;
81 bool shouldDumpChildFramesAsText() const;
82 void showDevTools(const std::string
& settings
,
83 const std::string
& frontend_url
);
84 void clearDevToolsLocalStorage();
85 void setShouldDumpAsText(bool);
86 void setShouldDumpAsMarkup(bool);
87 void setShouldGeneratePixelResults(bool);
88 void setShouldDumpFrameLoadCallbacks(bool);
89 void setShouldDumpPingLoaderCallbacks(bool);
90 void setShouldEnableViewSource(bool);
91 bool shouldDumpEditingCallbacks() const;
92 bool shouldDumpFrameLoadCallbacks() const;
93 bool shouldDumpPingLoaderCallbacks() const;
94 bool shouldDumpUserGestureInFrameLoadCallbacks() const;
95 bool shouldDumpTitleChanges() const;
96 bool shouldDumpIconChanges() const;
97 bool shouldDumpCreateView() const;
98 bool canOpenWindows() const;
99 bool shouldDumpResourceLoadCallbacks() const;
100 bool shouldDumpResourceRequestCallbacks() const;
101 bool shouldDumpResourceResponseMIMETypes() const;
102 bool shouldDumpStatusCallbacks() const;
103 bool shouldDumpProgressFinishedCallback() const;
104 bool shouldDumpSpellCheckCallbacks() const;
105 bool shouldStayOnPageAfterHandlingBeforeUnload() const;
106 bool shouldWaitUntilExternalURLLoad() const;
107 const std::set
<std::string
>* httpHeadersToClear() const;
108 void setTopLoadingFrame(blink::WebFrame
*, bool);
109 blink::WebFrame
* topLoadingFrame() const;
110 void policyDelegateDone();
111 bool policyDelegateEnabled() const;
112 bool policyDelegateIsPermissive() const;
113 bool policyDelegateShouldNotifyDone() const;
114 bool shouldInterceptPostMessage() const;
115 bool shouldDumpResourcePriorities() const;
116 blink::WebNotificationPresenter
* notification_presenter() const;
117 bool RequestPointerLock();
118 void RequestPointerUnlock();
119 bool isPointerLocked();
120 void setToolTipText(const blink::WebString
&);
122 bool midiAccessorResult();
124 // A single item in the work queue.
127 virtual ~WorkItem() {}
129 // Returns true if this started a load.
130 virtual bool Run(::WebTestRunner::WebTestDelegate
*, blink::WebView
*) = 0;
134 friend class InvokeCallbackTask
;
135 friend class TestRunnerBindings
;
136 friend class WorkQueue
;
138 // Helper class for managing events queued by methods like queueLoad or
142 explicit WorkQueue(TestRunner
* controller
);
143 virtual ~WorkQueue();
144 void ProcessWorkSoon();
146 // Reset the state of the class between tests.
149 void AddWork(WorkItem
*);
151 void set_frozen(bool frozen
) { frozen_
= frozen
; }
152 bool is_empty() { return queue_
.empty(); }
153 ::WebTestRunner::WebTaskList
* taskList() { return &task_list_
; }
158 class WorkQueueTask
: public ::WebTestRunner::WebMethodTask
<WorkQueue
> {
160 WorkQueueTask(WorkQueue
* object
) :
161 ::WebTestRunner::WebMethodTask
<WorkQueue
>(object
) { }
163 virtual void runIfValid() OVERRIDE
;
166 ::WebTestRunner::WebTaskList task_list_
;
167 std::deque
<WorkItem
*> queue_
;
169 TestRunner
* controller_
;
172 ///////////////////////////////////////////////////////////////////////////
173 // Methods dealing with the test logic
175 // By default, tests end when page load is complete. These methods are used
176 // to delay the completion of the test until notifyDone is called.
178 void WaitUntilDone();
180 // Methods for adding actions to the work queue. Used in conjunction with
181 // waitUntilDone/notifyDone above.
182 void QueueBackNavigation(int how_far_back
);
183 void QueueForwardNavigation(int how_far_forward
);
185 void QueueLoadingScript(const std::string
& script
);
186 void QueueNonLoadingScript(const std::string
& script
);
187 void QueueLoad(const std::string
& url
, const std::string
& target
);
188 void QueueLoadHTMLString(gin::Arguments
* args
);
190 // Causes navigation actions just printout the intended navigation instead
191 // of taking you to the page. This is used for cases like mailto, where you
192 // don't actually want to open the mail program.
193 void SetCustomPolicyDelegate(gin::Arguments
* args
);
195 // Delays completion of the test until the policy delegate runs.
196 void WaitForPolicyDelegate();
198 // Functions for dealing with windows. By default we block all new windows.
200 void SetCloseRemainingWindowsWhenComplete(bool close_remaining_windows
);
201 void ResetTestHelperControllers();
203 ///////////////////////////////////////////////////////////////////////////
204 // Methods implemented entirely in terms of chromium's public WebKit API
206 // Method that controls whether pressing Tab key cycles through page elements
207 // or inserts a '\t' char in text area
208 void SetTabKeyCyclesThroughElements(bool tab_key_cycles_through_elements
);
210 // Executes an internal command (superset of document.execCommand() commands).
211 void ExecCommand(gin::Arguments
* args
);
213 // Checks if an internal command is currently available.
214 bool IsCommandEnabled(const std::string
& command
);
216 bool CallShouldCloseOnWebView();
217 void SetDomainRelaxationForbiddenForURLScheme(bool forbidden
,
218 const std::string
& scheme
);
219 v8::Handle
<v8::Value
> EvaluateScriptInIsolatedWorldAndReturnValue(
220 int world_id
, const std::string
& script
);
221 void EvaluateScriptInIsolatedWorld(int world_id
, const std::string
& script
);
222 void SetIsolatedWorldSecurityOrigin(int world_id
,
223 v8::Handle
<v8::Value
> origin
);
224 void SetIsolatedWorldContentSecurityPolicy(int world_id
,
225 const std::string
& policy
);
227 // Allows layout tests to manage origins' whitelisting.
228 void AddOriginAccessWhitelistEntry(const std::string
& source_origin
,
229 const std::string
& destination_protocol
,
230 const std::string
& destination_host
,
231 bool allow_destination_subdomains
);
232 void RemoveOriginAccessWhitelistEntry(const std::string
& source_origin
,
233 const std::string
& destination_protocol
,
234 const std::string
& destination_host
,
235 bool allow_destination_subdomains
);
237 // Returns true if the current page box has custom page size style for
239 bool HasCustomPageSizeStyle(int page_index
);
241 // Forces the selection colors for testing under Linux.
242 void ForceRedSelectionColors();
244 // Adds a style sheet to be injected into new documents.
245 void InjectStyleSheet(const std::string
& source_code
, bool all_frames
);
247 bool FindString(const std::string
& search_text
,
248 const std::vector
<std::string
>& options_array
);
250 std::string
SelectionAsMarkup();
252 // Enables or disables subpixel positioning (i.e. fractional X positions for
253 // glyphs) in text rendering on Linux. Since this method changes global
254 // settings, tests that call it must use their own custom font family for
255 // all text that they render. If not, an already-cached style will be used,
256 // resulting in the changed setting being ignored.
257 void SetTextSubpixelPositioning(bool value
);
259 // Switch the visibility of the page.
260 void SetPageVisibility(const std::string
& new_visibility
);
262 // Changes the direction of the focused element.
263 void SetTextDirection(const std::string
& direction_name
);
265 // After this function is called, all window-sizing machinery is
266 // short-circuited inside the renderer. This mode is necessary for
267 // some tests that were written before browsers had multi-process architecture
268 // and rely on window resizes to happen synchronously.
269 // The function has "unfortunate" it its name because we must strive to remove
270 // all tests that rely on this... well, unfortunate behavior. See
271 // http://crbug.com/309760 for the plan.
272 void UseUnfortunateSynchronousResizeMode();
274 bool EnableAutoResizeMode(int min_width
,
278 bool DisableAutoResizeMode(int new_width
, int new_height
);
280 // Device Motion / Device Orientation related functions
281 void SetMockDeviceMotion(bool has_acceleration_x
, double acceleration_x
,
282 bool has_acceleration_y
, double acceleration_y
,
283 bool has_acceleration_z
, double acceleration_z
,
284 bool has_acceleration_including_gravity_x
,
285 double acceleration_including_gravity_x
,
286 bool has_acceleration_including_gravity_y
,
287 double acceleration_including_gravity_y
,
288 bool has_acceleration_including_gravity_z
,
289 double acceleration_including_gravity_z
,
290 bool has_rotation_rate_alpha
,
291 double rotation_rate_alpha
,
292 bool has_rotation_rate_beta
,
293 double rotation_rate_beta
,
294 bool has_rotation_rate_gamma
,
295 double rotation_rate_gamma
,
297 void SetMockDeviceOrientation(bool has_alpha
, double alpha
,
298 bool has_beta
, double beta
,
299 bool has_gamma
, double gamma
,
300 bool has_absolute
, bool absolute
);
302 void SetMockScreenOrientation(const std::string
& orientation
);
304 void DidAcquirePointerLock();
305 void DidNotAcquirePointerLock();
306 void DidLosePointerLock();
307 void SetPointerLockWillFailSynchronously();
308 void SetPointerLockWillRespondAsynchronously();
310 ///////////////////////////////////////////////////////////////////////////
311 // Methods modifying WebPreferences.
313 // Set the WebPreference that controls webkit's popup blocking.
314 void SetPopupBlockingEnabled(bool block_popups
);
316 void SetJavaScriptCanAccessClipboard(bool can_access
);
317 void SetXSSAuditorEnabled(bool enabled
);
318 void SetAllowUniversalAccessFromFileURLs(bool allow
);
319 void SetAllowFileAccessFromFileURLs(bool allow
);
320 void OverridePreference(const std::string key
, v8::Handle
<v8::Value
> value
);
322 // Enable or disable plugins.
323 void SetPluginsEnabled(bool enabled
);
325 ///////////////////////////////////////////////////////////////////////////
326 // Methods that modify the state of TestRunner
328 // This function sets a flag that tells the test_shell to print a line of
329 // descriptive text for each editing command. It takes no arguments, and
330 // ignores any that may be present.
331 void DumpEditingCallbacks();
333 // This function sets a flag that tells the test_shell to dump pages as
334 // plain text, rather than as a text representation of the renderer's state.
335 // The pixel results will not be generated for this test.
338 // This function sets a flag that tells the test_shell to dump pages as
339 // plain text, rather than as a text representation of the renderer's state.
340 // It will also generate a pixel dump for the test.
341 void DumpAsTextWithPixelResults();
343 // This function sets a flag that tells the test_shell to print out the
344 // scroll offsets of the child frames. It ignores all.
345 void DumpChildFrameScrollPositions();
347 // This function sets a flag that tells the test_shell to recursively
348 // dump all frames as plain text if the DumpAsText flag is set.
349 // It takes no arguments, and ignores any that may be present.
350 void DumpChildFramesAsText();
352 // This function sets a flag that tells the test_shell to print out the
353 // information about icon changes notifications from WebKit.
354 void DumpIconChanges();
356 // Deals with Web Audio WAV file data.
357 void SetAudioData(const gin::ArrayBufferView
& view
);
359 // This function sets a flag that tells the test_shell to print a line of
360 // descriptive text for each frame load callback. It takes no arguments, and
361 // ignores any that may be present.
362 void DumpFrameLoadCallbacks();
364 // This function sets a flag that tells the test_shell to print a line of
365 // descriptive text for each PingLoader dispatch. It takes no arguments, and
366 // ignores any that may be present.
367 void DumpPingLoaderCallbacks();
369 // This function sets a flag that tells the test_shell to print a line of
370 // user gesture status text for some frame load callbacks. It takes no
371 // arguments, and ignores any that may be present.
372 void DumpUserGestureInFrameLoadCallbacks();
374 void DumpTitleChanges();
376 // This function sets a flag that tells the test_shell to dump all calls to
377 // WebViewClient::createView().
378 // It takes no arguments, and ignores any that may be present.
379 void DumpCreateView();
381 void SetCanOpenWindows();
383 // This function sets a flag that tells the test_shell to dump a descriptive
384 // line for each resource load callback. It takes no arguments, and ignores
385 // any that may be present.
386 void DumpResourceLoadCallbacks();
388 // This function sets a flag that tells the test_shell to print a line of
389 // descriptive text for each element that requested a resource. It takes no
390 // arguments, and ignores any that may be present.
391 void DumpResourceRequestCallbacks();
393 // This function sets a flag that tells the test_shell to dump the MIME type
394 // for each resource that was loaded. It takes no arguments, and ignores any
395 // that may be present.
396 void DumpResourceResponseMIMETypes();
398 // WebPermissionClient related.
399 void SetImagesAllowed(bool allowed
);
400 void SetScriptsAllowed(bool allowed
);
401 void SetStorageAllowed(bool allowed
);
402 void SetPluginsAllowed(bool allowed
);
403 void SetAllowDisplayOfInsecureContent(bool allowed
);
404 void SetAllowRunningOfInsecureContent(bool allowed
);
405 void DumpPermissionClientCallbacks();
407 // This function sets a flag that tells the test_shell to dump all calls
408 // to window.status().
409 // It takes no arguments, and ignores any that may be present.
410 void DumpWindowStatusChanges();
412 // This function sets a flag that tells the test_shell to print a line of
413 // descriptive text for the progress finished callback. It takes no
414 // arguments, and ignores any that may be present.
415 void DumpProgressFinishedCallback();
417 // This function sets a flag that tells the test_shell to dump all
418 // the lines of descriptive text about spellcheck execution.
419 void DumpSpellCheckCallbacks();
421 // This function sets a flag that tells the test_shell to print out a text
422 // representation of the back/forward list. It ignores all arguments.
423 void DumpBackForwardList();
425 void DumpSelectionRect();
427 // Causes layout to happen as if targetted to printed pages.
430 void SetShouldStayOnPageAfterHandlingBeforeUnload(bool value
);
432 // Causes WillSendRequest to clear certain headers.
433 void SetWillSendRequestClearHeader(const std::string
& header
);
435 // This function sets a flag that tells the test_shell to dump a descriptive
436 // line for each resource load's priority and any time that priority
437 // changes. It takes no arguments, and ignores any that may be present.
438 void DumpResourceRequestPriorities();
440 // Sets a flag to enable the mock theme.
441 void SetUseMockTheme(bool use
);
443 // Sets a flag that causes the test to be marked as completed when the
444 // WebFrameClient receives a loadURLExternally() call.
445 void WaitUntilExternalURLLoad();
447 ///////////////////////////////////////////////////////////////////////////
448 // Methods interacting with the WebTestProxy
450 ///////////////////////////////////////////////////////////////////////////
451 // Methods forwarding to the WebTestDelegate
453 // Shows DevTools window.
454 void ShowWebInspector(const std::string
& str
,
455 const std::string
& frontend_url
);
456 void CloseWebInspector();
458 // Inspect chooser state
459 bool IsChooserShown();
461 // Allows layout tests to exec scripts at WebInspector side.
462 void EvaluateInWebInspector(int call_id
, const std::string
& script
);
464 // Clears all databases.
465 void ClearAllDatabases();
466 // Sets the default quota for all origins
467 void SetDatabaseQuota(int quota
);
469 // Changes the cookie policy from the default to allow all cookies.
470 void SetAlwaysAcceptCookies(bool accept
);
472 // Gives focus to the window.
473 void SetWindowIsKey(bool value
);
475 // Converts a URL starting with file:///tmp/ to the local mapping.
476 std::string
PathToLocalResource(const std::string
& path
);
478 // Used to set the device scale factor.
479 void SetBackingScaleFactor(double value
, v8::Handle
<v8::Function
> callback
);
481 // Calls setlocale(LC_ALL, ...) for a specified locale.
482 // Resets between tests.
483 void SetPOSIXLocale(const std::string
& locale
);
485 // MIDI function to control permission handling.
486 void SetMIDIAccessorResult(bool result
);
487 void SetMIDISysexPermission(bool value
);
489 // Grants permission for desktop notifications to an origin
490 void GrantWebNotificationPermission(const std::string
& origin
,
491 bool permission_granted
);
492 // Simulates a click on a desktop notification.
493 bool SimulateWebNotificationClick(const std::string
& value
);
495 // Speech input related functions.
496 void AddMockSpeechInputResult(const std::string
& result
,
498 const std::string
& language
);
499 void SetMockSpeechInputDumpRect(bool value
);
500 void AddMockSpeechRecognitionResult(const std::string
& transcript
,
502 void SetMockSpeechRecognitionError(const std::string
& error
,
503 const std::string
& message
);
504 bool WasMockSpeechRecognitionAborted();
506 // WebPageOverlay related functions. Permits the adding and removing of only
507 // one opaque overlay.
508 void AddWebPageOverlay();
509 void RemoveWebPageOverlay();
512 void DisplayAsyncThen(v8::Handle
<v8::Function
> callback
);
514 ///////////////////////////////////////////////////////////////////////////
516 void CheckResponseMimeType();
517 void CompleteNotifyDone();
519 void DidAcquirePointerLockInternal();
520 void DidNotAcquirePointerLockInternal();
521 void DidLosePointerLockInternal();
523 // In the Mac code, this is called to trigger the end of a test after the
524 // page has finished loading. From here, we can generate the dump for the
526 void LocationChangeDone();
528 bool test_is_running_
;
530 // When reset is called, go through and close all but the main test shell
531 // window. By default, set to true but toggled to false using
532 // setCloseRemainingWindowsWhenComplete().
533 bool close_remaining_windows_
;
535 // If true, don't dump output until notifyDone is called.
536 bool wait_until_done_
;
538 // If true, ends the test when a URL is loaded externally via
539 // WebFrameClient::loadURLExternally().
540 bool wait_until_external_url_load_
;
542 // Causes navigation actions just printout the intended navigation instead
543 // of taking you to the page. This is used for cases like mailto, where you
544 // don't actually want to open the mail program.
545 bool policy_delegate_enabled_
;
547 // Toggles the behavior of the policy delegate. If true, then navigations
548 // will be allowed. Otherwise, they will be ignored (dropped).
549 bool policy_delegate_is_permissive_
;
551 // If true, the policy delegate will signal layout test completion.
552 bool policy_delegate_should_notify_done_
;
554 WorkQueue work_queue_
;
556 // Used by a number of layout tests in http/tests/security/dataURL.
559 // Bound variable to return the name of this platform (chromium).
560 std::string platform_name_
;
562 // Bound variable to store the last tooltip text
563 std::string tooltip_text_
;
565 // Bound variable to disable notifyDone calls. This is used in GC leak
566 // tests, where existing LayoutTests are loaded within an iframe. The GC
567 // test harness will set this flag to ignore the notifyDone calls from the
568 // target LayoutTest.
569 bool disable_notify_done_
;
571 // Bound variable counting the number of top URLs visited.
572 int web_history_item_count_
;
574 // Bound variable to set whether postMessages should be intercepted or not
575 bool intercept_post_message_
;
577 // If true, the test_shell will write a descriptive line for each editing
579 bool dump_editting_callbacks_
;
581 // If true, the test_shell will generate pixel results in DumpAsText mode
582 bool generate_pixel_results_
;
584 // If true, the test_shell will produce a plain text dump rather than a
585 // text representation of the renderer.
588 // If true and if dump_as_text_ is true, the test_shell will recursively
589 // dump all frames as plain text.
590 bool dump_child_frames_as_text_
;
592 // If true, the test_shell will produce a dump of the DOM rather than a text
593 // representation of the renderer.
594 bool dump_as_markup_
;
596 // If true, the test_shell will print out the child frame scroll offsets as
598 bool dump_child_frame_scroll_positions_
;
600 // If true, the test_shell will print out the icon change notifications.
601 bool dump_icon_changes_
;
603 // If true, the test_shell will output a base64 encoded WAVE file.
606 // If true, the test_shell will output a descriptive line for each frame
608 bool dump_frame_load_callbacks_
;
610 // If true, the test_shell will output a descriptive line for each
611 // PingLoader dispatched.
612 bool dump_ping_loader_callbacks_
;
614 // If true, the test_shell will output a line of the user gesture status
615 // text for some frame load callbacks.
616 bool dump_user_gesture_in_frame_load_callbacks_
;
618 // If true, output a message when the page title is changed.
619 bool dump_title_changes_
;
621 // If true, output a descriptive line each time WebViewClient::createView
623 bool dump_create_view_
;
625 // If true, new windows can be opened via javascript or by plugins. By
626 // default, set to false and can be toggled to true using
627 // setCanOpenWindows().
628 bool can_open_windows_
;
630 // If true, the test_shell will output a descriptive line for each resource
632 bool dump_resource_load_callbacks_
;
634 // If true, the test_shell will output a descriptive line for each resource
636 bool dump_resource_request_callbacks_
;
638 // If true, the test_shell will output the MIME type for each resource that
640 bool dump_resource_reqponse_mime_types_
;
642 // If true, the test_shell will dump all changes to window.status.
643 bool dump_window_status_changes_
;
645 // If true, the test_shell will output a descriptive line for the progress
646 // finished callback.
647 bool dump_progress_finished_callback_
;
649 // If true, the test_shell will output descriptive test for spellcheck
651 bool dump_spell_check_callbacks_
;
653 // If true, the test_shell will produce a dump of the back forward list as
655 bool dump_back_forward_list_
;
657 // If true, the test_shell will draw the bounds of the current selection rect
658 // taking possible transforms of the selection rect into account.
659 bool dump_selection_rect_
;
661 // If true, pixel dump will be produced as a series of 1px-tall, view-wide
662 // individual paints over the height of the view.
665 // If true and test_repaint_ is true as well, pixel dump will be produced as
666 // a series of 1px-wide, view-tall paints across the width of the view.
667 bool sweep_horizontally_
;
669 // If true, layout is to target printed pages.
672 // If false, MockWebMIDIAccessor fails on startSession() for testing.
673 bool midi_accessor_result_
;
675 bool should_stay_on_page_after_handling_before_unload_
;
677 bool should_dump_resource_priorities_
;
679 std::set
<std::string
> http_headers_to_clear_
;
681 // WAV audio data is stored here.
682 std::vector
<unsigned char> audio_data_
;
684 // Used for test timeouts.
685 ::WebTestRunner::WebTaskList task_list_
;
687 ::WebTestRunner::TestInterfaces
* test_interfaces_
;
688 ::WebTestRunner::WebTestDelegate
* delegate_
;
689 blink::WebView
* web_view_
;
690 TestPageOverlay
* page_overlay_
;
691 WebTestProxyBase
* proxy_
;
693 // This is non-0 IFF a load is in progress.
694 blink::WebFrame
* top_loading_frame_
;
696 // WebPermissionClient mock object.
697 scoped_ptr
<WebPermissions
> web_permissions_
;
699 scoped_ptr
<NotificationPresenter
> notification_presenter_
;
701 bool pointer_locked_
;
703 PointerLockWillSucceed
,
704 PointerLockWillRespondAsync
,
705 PointerLockWillFailSync
,
706 } pointer_lock_planned_result_
;
707 bool use_mock_theme_
;
709 base::WeakPtrFactory
<TestRunner
> weak_factory_
;
711 DISALLOW_COPY_AND_ASSIGN(TestRunner
);
714 } // namespace content
716 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_