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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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/macros.h" 5 #include "base/macros.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/frame_host/navigation_entry_impl.h" 10 #include "content/browser/frame_host/navigation_entry_impl.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 NavigateToURL(shell(), 375 NavigateToURL(shell(),
376 embedded_test_server()->GetURL("/frame_tree/top.html")); 376 embedded_test_server()->GetURL("/frame_tree/top.html"));
377 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents()); 377 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
378 FrameTreeNode* root = wc->GetFrameTree()->root(); 378 FrameTreeNode* root = wc->GetFrameTree()->root();
379 ASSERT_EQ(3UL, root->child_count()); 379 ASSERT_EQ(3UL, root->child_count());
380 int frame_tree_node_id = root->child_at(0)->frame_tree_node_id(); 380 int frame_tree_node_id = root->child_at(0)->frame_tree_node_id();
381 EXPECT_NE(-1, frame_tree_node_id); 381 EXPECT_NE(-1, frame_tree_node_id);
382 382
383 // Navigate with the subframe's FrameTreeNode ID. 383 // Navigate with the subframe's FrameTreeNode ID.
384 const GURL url(embedded_test_server()->GetURL("/title1.html")); 384 const GURL url(embedded_test_server()->GetURL("/title1.html"));
385 OpenURLParams params(url, Referrer(), frame_tree_node_id, CURRENT_TAB, 385 OpenURLParams params(url, Referrer(), frame_tree_node_id,
386 WindowOpenDisposition::CURRENT_TAB,
386 ui::PAGE_TRANSITION_LINK, true); 387 ui::PAGE_TRANSITION_LINK, true);
387 shell()->web_contents()->OpenURL(params); 388 shell()->web_contents()->OpenURL(params);
388 389
389 // Make sure the NavigationEntry ends up with the FrameTreeNode ID. 390 // Make sure the NavigationEntry ends up with the FrameTreeNode ID.
390 NavigationController* controller = &shell()->web_contents()->GetController(); 391 NavigationController* controller = &shell()->web_contents()->GetController();
391 EXPECT_TRUE(controller->GetPendingEntry()); 392 EXPECT_TRUE(controller->GetPendingEntry());
392 EXPECT_EQ(frame_tree_node_id, 393 EXPECT_EQ(frame_tree_node_id,
393 NavigationEntryImpl::FromNavigationEntry( 394 NavigationEntryImpl::FromNavigationEntry(
394 controller->GetPendingEntry())->frame_tree_node_id()); 395 controller->GetPendingEntry())->frame_tree_node_id());
395 } 396 }
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 shell()->LoadURL(GURL("about:blank")); 1244 shell()->LoadURL(GURL("about:blank"));
1244 base::RunLoop run_loop; 1245 base::RunLoop run_loop;
1245 shell()->web_contents()->DownloadImage( 1246 shell()->web_contents()->DownloadImage(
1246 kImageUrl, false, 2, false, 1247 kImageUrl, false, 2, false,
1247 base::Bind(&ExpectNoValidImageCallback, run_loop.QuitClosure())); 1248 base::Bind(&ExpectNoValidImageCallback, run_loop.QuitClosure()));
1248 1249
1249 run_loop.Run(); 1250 run_loop.Run();
1250 } 1251 }
1251 1252
1252 } // namespace content 1253 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/web_contents/web_drag_dest_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698