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

Side by Side Diff: chrome/test/ui/ui_test.h

Issue 8390041: Call VerifyCleanExit in TerminateBrowser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: missed a file Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/unload_uitest.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_TEST_UI_UI_TEST_H_ 5 #ifndef CHROME_TEST_UI_UI_TEST_H_
6 #define CHROME_TEST_UI_UI_TEST_H_ 6 #define CHROME_TEST_UI_UI_TEST_H_
7 #pragma once 7 #pragma once
8 8
9 // This file provides a common base for running UI unit tests, which operate 9 // This file provides a common base for running UI unit tests, which operate
10 // the entire browser application in a separate process for holistic 10 // the entire browser application in a separate process for holistic
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 // Waits until the Find window has become fully visible (if |wait_for_open| is 464 // Waits until the Find window has become fully visible (if |wait_for_open| is
465 // true) or fully hidden (if |wait_for_open| is false). This function can time 465 // true) or fully hidden (if |wait_for_open| is false). This function can time
466 // out (return false) if the window doesn't appear within a specific time. 466 // out (return false) if the window doesn't appear within a specific time.
467 bool WaitForFindWindowVisibilityChange(BrowserProxy* browser, 467 bool WaitForFindWindowVisibilityChange(BrowserProxy* browser,
468 bool wait_for_open); 468 bool wait_for_open);
469 469
470 // Terminates the browser, simulates end of session. 470 // Terminates the browser, simulates end of session.
471 void TerminateBrowser(); 471 void TerminateBrowser();
472 472
473 // Verify that the browser exited cleanly.
474 void VerifyCleanExit();
475
476 // Tells the browser to navigate to the given URL in the active tab 473 // Tells the browser to navigate to the given URL in the active tab
477 // of the first app window. 474 // of the first app window.
478 // Does not wait for the navigation to complete to return. 475 // Does not wait for the navigation to complete to return.
479 // To avoid intermittent test failures, use NavigateToURL instead, if 476 // To avoid intermittent test failures, use NavigateToURL instead, if
480 // possible. 477 // possible.
481 void NavigateToURLAsync(const GURL& url); 478 void NavigateToURLAsync(const GURL& url);
482 479
483 private: 480 private:
484 // Waits for download shelf visibility or invisibility. 481 // Waits for download shelf visibility or invisibility.
485 bool WaitForDownloadShelfVisibilityChange(BrowserProxy* browser, 482 bool WaitForDownloadShelfVisibilityChange(BrowserProxy* browser,
486 bool wait_for_open); 483 bool wait_for_open);
487 484
488 MessageLoop message_loop_; // Enables PostTask to main thread. 485 MessageLoop message_loop_; // Enables PostTask to main thread.
489 }; 486 };
490 487
491 // These exist only to support the gTest assertion macros, and 488 // These exist only to support the gTest assertion macros, and
492 // shouldn't be used in normal program code. 489 // shouldn't be used in normal program code.
493 #ifdef UNIT_TEST 490 #ifdef UNIT_TEST
494 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); 491 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr);
495 492
496 template<typename T> 493 template<typename T>
497 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { 494 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) {
498 return out << ptr.get(); 495 return out << ptr.get();
499 } 496 }
500 #endif // UNIT_TEST 497 #endif // UNIT_TEST
501 498
502 #endif // CHROME_TEST_UI_UI_TEST_H_ 499 #endif // CHROME_TEST_UI_UI_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/unload_uitest.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698