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: chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm

Issue 10692110: screenshot disabling policy (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed Android and Mac builds 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: chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm
diff --git a/chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm b/chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm
index 26a9391f47a1bc1351283e54110c586d636bbd90..14756631797195e3d02666cdd2f866bc889d64bc 100644
--- a/chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm
+++ b/chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm
@@ -8,6 +8,9 @@
#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"
@@ -17,6 +20,10 @@ 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(
« no previous file with comments | « chrome/browser/ui/window_snapshot/window_snapshot_mac.mm ('k') | chrome/browser/ui/window_snapshot/window_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698