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

Side by Side Diff: chrome/browser/chromeos/login/login_utils_browsertest.cc

Issue 12630010: Files.app: Treats HTTP_FORBIDDEN (403) as temporary error on authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test failure Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/google_apis/auth_service.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) 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/chromeos/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 if (steps < 5) { 676 if (steps < 5) {
677 // Verify that the profile hasn't been created yet. 677 // Verify that the profile hasn't been created yet.
678 EXPECT_FALSE(prepared_profile_); 678 EXPECT_FALSE(prepared_profile_);
679 679
680 // Make the current fetcher fail with a Gaia error. 680 // Make the current fetcher fail with a Gaia error.
681 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID( 681 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(
682 next_expected_fetcher_id); 682 next_expected_fetcher_id);
683 ASSERT_TRUE(fetcher); 683 ASSERT_TRUE(fetcher);
684 EXPECT_TRUE(fetcher->delegate()); 684 EXPECT_TRUE(fetcher->delegate());
685 fetcher->set_url(fetcher->GetOriginalURL()); 685 fetcher->set_url(fetcher->GetOriginalURL());
686 fetcher->set_response_code(403); 686 fetcher->set_response_code(401);
687 // This response body is important to make the gaia fetcher skip its delayed 687 // This response body is important to make the gaia fetcher skip its delayed
688 // retry behavior, which makes testing harder. If this is sent to the policy 688 // retry behavior, which makes testing harder. If this is sent to the policy
689 // fetchers then it will make them fail too. 689 // fetchers then it will make them fail too.
690 fetcher->SetResponseString(kGaiaAccountDisabledResponse); 690 fetcher->SetResponseString(kGaiaAccountDisabledResponse);
691 fetcher->delegate()->OnURLFetchComplete(fetcher); 691 fetcher->delegate()->OnURLFetchComplete(fetcher);
692 RunUntilIdle(); 692 RunUntilIdle();
693 } 693 }
694 694
695 // The profile is finally ready: 695 // The profile is finally ready:
696 EXPECT_TRUE(prepared_profile_); 696 EXPECT_TRUE(prepared_profile_);
697 } 697 }
698 698
699 INSTANTIATE_TEST_CASE_P( 699 INSTANTIATE_TEST_CASE_P(
700 LoginUtilsBlockingLoginTestInstance, 700 LoginUtilsBlockingLoginTestInstance,
701 LoginUtilsBlockingLoginTest, 701 LoginUtilsBlockingLoginTest,
702 testing::Values(0, 1, 2, 3, 4, 5)); 702 testing::Values(0, 1, 2, 3, 4, 5));
703 703
704 } // namespace 704 } // namespace
705 705
706 } 706 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google_apis/auth_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698