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

Unified Diff: chrome/browser/chromeos/first_run/first_run_browsertest.cc

Issue 141803002: Prevented flakiness in FirstRunUIBrowserTest.FirstRunFlow test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/first_run/first_run_browsertest.cc
diff --git a/chrome/browser/chromeos/first_run/first_run_browsertest.cc b/chrome/browser/chromeos/first_run/first_run_browsertest.cc
index 6daa292da9c95c8e4e836741fd24c423e11fd57f..a47c3d97e03b25587ce71bc583faadf13cccfe4a 100644
--- a/chrome/browser/chromeos/first_run/first_run_browsertest.cc
+++ b/chrome/browser/chromeos/first_run/first_run_browsertest.cc
@@ -35,6 +35,7 @@ class FirstRunUIBrowserTest : public InProcessBrowserTest,
}
virtual void OnStepShown(const std::string& step_name) OVERRIDE {
+ current_step_name_ = step_name;
if (!on_step_shown_callback_.is_null())
on_step_shown_callback_.Run();
controller()->OnStepShown(step_name);
@@ -77,10 +78,10 @@ class FirstRunUIBrowserTest : public InProcessBrowserTest,
}
void WaitForStep(const std::string& step_name) {
- if (GetCurrentStepName() == step_name)
+ if (current_step_name_ == step_name)
return;
WaitUntilCalled(&on_step_shown_callback_);
- EXPECT_EQ(GetCurrentStepName(), step_name);
+ EXPECT_EQ(current_step_name_, step_name);
}
void AdvanceStep() {
@@ -102,11 +103,6 @@ class FirstRunUIBrowserTest : public InProcessBrowserTest,
callback->Reset();
}
- std::string GetCurrentStepName() {
- return js().GetString(
- "cr.FirstRun.currentStep_ ? cr.FirstRun.currentStep_.getName() : ''");
- }
-
test::JSChecker& js() { return js_; }
ash::FirstRunHelper* shell_helper() {
@@ -118,6 +114,7 @@ class FirstRunUIBrowserTest : public InProcessBrowserTest,
}
private:
+ std::string current_step_name_;
bool initialized_;
bool finalized_;
base::Closure on_initialized_callback_;
@@ -126,8 +123,7 @@ class FirstRunUIBrowserTest : public InProcessBrowserTest,
test::JSChecker js_;
};
-// Disabled due to flakiness, see http://crbug.com/335280
-IN_PROC_BROWSER_TEST_F(FirstRunUIBrowserTest, DISABLED_FirstRunFlow) {
+IN_PROC_BROWSER_TEST_F(FirstRunUIBrowserTest, FirstRunFlow) {
LaunchTutorial();
WaitForInitialization();
WaitForStep(first_run::kAppListStep);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698