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

Side by Side Diff: chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc

Issue 1159143008: Fix wrong initialization of renderer_initiated_creation parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing after rebase 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 (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/captive_portal/captive_portal_tab_helper.h" 5 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/captive_portal/captive_portal_service.h" 9 #include "chrome/browser/captive_portal/captive_portal_service.h"
10 #include "chrome/browser/captive_portal/captive_portal_tab_reloader.h" 10 #include "chrome/browser/captive_portal/captive_portal_tab_reloader.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 : tab_helper_(NULL), 69 : tab_helper_(NULL),
70 mock_reloader_(new testing::StrictMock<MockCaptivePortalTabReloader>) { 70 mock_reloader_(new testing::StrictMock<MockCaptivePortalTabReloader>) {
71 tab_helper_.SetTabReloaderForTest(mock_reloader_); 71 tab_helper_.SetTabReloaderForTest(mock_reloader_);
72 } 72 }
73 ~CaptivePortalTabHelperTest() override {} 73 ~CaptivePortalTabHelperTest() override {}
74 74
75 void SetUp() override { 75 void SetUp() override {
76 ChromeRenderViewHostTestHarness::SetUp(); 76 ChromeRenderViewHostTestHarness::SetUp();
77 web_contents1_.reset(CreateTestWebContents()); 77 web_contents1_.reset(CreateTestWebContents());
78 web_contents2_.reset(CreateTestWebContents()); 78 web_contents2_.reset(CreateTestWebContents());
79 content::RenderViewHostTester::For(render_view_host1())
80 ->CreateTestRenderView(base::string16(), MSG_ROUTING_NONE,
81 MSG_ROUTING_NONE, -1, false);
82 content::RenderViewHostTester::For(render_view_host2())
83 ->CreateTestRenderView(base::string16(), MSG_ROUTING_NONE,
84 MSG_ROUTING_NONE, -1, false);
79 } 85 }
80 86
81 void TearDown() override { 87 void TearDown() override {
82 web_contents2_.reset(NULL); 88 web_contents2_.reset(NULL);
83 web_contents1_.reset(NULL); 89 web_contents1_.reset(NULL);
84 ChromeRenderViewHostTestHarness::TearDown(); 90 ChromeRenderViewHostTestHarness::TearDown();
85 } 91 }
86 92
87 // Simulates a successful load of |url|. 93 // Simulates a successful load of |url|.
88 void SimulateSuccess(const GURL& url, 94 void SimulateSuccess(const GURL& url,
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 EXPECT_FALSE(tab_helper().IsLoginTab()); 645 EXPECT_FALSE(tab_helper().IsLoginTab());
640 646
641 ObservePortalResult(captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL, 647 ObservePortalResult(captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL,
642 captive_portal::RESULT_NO_RESPONSE); 648 captive_portal::RESULT_NO_RESPONSE);
643 EXPECT_FALSE(tab_helper().IsLoginTab()); 649 EXPECT_FALSE(tab_helper().IsLoginTab());
644 650
645 ObservePortalResult(captive_portal::RESULT_NO_RESPONSE, 651 ObservePortalResult(captive_portal::RESULT_NO_RESPONSE,
646 captive_portal::RESULT_INTERNET_CONNECTED); 652 captive_portal::RESULT_INTERNET_CONNECTED);
647 EXPECT_FALSE(tab_helper().IsLoginTab()); 653 EXPECT_FALSE(tab_helper().IsLoginTab());
648 } 654 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698