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

Side by Side Diff: chrome/browser/ui/browser_focus_uitest.cc

Issue 789703004: Reflect the status of a request for accessing a blacklisted url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tested on Android/Desktop Created 5 years, 12 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Show the interstitial and delay return until it has attached. 165 // Show the interstitial and delay return until it has attached.
166 interstitial_page_->Show(); 166 interstitial_page_->Show();
167 content::WaitForInterstitialAttach(tab); 167 content::WaitForInterstitialAttach(tab);
168 168
169 EXPECT_TRUE(tab->ShowingInterstitialPage()); 169 EXPECT_TRUE(tab->ShowingInterstitialPage());
170 } 170 }
171 171
172 std::string GetHTMLContents() override { return html_contents_; } 172 std::string GetHTMLContents() override { return html_contents_; }
173 173
174 RenderViewHost* render_view_host() { 174 RenderViewHost* render_view_host() {
175 return interstitial_page_->GetRenderViewHostForTesting(); 175 return interstitial_page_->GetRenderViewHost();
176 } 176 }
177 177
178 void DontProceed() { interstitial_page_->DontProceed(); } 178 void DontProceed() { interstitial_page_->DontProceed(); }
179 179
180 bool HasFocus() { return render_view_host()->GetView()->HasFocus(); } 180 bool HasFocus() { return render_view_host()->GetView()->HasFocus(); }
181 181
182 private: 182 private:
183 std::string html_contents_; 183 std::string html_contents_;
184 content::InterstitialPage* interstitial_page_; // Owns this. 184 content::InterstitialPage* interstitial_page_; // Owns this.
185 DISALLOW_COPY_AND_ASSIGN(TestInterstitialPage); 185 DISALLOW_COPY_AND_ASSIGN(TestInterstitialPage);
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 699 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
700 content::NotificationService::AllSources()); 700 content::NotificationService::AllSources());
701 chrome::GoForward(browser(), CURRENT_TAB); 701 chrome::GoForward(browser(), CURRENT_TAB);
702 forward_nav_observer.Wait(); 702 forward_nav_observer.Wait();
703 } 703 }
704 704
705 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX)); 705 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX));
706 } 706 }
707 707
708 } // namespace 708 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698