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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 2617893002: Remove uses of UseSubframeNavigationEntries in unit tests. (Closed)
Patch Set: Fix compile Created 3 years, 11 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
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching( 584 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching(
585 ViewHostMsg_UpdateState::ID)); 585 ViewHostMsg_UpdateState::ID));
586 render_thread_->sink().ClearMessages(); 586 render_thread_->sink().ClearMessages();
587 587
588 // Change the value of the input. We should have gotten an update state 588 // Change the value of the input. We should have gotten an update state
589 // notification. We need to spin the message loop to catch this update. 589 // notification. We need to spin the message loop to catch this update.
590 ExecuteJavaScriptForTests( 590 ExecuteJavaScriptForTests(
591 "document.getElementById('elt_text').value = 'foo';"); 591 "document.getElementById('elt_text').value = 'foo';");
592 ProcessPendingMessages(); 592 ProcessPendingMessages();
593 593
594 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { 594 EXPECT_TRUE(render_thread_->sink().GetUniqueMessageMatching(
595 EXPECT_TRUE(render_thread_->sink().GetUniqueMessageMatching( 595 FrameHostMsg_UpdateState::ID));
596 FrameHostMsg_UpdateState::ID));
597 } else {
598 EXPECT_TRUE(render_thread_->sink().GetUniqueMessageMatching(
599 ViewHostMsg_UpdateState::ID));
600 }
601 } 596 }
602 597
603 TEST_F(RenderViewImplTest, OnNavigationHttpPost) { 598 TEST_F(RenderViewImplTest, OnNavigationHttpPost) {
604 // An http url will trigger a resource load so cannot be used here. 599 // An http url will trigger a resource load so cannot be used here.
605 CommonNavigationParams common_params; 600 CommonNavigationParams common_params;
606 StartNavigationParams start_params; 601 StartNavigationParams start_params;
607 RequestNavigationParams request_params; 602 RequestNavigationParams request_params;
608 common_params.url = GURL("data:text/html,<div>Page</div>"); 603 common_params.url = GURL("data:text/html,<div>Page</div>");
609 common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL; 604 common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL;
610 common_params.transition = ui::PAGE_TRANSITION_TYPED; 605 common_params.transition = ui::PAGE_TRANSITION_TYPED;
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after
2554 ExpectPauseAndResume(3); 2549 ExpectPauseAndResume(3);
2555 blink::WebScriptSource source2( 2550 blink::WebScriptSource source2(
2556 WebString::fromUTF8("function func2() { func1(); }; func2();")); 2551 WebString::fromUTF8("function func2() { func1(); }; func2();"));
2557 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); 2552 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1);
2558 2553
2559 EXPECT_FALSE(IsPaused()); 2554 EXPECT_FALSE(IsPaused());
2560 Detach(); 2555 Detach();
2561 } 2556 }
2562 2557
2563 } // namespace content 2558 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698