OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" | 5 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 if (seen_) | 62 if (seen_) |
63 return; | 63 return; |
64 | 64 |
65 running_ = true; | 65 running_ = true; |
66 message_loop_runner_ = new MessageLoopRunner; | 66 message_loop_runner_ = new MessageLoopRunner; |
67 message_loop_runner_->Run(); | 67 message_loop_runner_->Run(); |
68 EXPECT_TRUE(seen_); | 68 EXPECT_TRUE(seen_); |
69 } | 69 } |
70 | 70 |
71 virtual void GoogleSignedOut(const std::string& account_id, | 71 virtual void GoogleSignedOut(const std::string& account_id, |
72 const std::string& username) OVERRIDE { | 72 const std::string& username) override { |
73 seen_ = true; | 73 seen_ = true; |
74 if (!running_) | 74 if (!running_) |
75 return; | 75 return; |
76 | 76 |
77 message_loop_runner_->Quit(); | 77 message_loop_runner_->Quit(); |
78 running_ = false; | 78 running_ = false; |
79 } | 79 } |
80 | 80 |
81 private: | 81 private: |
82 bool seen_; | 82 bool seen_; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 run_loop.Run(); | 331 run_loop.Run(); |
332 | 332 |
333 // Verify that the settings page has updated and lists two profiles. | 333 // Verify that the settings page has updated and lists two profiles. |
334 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( | 334 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( |
335 contents, javascript, &profiles)); | 335 contents, javascript, &profiles)); |
336 EXPECT_EQ(2, profiles); | 336 EXPECT_EQ(2, profiles); |
337 } | 337 } |
338 #endif | 338 #endif |
339 | 339 |
340 } // namespace options | 340 } // namespace options |
OLD | NEW |