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

Side by Side Diff: chrome/browser/dom_ui/print_preview_ui_uitest.cc

Issue 6273008: Mark PrintPreviewUITest.PrintCommandDisabled flaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "base/string16.h" 6 #include "base/string16.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 29 matching lines...) Expand all
40 ASSERT_TRUE(browser.get()); 40 ASSERT_TRUE(browser.get());
41 41
42 scoped_refptr<TabProxy> tab = browser->GetActiveTab(); 42 scoped_refptr<TabProxy> tab = browser->GetActiveTab();
43 ASSERT_TRUE(tab.get()); 43 ASSERT_TRUE(tab.get());
44 44
45 // Go to the print preview tab via URL. 45 // Go to the print preview tab via URL.
46 NavigateToURL(GURL(chrome::kChromeUIPrintURL)); 46 NavigateToURL(GURL(chrome::kChromeUIPrintURL));
47 AssertIsPrintPage(tab); 47 AssertIsPrintPage(tab);
48 } 48 }
49 49
50 TEST_F(PrintPreviewUITest, PrintCommandDisabled) { 50 // Flaky on interactive tests builder. See http://crbug.com/69389
51 TEST_F(PrintPreviewUITest, FLAKY_PrintCommandDisabled) {
51 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 52 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
52 ASSERT_TRUE(browser.get()); 53 ASSERT_TRUE(browser.get());
53 54
54 // Go to the about:blank page. 55 // Go to the about:blank page.
55 NavigateToURL(GURL(chrome::kAboutBlankURL)); 56 NavigateToURL(GURL(chrome::kAboutBlankURL));
56 57
57 // Make sure there is 1 tab and print is enabled. Create print preview tab. 58 // Make sure there is 1 tab and print is enabled. Create print preview tab.
58 int tab_count; 59 int tab_count;
59 ASSERT_TRUE(browser->GetTabCount(&tab_count)); 60 ASSERT_TRUE(browser->GetTabCount(&tab_count));
60 ASSERT_EQ(1, tab_count); 61 ASSERT_EQ(1, tab_count);
61 bool enabled; 62 bool enabled;
62 ASSERT_TRUE(browser->IsMenuCommandEnabled(IDC_PRINT, &enabled)); 63 ASSERT_TRUE(browser->IsMenuCommandEnabled(IDC_PRINT, &enabled));
63 ASSERT_TRUE(enabled); 64 ASSERT_TRUE(enabled);
64 ASSERT_TRUE(browser->RunCommand(IDC_PRINT)); 65 ASSERT_TRUE(browser->RunCommand(IDC_PRINT));
65 66
66 // Make sure there are 2 tabs and print is disabled. 67 // Make sure there are 2 tabs and print is disabled.
67 ASSERT_TRUE(browser->GetTabCount(&tab_count)); 68 ASSERT_TRUE(browser->GetTabCount(&tab_count));
68 ASSERT_EQ(2, tab_count); 69 ASSERT_EQ(2, tab_count);
69 scoped_refptr<TabProxy> tab = browser->GetActiveTab(); 70 scoped_refptr<TabProxy> tab = browser->GetActiveTab();
70 ASSERT_TRUE(tab.get()); 71 ASSERT_TRUE(tab.get());
71 AssertIsPrintPage(tab); 72 AssertIsPrintPage(tab);
72 ASSERT_TRUE(browser->IsMenuCommandEnabled(IDC_PRINT, &enabled)); 73 ASSERT_TRUE(browser->IsMenuCommandEnabled(IDC_PRINT, &enabled));
73 ASSERT_FALSE(enabled); 74 ASSERT_FALSE(enabled);
74 } 75 }
75 76
76 } // namespace 77 } // 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