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

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

Issue 118733002: Added merge session request throttle for XHR requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/run_loop.h" 5 #include "base/run_loop.h"
6 #include "base/time/time.h" 6 #include "base/time/time.h"
7 #include "chrome/browser/chromeos/login/merge_session_load_page.h" 7 #include "chrome/browser/chromeos/login/merge_session_load_page.h"
8 #include "chrome/browser/chromeos/login/oauth2_login_manager.h" 8 #include "chrome/browser/chromeos/login/oauth2_login_manager.h"
9 #include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h" 9 #include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h"
10 #include "chrome/browser/chromeos/login/user_manager.h" 10 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 21 matching lines...) Expand all
32 namespace chromeos { 32 namespace chromeos {
33 33
34 class MergeSessionLoadPageTest; 34 class MergeSessionLoadPageTest;
35 35
36 // An MergeSessionLoadPage class that does not create windows. 36 // An MergeSessionLoadPage class that does not create windows.
37 class TestMergeSessionLoadPage : public MergeSessionLoadPage { 37 class TestMergeSessionLoadPage : public MergeSessionLoadPage {
38 public: 38 public:
39 TestMergeSessionLoadPage(WebContents* web_contents, 39 TestMergeSessionLoadPage(WebContents* web_contents,
40 const GURL& url, 40 const GURL& url,
41 MergeSessionLoadPageTest* test_page) 41 MergeSessionLoadPageTest* test_page)
42 : MergeSessionLoadPage(web_contents, url, CompletionCallback()), 42 : MergeSessionLoadPage(web_contents,
43 url,
44 MergeSessionThrottle::CompletionCallback()),
43 test_page_(test_page) { 45 test_page_(test_page) {
44 interstitial_page_->DontCreateViewForTesting(); 46 interstitial_page_->DontCreateViewForTesting();
45 } 47 }
46 48
47 private: 49 private:
48 MergeSessionLoadPageTest* test_page_; 50 MergeSessionLoadPageTest* test_page_;
49 51
50 DISALLOW_COPY_AND_ASSIGN(TestMergeSessionLoadPage); 52 DISALLOW_COPY_AND_ASSIGN(TestMergeSessionLoadPage);
51 }; 53 };
52 54
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 174
173 // The URL remains to be URL2. 175 // The URL remains to be URL2.
174 EXPECT_EQ(kURL2, web_contents()->GetVisibleURL().spec()); 176 EXPECT_EQ(kURL2, web_contents()->GetVisibleURL().spec());
175 177
176 // Commit navigation and the interstitial page is gone. 178 // Commit navigation and the interstitial page is gone.
177 Navigate(kURL2, 2); 179 Navigate(kURL2, 2);
178 EXPECT_FALSE(GetMergeSessionLoadPage()); 180 EXPECT_FALSE(GetMergeSessionLoadPage());
179 } 181 }
180 182
181 } // namespace chromeos 183 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/merge_session_load_page.cc ('k') | chrome/browser/chromeos/login/merge_session_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698