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

Unified Diff: ui/window_snapshot/window_snapshot_mac_unittest.mm

Issue 10821104: Support GrabWindowSnapshot with no g_browser_process (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: SaveScreenSnapshotToDirectory uses ui::GrabWindowSnapshot Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/window_snapshot/window_snapshot_mac_unittest.mm
diff --git a/chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm b/ui/window_snapshot/window_snapshot_mac_unittest.mm
similarity index 81%
rename from chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm
rename to ui/window_snapshot/window_snapshot_mac_unittest.mm
index 14756631797195e3d02666cdd2f866bc889d64bc..98942824211d4d978119f09961ab9db57996445a 100644
--- a/chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm
+++ b/ui/window_snapshot/window_snapshot_mac_unittest.mm
@@ -2,28 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/window_snapshot/window_snapshot.h"
+#include "ui/window_snapshot/window_snapshot.h"
#import <Cocoa/Cocoa.h>
#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/test/base/testing_browser_process.h"
-#include "chrome/test/base/testing_pref_service.h"
#include "testing/platform_test.h"
#include "ui/gfx/rect.h"
-namespace chrome {
+namespace ui {
namespace {
typedef PlatformTest GrabWindowSnapshotTest;
TEST_F(GrabWindowSnapshotTest, TestGrabWindowSnapshot) {
- // GrabWindowSnapshot reads local state, so set it up
- ScopedTestingLocalState local_state(
- static_cast<TestingBrowserProcess*>(g_browser_process));
-
// Launch a test window so we can take a snapshot.
NSRect frame = NSMakeRect(0, 0, 400, 400);
scoped_nsobject<NSWindow> window(
@@ -53,4 +46,4 @@ TEST_F(GrabWindowSnapshotTest, TestGrabWindowSnapshot) {
}
} // namespace
-} // namespace chrome
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698