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

Side by Side Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "content/browser/frame_host/navigation_entry_impl.h" 7 #include "content/browser/frame_host/navigation_entry_impl.h"
8 #include "content/browser/web_contents/web_contents_impl.h" 8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/browser/web_contents/web_contents_view.h" 9 #include "content/browser/web_contents/web_contents_view.h"
10 #include "content/public/browser/load_notification_details.h" 10 #include "content/public/browser/load_notification_details.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 test_server()->GetURL("files/frame_tree/top.html")); 345 test_server()->GetURL("files/frame_tree/top.html"));
346 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents()); 346 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
347 FrameTreeNode* root = wc->GetFrameTree()->root(); 347 FrameTreeNode* root = wc->GetFrameTree()->root();
348 ASSERT_EQ(3UL, root->child_count()); 348 ASSERT_EQ(3UL, root->child_count());
349 int64 frame_tree_node_id = root->child_at(0)->frame_tree_node_id(); 349 int64 frame_tree_node_id = root->child_at(0)->frame_tree_node_id();
350 EXPECT_NE(-1, frame_tree_node_id); 350 EXPECT_NE(-1, frame_tree_node_id);
351 351
352 // Navigate with the subframe's FrameTreeNode ID. 352 // Navigate with the subframe's FrameTreeNode ID.
353 const GURL url(test_server()->GetURL("files/title1.html")); 353 const GURL url(test_server()->GetURL("files/title1.html"));
354 OpenURLParams params(url, Referrer(), frame_tree_node_id, CURRENT_TAB, 354 OpenURLParams params(url, Referrer(), frame_tree_node_id, CURRENT_TAB,
355 PAGE_TRANSITION_LINK, true); 355 ui::PAGE_TRANSITION_LINK, true);
356 shell()->web_contents()->OpenURL(params); 356 shell()->web_contents()->OpenURL(params);
357 357
358 // Make sure the NavigationEntry ends up with the FrameTreeNode ID. 358 // Make sure the NavigationEntry ends up with the FrameTreeNode ID.
359 NavigationController* controller = &shell()->web_contents()->GetController(); 359 NavigationController* controller = &shell()->web_contents()->GetController();
360 EXPECT_TRUE(controller->GetPendingEntry()); 360 EXPECT_TRUE(controller->GetPendingEntry());
361 EXPECT_EQ(frame_tree_node_id, 361 EXPECT_EQ(frame_tree_node_id,
362 NavigationEntryImpl::FromNavigationEntry( 362 NavigationEntryImpl::FromNavigationEntry(
363 controller->GetPendingEntry())->frame_tree_node_id()); 363 controller->GetPendingEntry())->frame_tree_node_id());
364 } 364 }
365 365
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 new FirstVisuallyNonEmptyPaintObserver(shell())); 561 new FirstVisuallyNonEmptyPaintObserver(shell()));
562 562
563 NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html")); 563 NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html"));
564 564
565 observer->WaitForDidFirstVisuallyNonEmptyPaint(); 565 observer->WaitForDidFirstVisuallyNonEmptyPaint();
566 ASSERT_TRUE(observer->did_fist_visually_non_empty_paint_); 566 ASSERT_TRUE(observer->did_fist_visually_non_empty_paint_);
567 } 567 }
568 568
569 } // namespace content 569 } // namespace content
570 570
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698