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

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

Issue 2558633008: Fix condition in test. (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 // recorded at an appropriate time and is passed in the corresponding message. 1986 // recorded at an appropriate time and is passed in the corresponding message.
1987 TEST_F(RenderViewImplTest, RendererNavigationStartTransmittedToBrowser) { 1987 TEST_F(RenderViewImplTest, RendererNavigationStartTransmittedToBrowser) {
1988 base::TimeTicks lower_bound_navigation_start(base::TimeTicks::Now()); 1988 base::TimeTicks lower_bound_navigation_start(base::TimeTicks::Now());
1989 frame()->GetWebFrame()->loadHTMLString( 1989 frame()->GetWebFrame()->loadHTMLString(
1990 "hello world", blink::WebURL(GURL("data:text/html,"))); 1990 "hello world", blink::WebURL(GURL("data:text/html,")));
1991 1991
1992 FrameHostMsg_DidStartProvisionalLoad::Param host_nav_params = 1992 FrameHostMsg_DidStartProvisionalLoad::Param host_nav_params =
1993 ProcessAndReadIPC<FrameHostMsg_DidStartProvisionalLoad>(); 1993 ProcessAndReadIPC<FrameHostMsg_DidStartProvisionalLoad>();
1994 base::TimeTicks transmitted_start = std::get<1>(host_nav_params); 1994 base::TimeTicks transmitted_start = std::get<1>(host_nav_params);
1995 EXPECT_FALSE(transmitted_start.is_null()); 1995 EXPECT_FALSE(transmitted_start.is_null());
1996 EXPECT_LT(lower_bound_navigation_start, transmitted_start); 1996 EXPECT_LE(lower_bound_navigation_start, transmitted_start);
1997 } 1997 }
1998 1998
1999 // Checks that a browser-initiated navigation in an initial document that was 1999 // Checks that a browser-initiated navigation in an initial document that was
2000 // not accessed uses browser-side timestamp. 2000 // not accessed uses browser-side timestamp.
2001 // This test assumes that |frame()| contains an unaccessed initial document at 2001 // This test assumes that |frame()| contains an unaccessed initial document at
2002 // start. 2002 // start.
2003 TEST_F(RenderViewImplTest, BrowserNavigationStart) { 2003 TEST_F(RenderViewImplTest, BrowserNavigationStart) {
2004 auto common_params = MakeCommonNavigationParams(-TimeDelta::FromSeconds(1)); 2004 auto common_params = MakeCommonNavigationParams(-TimeDelta::FromSeconds(1));
2005 2005
2006 frame()->Navigate(common_params, StartNavigationParams(), 2006 frame()->Navigate(common_params, StartNavigationParams(),
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 ExpectPauseAndResume(3); 2550 ExpectPauseAndResume(3);
2551 blink::WebScriptSource source2( 2551 blink::WebScriptSource source2(
2552 WebString::fromUTF8("function func2() { func1(); }; func2();")); 2552 WebString::fromUTF8("function func2() { func1(); }; func2();"));
2553 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); 2553 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1);
2554 2554
2555 EXPECT_FALSE(IsPaused()); 2555 EXPECT_FALSE(IsPaused());
2556 Detach(); 2556 Detach();
2557 } 2557 }
2558 2558
2559 } // namespace content 2559 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698