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

Side by Side Diff: chrome/browser/ui/website_settings/permission_bubble_manager_unittest.cc

Issue 373623002: Convert remaining WebContentsObservers loading callbacks to use RFH. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CrOS test Created 6 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/website_settings/mock_permission_bubble_request.h" 8 #include "chrome/browser/ui/website_settings/mock_permission_bubble_request.h"
9 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" 9 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
10 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" 10 #include "chrome/browser/ui/website_settings/permission_bubble_request.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 void Accept() { 91 void Accept() {
92 manager_->Accept(); 92 manager_->Accept();
93 } 93 }
94 94
95 void Closing() { 95 void Closing() {
96 manager_->Closing(); 96 manager_->Closing();
97 } 97 }
98 98
99 void WaitForFrameLoad() { 99 void WaitForFrameLoad() {
100 manager_->DocumentLoadedInFrame(0, NULL); 100 // PermissionBubbleManager ignores all parameters. Yay?
101 manager_->DocumentLoadedInFrame(NULL);
101 base::MessageLoop::current()->RunUntilIdle(); 102 base::MessageLoop::current()->RunUntilIdle();
102 } 103 }
103 104
104 void WaitForCoalescing() { 105 void WaitForCoalescing() {
105 manager_->DocumentOnLoadCompletedInMainFrame(); 106 manager_->DocumentOnLoadCompletedInMainFrame();
106 base::MessageLoop::current()->RunUntilIdle(); 107 base::MessageLoop::current()->RunUntilIdle();
107 } 108 }
108 109
109 virtual void NavigationEntryCommitted( 110 virtual void NavigationEntryCommitted(
110 const content::LoadCommittedDetails& details) { 111 const content::LoadCommittedDetails& details) {
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 EXPECT_FALSE(request2_.finished()); 519 EXPECT_FALSE(request2_.finished());
519 EXPECT_FALSE(iframe_request_other_domain_.finished()); 520 EXPECT_FALSE(iframe_request_other_domain_.finished());
520 EXPECT_TRUE(view_.shown_); 521 EXPECT_TRUE(view_.shown_);
521 Closing(); 522 Closing();
522 EXPECT_TRUE(request2_.finished()); 523 EXPECT_TRUE(request2_.finished());
523 EXPECT_FALSE(iframe_request_other_domain_.finished()); 524 EXPECT_FALSE(iframe_request_other_domain_.finished());
524 Closing(); 525 Closing();
525 EXPECT_TRUE(iframe_request_other_domain_.finished()); 526 EXPECT_TRUE(iframe_request_other_domain_.finished());
526 EXPECT_FALSE(view_.shown_); 527 EXPECT_FALSE(view_.shown_);
527 } 528 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698