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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/frame_navigation_state_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: addressing nick's comments 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "chrome/browser/extensions/api/web_navigation/frame_navigation_state.h" 7 #include "chrome/browser/extensions/api/web_navigation/frame_navigation_state.h"
8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 class FrameNavigationStateTest : public ChromeRenderViewHostTestHarness { 14 class FrameNavigationStateTest : public ChromeRenderViewHostTestHarness {
15 public:
16 void SetUp() override {
17 ChromeRenderViewHostTestHarness::SetUp();
18
19 content::RenderFrameHostTester::For(main_rfh())
20 ->InitializeRenderFrameIfNeeded();
21 }
22
15 protected: 23 protected:
16 FrameNavigationStateTest() {} 24 FrameNavigationStateTest() {}
17 ~FrameNavigationStateTest() override {} 25 ~FrameNavigationStateTest() override {}
18 26
19 FrameNavigationState navigation_state_; 27 FrameNavigationState navigation_state_;
20 28
21 private: 29 private:
22 DISALLOW_COPY_AND_ASSIGN(FrameNavigationStateTest); 30 DISALLOW_COPY_AND_ASSIGN(FrameNavigationStateTest);
23 }; 31 };
24 32
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 EXPECT_EQ(url2, navigation_state_.GetUrl(sub_frame)); 176 EXPECT_EQ(url2, navigation_state_.GetUrl(sub_frame));
169 177
170 // Drop one frame. 178 // Drop one frame.
171 navigation_state_.FrameHostDeleted(sub_frame); 179 navigation_state_.FrameHostDeleted(sub_frame);
172 EXPECT_EQ(url1, navigation_state_.GetUrl(main_rfh())); 180 EXPECT_EQ(url1, navigation_state_.GetUrl(main_rfh()));
173 EXPECT_FALSE(navigation_state_.CanSendEvents(sub_frame)); 181 EXPECT_FALSE(navigation_state_.CanSendEvents(sub_frame));
174 EXPECT_FALSE(navigation_state_.IsValidFrame(sub_frame)); 182 EXPECT_FALSE(navigation_state_.IsValidFrame(sub_frame));
175 } 183 }
176 184
177 } // namespace extensions 185 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698