| Index: chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
|
| diff --git a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
|
| index 4da9628c9b627165c06b0409cd05ca1425319dbd..5b36d0715b018bfb7096e0acd1454c4640b9a52e 100644
|
| --- a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
|
| +++ b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
|
| @@ -26,6 +26,7 @@
|
| #include "chrome/test/base/testing_profile_manager.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "content/public/test/mock_render_process_host.h"
|
| #include "content/public/test/test_browser_thread.h"
|
| #include "content/public/test/test_renderer_host.h"
|
| #include "grit/generated_resources.h"
|
| @@ -519,6 +520,21 @@ TEST_F(OneClickSigninHelperTest, CanOfferNoSigninCookies) {
|
| EXPECT_EQ(0, error_message_id);
|
| }
|
|
|
| +// Should not crash if a helper instance is not associated with an incognito
|
| +// web contents.
|
| +TEST_F(OneClickSigninHelperTest, ShowInfoBarUIThreadIncognito) {
|
| + CreateSigninManager(true, "");
|
| + OneClickSigninHelper* helper =
|
| + OneClickSigninHelper::FromWebContents(web_contents());
|
| + EXPECT_EQ(NULL, helper);
|
| +
|
| + OneClickSigninHelper::ShowInfoBarUIThread("session_index", "email",
|
| + OneClickSigninHelper::AUTO_ACCEPT,
|
| + SyncPromoUI::SOURCE_UNKNOWN,
|
| + process()->GetID(),
|
| + rvh()->GetRoutingID());
|
| +}
|
| +
|
| // I/O thread tests
|
|
|
| TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThread) {
|
|
|