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

Unified Diff: chrome/test/ui/ui_test.cc

Issue 8390041: Call VerifyCleanExit in TerminateBrowser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: missed a file Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui/ui_test.cc
===================================================================
--- chrome/test/ui/ui_test.cc (revision 107321)
+++ chrome/test/ui/ui_test.cc (working copy)
@@ -762,6 +762,27 @@
void UITest::TerminateBrowser() {
launcher_->TerminateBrowser();
+
+ // Make sure the UMA metrics say we didn't crash.
+ scoped_ptr<DictionaryValue> local_prefs(GetLocalState());
+ bool exited_cleanly;
+ ASSERT_TRUE(local_prefs.get());
+ ASSERT_TRUE(local_prefs->GetBoolean(prefs::kStabilityExitedCleanly,
+ &exited_cleanly));
+ ASSERT_TRUE(exited_cleanly);
+
+ // And that session end was successful.
+ bool session_end_completed;
+ ASSERT_TRUE(local_prefs->GetBoolean(prefs::kStabilitySessionEndCompleted,
+ &session_end_completed));
+ ASSERT_TRUE(session_end_completed);
+
+ // Make sure session restore says we didn't crash.
+ scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences());
+ ASSERT_TRUE(profile_prefs.get());
+ ASSERT_TRUE(profile_prefs->GetBoolean(prefs::kSessionExitedCleanly,
+ &exited_cleanly));
+ ASSERT_TRUE(exited_cleanly);
}
void UITest::NavigateToURLAsync(const GURL& url) {
@@ -802,28 +823,3 @@
ADD_FAILURE() << "Timeout reached in " << __FUNCTION__;
return false;
}
-
-// TODO(achuith): Call VerifyCleanExit from TerminateBrowser.
-// http://crbug.com/101390
-void UITest::VerifyCleanExit() {
- // Make sure the UMA metrics say we didn't crash.
- scoped_ptr<DictionaryValue> local_prefs(GetLocalState());
- bool exited_cleanly;
- ASSERT_TRUE(local_prefs.get());
- ASSERT_TRUE(local_prefs->GetBoolean(prefs::kStabilityExitedCleanly,
- &exited_cleanly));
- ASSERT_TRUE(exited_cleanly);
-
- // And that session end was successful.
- bool session_end_completed;
- ASSERT_TRUE(local_prefs->GetBoolean(prefs::kStabilitySessionEndCompleted,
- &session_end_completed));
- ASSERT_TRUE(session_end_completed);
-
- // Make sure session restore says we didn't crash.
- scoped_ptr<DictionaryValue> profile_prefs(GetDefaultProfilePreferences());
- ASSERT_TRUE(profile_prefs.get());
- ASSERT_TRUE(profile_prefs->GetBoolean(prefs::kSessionExitedCleanly,
- &exited_cleanly));
- ASSERT_TRUE(exited_cleanly);
-}
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698