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

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

Issue 13801010: Leak in ScreenshotTakerTest::TakeScreenshot (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix mem leaks Created 7 years, 8 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 | tools/heapcheck/suppressions.txt » ('j') | 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/screenshot_taker.h" 5 #include "chrome/browser/ui/ash/screenshot_taker.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 Shell::GetPrimaryRootWindow(), gfx::Rect(0, 0, 100, 100)); 99 Shell::GetPrimaryRootWindow(), gfx::Rect(0, 0, 100, 100));
100 100
101 EXPECT_FALSE(screenshot_taker.CanTakeScreenshot()); 101 EXPECT_FALSE(screenshot_taker.CanTakeScreenshot());
102 102
103 Wait(); 103 Wait();
104 104
105 #if defined(OS_CHROMEOS) 105 #if defined(OS_CHROMEOS)
106 // Screenshot notifications on Windows not yet turned on. 106 // Screenshot notifications on Windows not yet turned on.
107 EXPECT_TRUE(g_browser_process->notification_ui_manager()->DoesIdExist( 107 EXPECT_TRUE(g_browser_process->notification_ui_manager()->DoesIdExist(
108 std::string("screenshot_001"))); 108 std::string("screenshot_001")));
109 g_browser_process->notification_ui_manager()->CancelAll();
109 #endif 110 #endif
110 111
111 EXPECT_EQ(ScreenshotTakerObserver::SCREENSHOT_SUCCESS, screenshot_result_); 112 EXPECT_EQ(ScreenshotTakerObserver::SCREENSHOT_SUCCESS, screenshot_result_);
112 113
113 if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_) 114 if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_)
114 EXPECT_TRUE(file_util::PathExists(screenshot_path_)); 115 EXPECT_TRUE(file_util::PathExists(screenshot_path_));
115 } 116 }
116 117
117 } // namespace test 118 } // namespace test
118 } // namespace ash 119 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698