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

Side by Side Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 2579073002: Disable BrowserNavigatorTest.Disposition_Incognito on ASAN on Mac. (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 "chrome/browser/ui/browser_navigator_browsertest.h" 5 #include "chrome/browser/ui/browser_navigator_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 EXPECT_NE(browser(), params.browser); 629 EXPECT_NE(browser(), params.browser);
630 EXPECT_TRUE(params.browser->is_type_tabbed()); 630 EXPECT_TRUE(params.browser->is_type_tabbed());
631 631
632 // We should now have two windows, the browser() provided by the framework and 632 // We should now have two windows, the browser() provided by the framework and
633 // the new normal window. 633 // the new normal window.
634 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); 634 EXPECT_EQ(2u, chrome::GetTotalBrowserCount());
635 EXPECT_EQ(1, browser()->tab_strip_model()->count()); 635 EXPECT_EQ(1, browser()->tab_strip_model()->count());
636 EXPECT_EQ(1, params.browser->tab_strip_model()->count()); 636 EXPECT_EQ(1, params.browser->tab_strip_model()->count());
637 } 637 }
638 638
639 #if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER)
640 // Flaky on ASAN on Mac. See https://crbug.com/674497.
641 #define MAYBE_Disposition_Incognito DISABLED_Disposition_Incognito
642 #else
643 #define MAYBE_Disposition_Incognito Disposition_Incognito
644 #endif
639 // This test verifies that navigating with WindowOpenDisposition = INCOGNITO 645 // This test verifies that navigating with WindowOpenDisposition = INCOGNITO
640 // opens a new incognito window if no existing incognito window is present. 646 // opens a new incognito window if no existing incognito window is present.
641 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_Incognito) { 647 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, MAYBE_Disposition_Incognito) {
642 chrome::NavigateParams params(MakeNavigateParams()); 648 chrome::NavigateParams params(MakeNavigateParams());
643 params.disposition = WindowOpenDisposition::OFF_THE_RECORD; 649 params.disposition = WindowOpenDisposition::OFF_THE_RECORD;
644 chrome::Navigate(&params); 650 chrome::Navigate(&params);
645 651
646 // Navigate() should have opened a new toplevel incognito window. 652 // Navigate() should have opened a new toplevel incognito window.
647 EXPECT_NE(browser(), params.browser); 653 EXPECT_NE(browser(), params.browser);
648 EXPECT_EQ(browser()->profile()->GetOffTheRecordProfile(), 654 EXPECT_EQ(browser()->profile()->GetOffTheRecordProfile(),
649 params.browser->profile()); 655 params.browser->profile());
650 656
651 // |source_contents| should be set to NULL because the profile for the new 657 // |source_contents| should be set to NULL because the profile for the new
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 // reuse the old RenderViewHost. 1497 // reuse the old RenderViewHost.
1492 content::TestNavigationObserver back_load_observer(popup); 1498 content::TestNavigationObserver back_load_observer(popup);
1493 controller->GoBack(); 1499 controller->GoBack();
1494 back_load_observer.Wait(); 1500 back_load_observer.Wait();
1495 EXPECT_EQ(webui_rvh, popup->GetRenderViewHost()); 1501 EXPECT_EQ(webui_rvh, popup->GetRenderViewHost());
1496 EXPECT_TRUE(webui_rvh->IsRenderViewLive()); 1502 EXPECT_TRUE(webui_rvh->IsRenderViewLive());
1497 EXPECT_EQ(content::BINDINGS_POLICY_WEB_UI, webui_rvh->GetEnabledBindings()); 1503 EXPECT_EQ(content::BINDINGS_POLICY_WEB_UI, webui_rvh->GetEnabledBindings());
1498 } 1504 }
1499 1505
1500 } // namespace 1506 } // namespace
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