Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Side by Side Diff: webkit/tools/test_shell/test_shell.h

Issue 3466019: Adds speech input mock methods to TestShell. (Closed)
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 class TestShellDevToolsAgent; 59 class TestShellDevToolsAgent;
60 class TestShellDevToolsClient; 60 class TestShellDevToolsClient;
61 class TestWebViewDelegate; 61 class TestWebViewDelegate;
62 62
63 namespace base { 63 namespace base {
64 class StringPiece; 64 class StringPiece;
65 } 65 }
66 66
67 namespace WebKit { 67 namespace WebKit {
68 class WebDeviceOrientationClientMock; 68 class WebDeviceOrientationClientMock;
69 class WebSpeechInputControllerMock;
70 class WebSpeechInputListener;
69 } 71 }
70 72
71 class TestShell : public base::SupportsWeakPtr<TestShell> { 73 class TestShell : public base::SupportsWeakPtr<TestShell> {
72 public: 74 public:
73 struct TestParams { 75 struct TestParams {
74 // Load the test defaults. 76 // Load the test defaults.
75 TestParams() : dump_tree(true), dump_pixels(false) { 77 TestParams() : dump_tree(true), dump_pixels(false) {
76 } 78 }
77 79
78 // The kind of output we want from this test. 80 // The kind of output we want from this test.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 336
335 // This is called indirectly by the network layer to access resources. 337 // This is called indirectly by the network layer to access resources.
336 static base::StringPiece NetResourceProvider(int key); 338 static base::StringPiece NetResourceProvider(int key);
337 339
338 TestShellDevToolsAgent* dev_tools_agent() { 340 TestShellDevToolsAgent* dev_tools_agent() {
339 return dev_tools_agent_.get(); 341 return dev_tools_agent_.get();
340 } 342 }
341 343
342 WebKit::WebDeviceOrientationClientMock* device_orientation_client_mock(); 344 WebKit::WebDeviceOrientationClientMock* device_orientation_client_mock();
343 345
346 WebKit::WebSpeechInputControllerMock* CreateSpeechInputControllerMock(
347 WebKit::WebSpeechInputListener* listener);
348 WebKit::WebSpeechInputControllerMock* speech_input_controller_mock();
349
344 protected: 350 protected:
345 void CreateDevToolsClient(TestShellDevToolsAgent* agent); 351 void CreateDevToolsClient(TestShellDevToolsAgent* agent);
346 bool Initialize(const GURL& starting_url); 352 bool Initialize(const GURL& starting_url);
347 bool IsSVGTestURL(const GURL& url); 353 bool IsSVGTestURL(const GURL& url);
348 void SizeToSVG(); 354 void SizeToSVG();
349 void SizeToDefault(); 355 void SizeToDefault();
350 void SizeTo(int width, int height); 356 void SizeTo(int width, int height);
351 void ResizeSubViews(); 357 void ResizeSubViews();
352 358
353 // Set the focus in interactive mode (pass through to relevant system call). 359 // Set the focus in interactive mode (pass through to relevant system call).
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 scoped_ptr<TestNotificationPresenter> notification_presenter_; 421 scoped_ptr<TestNotificationPresenter> notification_presenter_;
416 422
417 scoped_ptr<TestWebViewDelegate> delegate_; 423 scoped_ptr<TestWebViewDelegate> delegate_;
418 scoped_ptr<TestWebViewDelegate> popup_delegate_; 424 scoped_ptr<TestWebViewDelegate> popup_delegate_;
419 425
420 base::WeakPtr<TestShell> devtools_shell_; 426 base::WeakPtr<TestShell> devtools_shell_;
421 scoped_ptr<TestShellDevToolsAgent> dev_tools_agent_; 427 scoped_ptr<TestShellDevToolsAgent> dev_tools_agent_;
422 scoped_ptr<TestShellDevToolsClient> dev_tools_client_; 428 scoped_ptr<TestShellDevToolsClient> dev_tools_client_;
423 scoped_ptr<WebKit::WebDeviceOrientationClientMock> 429 scoped_ptr<WebKit::WebDeviceOrientationClientMock>
424 device_orientation_client_mock_; 430 device_orientation_client_mock_;
431 scoped_ptr<WebKit::WebSpeechInputControllerMock>
432 speech_input_controller_mock_;
425 433
426 // A temporary directory for FileSystem API. 434 // A temporary directory for FileSystem API.
427 ScopedTempDir file_system_root_; 435 ScopedTempDir file_system_root_;
428 436
429 const TestParams* test_params_; 437 const TestParams* test_params_;
430 438
431 // True while a test is preparing to run 439 // True while a test is preparing to run
432 static bool test_is_preparing_; 440 static bool test_is_preparing_;
433 441
434 // True while a test is running 442 // True while a test is running
(...skipping 18 matching lines...) Expand all
453 #if defined(OS_WIN) 461 #if defined(OS_WIN)
454 // Used by the watchdog to know when it's finished. 462 // Used by the watchdog to know when it's finished.
455 HANDLE finished_event_; 463 HANDLE finished_event_;
456 #endif 464 #endif
457 465
458 // Dump the stats table counters on exit. 466 // Dump the stats table counters on exit.
459 bool dump_stats_table_on_exit_; 467 bool dump_stats_table_on_exit_;
460 }; 468 };
461 469
462 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ 470 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698