| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/browser/frame_host/frame_tree_node.h" | 8 #include "content/browser/frame_host/frame_tree_node.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 EXPECT_EQ( | 374 EXPECT_EQ( |
| 375 " Site D\n" | 375 " Site D\n" |
| 376 "Where D = http://d.com/", | 376 "Where D = http://d.com/", |
| 377 DepictFrameTree(popup_root)); | 377 DepictFrameTree(popup_root)); |
| 378 EXPECT_EQ( | 378 EXPECT_EQ( |
| 379 " Site D\n" | 379 " Site D\n" |
| 380 "Where D = http://d.com/", | 380 "Where D = http://d.com/", |
| 381 DepictFrameTree(root())); | 381 DepictFrameTree(root())); |
| 382 } | 382 } |
| 383 | 383 |
| 384 IN_PROC_BROWSER_TEST_F(TopDocumentIsolationTest, FramesForSitesInHistory) { | 384 // Flaky on Mac. See https://crbug.com/611344. |
| 385 #if defined(OS_MACOSX) |
| 386 #define MAYBE_FramesForSitesInHistory DISABLED_FramesForSitesInHistory |
| 387 #else |
| 388 #define MAYBE_FramesForSitesInHistory FramesForSitesInHistory |
| 389 #endif |
| 390 |
| 391 IN_PROC_BROWSER_TEST_F(TopDocumentIsolationTest, |
| 392 MAYBE_FramesForSitesInHistory) { |
| 385 if (content::AreAllSitesIsolatedForTesting()) | 393 if (content::AreAllSitesIsolatedForTesting()) |
| 386 return; // Top Document Isolation is disabled in this mode. | 394 return; // Top Document Isolation is disabled in this mode. |
| 387 | 395 |
| 388 // First, do a series of navigations. | 396 // First, do a series of navigations. |
| 389 GURL a_url = embedded_test_server()->GetURL( | 397 GURL a_url = embedded_test_server()->GetURL( |
| 390 "a.com", "/cross_site_iframe_factory.html?a"); | 398 "a.com", "/cross_site_iframe_factory.html?a"); |
| 391 GURL b_url = embedded_test_server()->GetURL( | 399 GURL b_url = embedded_test_server()->GetURL( |
| 392 "b.com", "/cross_site_iframe_factory.html?b"); | 400 "b.com", "/cross_site_iframe_factory.html?b"); |
| 393 GURL c_url = embedded_test_server()->GetURL( | 401 GURL c_url = embedded_test_server()->GetURL( |
| 394 "c.com", "/cross_site_iframe_factory.html?c"); | 402 "c.com", "/cross_site_iframe_factory.html?c"); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 " C = http://adnetwork.com/", | 570 " C = http://adnetwork.com/", |
| 563 DepictFrameTree(root())); | 571 DepictFrameTree(root())); |
| 564 EXPECT_EQ( | 572 EXPECT_EQ( |
| 565 " Site C ------------ proxies for B\n" | 573 " Site C ------------ proxies for B\n" |
| 566 "Where B = default subframe process\n" | 574 "Where B = default subframe process\n" |
| 567 " C = http://adnetwork.com/", | 575 " C = http://adnetwork.com/", |
| 568 DepictFrameTree(popup_root)); | 576 DepictFrameTree(popup_root)); |
| 569 } | 577 } |
| 570 | 578 |
| 571 } // namespace content | 579 } // namespace content |
| OLD | NEW |