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

Unified Diff: ui/compositor/test/context_factories_for_test.h

Issue 45963003: Move test-only ContextFactory implementations out of production targets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert bad ui/base changes Created 7 years, 2 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/compositor/test/context_factories_for_test.h
diff --git a/ui/compositor/test/context_factories_for_test.h b/ui/compositor/test/context_factories_for_test.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a596c48435daacbc238ecaf225c64f06dfbf243
--- /dev/null
+++ b/ui/compositor/test/context_factories_for_test.h
@@ -0,0 +1,16 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+namespace ui {
+
+// Set up the compositor ContextFactory for a test environment. Unit tests
+// that do not have a full content environment need to call this before
+// initializing the Compositor.
+// Some tests expect pixel output, and they should pass false for
+// |allow_test_contexts|. Most unit tests should pass true. Once this has been
+// called, the caller must call TerminateContextFactoryForTests() to clean up.
+void InitializeContextFactoryForTests(bool allow_test_contexts);
+void TerminateContextFactoryForTests();
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698