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

Side by Side Diff: chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc

Issue 2332673002: Disable ChromeScreenshotGrabberTest.TakeScreenshot as it's flaky on Chrome OS (Closed)
Patch Set: 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
« 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 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 "chrome/browser/ui/ash/chrome_screenshot_grabber.h" 5 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h"
6 6
7 #include "ash/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 bool screenshot_complete_; 95 bool screenshot_complete_;
96 ScreenshotGrabberObserver::Result screenshot_result_; 96 ScreenshotGrabberObserver::Result screenshot_result_;
97 std::unique_ptr<ChromeScreenshotGrabber> chrome_screenshot_grabber_; 97 std::unique_ptr<ChromeScreenshotGrabber> chrome_screenshot_grabber_;
98 base::FilePath screenshot_path_; 98 base::FilePath screenshot_path_;
99 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; 99 scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
100 100
101 private: 101 private:
102 DISALLOW_COPY_AND_ASSIGN(ChromeScreenshotGrabberTest); 102 DISALLOW_COPY_AND_ASSIGN(ChromeScreenshotGrabberTest);
103 }; 103 };
104 104
105 TEST_F(ChromeScreenshotGrabberTest, TakeScreenshot) { 105 // Flaky on "Linux ChromiumOS Tests (dbg)(1)". See http://crbug.com/645864.
106 TEST_F(ChromeScreenshotGrabberTest, DISABLED_TakeScreenshot) {
106 // Note that within the test framework the LoginState object will always 107 // Note that within the test framework the LoginState object will always
107 // claim that the user did log in. 108 // claim that the user did log in.
108 ASSERT_FALSE(chromeos::LoginState::IsInitialized()); 109 ASSERT_FALSE(chromeos::LoginState::IsInitialized());
109 chromeos::LoginState::Initialize(); 110 chromeos::LoginState::Initialize();
110 chromeos::ScopedUserManagerEnabler scoped_enabler( 111 chromeos::ScopedUserManagerEnabler scoped_enabler(
111 new chromeos::MockUserManager()); 112 new chromeos::MockUserManager());
112 base::ScopedTempDir directory; 113 base::ScopedTempDir directory;
113 ASSERT_TRUE(directory.CreateUniqueTempDir()); 114 ASSERT_TRUE(directory.CreateUniqueTempDir());
114 EXPECT_TRUE(chrome_screenshot_grabber()->CanTakeScreenshot()); 115 EXPECT_TRUE(chrome_screenshot_grabber()->CanTakeScreenshot());
115 116
(...skipping 14 matching lines...) Expand all
130 EXPECT_EQ(ScreenshotGrabberObserver::SCREENSHOT_SUCCESS, screenshot_result_); 131 EXPECT_EQ(ScreenshotGrabberObserver::SCREENSHOT_SUCCESS, screenshot_result_);
131 132
132 if (ScreenshotGrabberObserver::SCREENSHOT_SUCCESS == screenshot_result_) 133 if (ScreenshotGrabberObserver::SCREENSHOT_SUCCESS == screenshot_result_)
133 EXPECT_TRUE(base::PathExists(screenshot_path_)); 134 EXPECT_TRUE(base::PathExists(screenshot_path_));
134 135
135 chromeos::LoginState::Shutdown(); 136 chromeos::LoginState::Shutdown();
136 } 137 }
137 138
138 } // namespace test 139 } // namespace test
139 } // namespace ash 140 } // namespace ash
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