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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc

Issue 319783003: Sheriffing: Disable failing tests PrintCommands and TaskManagerNewPrintPreview on Linux LSAN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« 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 "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/content_settings/host_content_settings_map.h" 8 #include "chrome/browser/content_settings/host_content_settings_map.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" 10 #include "chrome/browser/task_manager/task_manager_browsertest_util.h"
(...skipping 30 matching lines...) Expand all
41 41
42 void Print() { 42 void Print() {
43 content::TestNavigationObserver nav_observer(NULL); 43 content::TestNavigationObserver nav_observer(NULL);
44 nav_observer.StartWatchingNewWebContents(); 44 nav_observer.StartWatchingNewWebContents();
45 chrome::ExecuteCommand(browser(), IDC_PRINT); 45 chrome::ExecuteCommand(browser(), IDC_PRINT);
46 nav_observer.Wait(); 46 nav_observer.Wait();
47 nav_observer.StopWatchingNewWebContents(); 47 nav_observer.StopWatchingNewWebContents();
48 } 48 }
49 }; 49 };
50 50
51 // The two tests below are failing on Linux LSAN
52 // crbug.com/382523
53 #if !defined(ADDRESS_SANITIZER)
54
51 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, PrintCommands) { 55 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, PrintCommands) {
52 // We start off at about:blank page. 56 // We start off at about:blank page.
53 // Make sure there is 1 tab and print is enabled. 57 // Make sure there is 1 tab and print is enabled.
54 ASSERT_EQ(1, browser()->tab_strip_model()->count()); 58 ASSERT_EQ(1, browser()->tab_strip_model()->count());
55 59
56 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT)); 60 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT));
57 61
58 // Make sure advanced print command (Ctrl+Shift+p) is enabled. 62 // Make sure advanced print command (Ctrl+Shift+p) is enabled.
59 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT)); 63 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT));
60 64
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 97
94 // Create the print preview dialog. 98 // Create the print preview dialog.
95 Print(); 99 Print();
96 100
97 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAboutBlankTab())); 101 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAboutBlankTab()));
98 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); 102 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab()));
99 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyPrint())); 103 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyPrint()));
100 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchPrint("about:blank"))); 104 ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchPrint("about:blank")));
101 } 105 }
102 106
107 #endif
108
103 // Disable the test for mac as it started being flaky, see http://crbug/367665. 109 // Disable the test for mac as it started being flaky, see http://crbug/367665.
104 #if defined(OS_MACOSX) && !defined(OS_IOS) 110 #if defined(OS_MACOSX) && !defined(OS_IOS)
105 #define MAYBE_TaskManagerExistingPrintPreview DISABLED_TaskManagerExistingPrintP review 111 #define MAYBE_TaskManagerExistingPrintPreview DISABLED_TaskManagerExistingPrintP review
106 #else 112 #else
107 #define MAYBE_TaskManagerExistingPrintPreview TaskManagerExistingPrintPreview 113 #define MAYBE_TaskManagerExistingPrintPreview TaskManagerExistingPrintPreview
108 #endif 114 #endif
109 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, 115 IN_PROC_BROWSER_TEST_F(PrintPreviewTest,
110 MAYBE_TaskManagerExistingPrintPreview) { 116 MAYBE_TaskManagerExistingPrintPreview) {
111 // Create the print preview dialog. 117 // Create the print preview dialog.
112 Print(); 118 Print();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 browser()->tab_strip_model()->ActivateTabAt(0, true); 198 browser()->tab_strip_model()->ActivateTabAt(0, true);
193 199
194 // Navigate main tab to hide print preview. 200 // Navigate main tab to hide print preview.
195 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); 201 ui_test_utils::NavigateToURL(browser(), GURL("about:blank"));
196 202
197 browser()->tab_strip_model()->ActivateTabAt(1, true); 203 browser()->tab_strip_model()->ActivateTabAt(1, true);
198 } 204 }
199 #endif 205 #endif
200 206
201 } // namespace 207 } // 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