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

Side by Side Diff: components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_blocking_page_unittest.cc

Issue 1151973005: Bring RFH/RVH unit tests closer to reality of how RF/RV are initialized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add workaround to <webview> bug (492830) Created 5 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/data_reduction_proxy/content/browser/data_reduction_proxy_d ebug_blocking_page.h" 5 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_d ebug_blocking_page.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 controller().LoadURL(GURL(kBypassURL), content::Referrer(), 405 controller().LoadURL(GURL(kBypassURL), content::Referrer(),
406 ui::PAGE_TRANSITION_TYPED, std::string()); 406 ui::PAGE_TRANSITION_TYPED, std::string());
407 int pending_id = controller().GetPendingEntry()->GetUniqueID(); 407 int pending_id = controller().GetPendingEntry()->GetUniqueID();
408 ShowInterstitial(false, kBypassURL); 408 ShowInterstitial(false, kBypassURL);
409 DataReductionProxyDebugBlockingPage* interstitial = 409 DataReductionProxyDebugBlockingPage* interstitial =
410 GetDataReductionProxyDebugBlockingPage(); 410 GetDataReductionProxyDebugBlockingPage();
411 ASSERT_TRUE(interstitial); 411 ASSERT_TRUE(interstitial);
412 412
413 // Proceed through the 1st interstitial. 413 // Proceed through the 1st interstitial.
414 ProceedThroughInterstitial(interstitial); 414 ProceedThroughInterstitial(interstitial);
415 Navigate(kBypassURL, 2, pending_id, true); // Commit navigation. 415 NavigateCrossSite(kBypassURL, 2, pending_id, true); // Commit navigation.
416 GoBack(true); 416 GoBack(true);
417 417
418 // We are back on the first page. 418 // We are back on the first page.
419 interstitial = GetDataReductionProxyDebugBlockingPage(); 419 interstitial = GetDataReductionProxyDebugBlockingPage();
420 ASSERT_FALSE(interstitial); 420 ASSERT_FALSE(interstitial);
421 ASSERT_EQ(2, controller().GetEntryCount()); 421 ASSERT_EQ(2, controller().GetEntryCount());
422 EXPECT_EQ(kGoogleURL, controller().GetActiveEntry()->GetURL().spec()); 422 EXPECT_EQ(kGoogleURL, controller().GetActiveEntry()->GetURL().spec());
423 423
424 // Navigate forward to the bypassed URL. 424 // Navigate forward to the bypassed URL.
425 web_contents()->GetController().GoForward(); 425 web_contents()->GetController().GoForward();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 interstitial->interstitial_page()->Proceed(); 457 interstitial->interstitial_page()->Proceed();
458 interstitial->interstitial_page()->DontProceed(); 458 interstitial->interstitial_page()->DontProceed();
459 base::RunLoop().RunUntilIdle(); 459 base::RunLoop().RunUntilIdle();
460 460
461 // The interstitial should be gone. 461 // The interstitial should be gone.
462 EXPECT_EQ(OK, user_response()); 462 EXPECT_EQ(OK, user_response());
463 EXPECT_FALSE(GetDataReductionProxyDebugBlockingPage()); 463 EXPECT_FALSE(GetDataReductionProxyDebugBlockingPage());
464 } 464 }
465 465
466 } // namespace data_reduction_proxy 466 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698