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

Unified Diff: third_party/WebKit/Source/core/testing/OriginTrialsTestPartial.h

Issue 2340323002: Add Origin Trials Test interface, rather than attaching trials directly to internals. (Closed)
Patch Set: Updates 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/testing/OriginTrialsTestPartial.h
diff --git a/third_party/WebKit/Source/core/testing/OriginTrialsTestPartial.h b/third_party/WebKit/Source/core/testing/OriginTrialsTestPartial.h
new file mode 100644
index 0000000000000000000000000000000000000000..6daaac854336ca967faef03d19e1ededc3915aed
--- /dev/null
+++ b/third_party/WebKit/Source/core/testing/OriginTrialsTestPartial.h
@@ -0,0 +1,28 @@
+// Copyright 2016 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.
+
+#ifndef OriginTrialsTestPartial_h
+#define OriginTrialsTestPartial_h
+
+#include "wtf/Allocator.h"
+
+namespace blink {
+
+class OriginTrialsTest;
+
+// This interface is used for testing that partial interfaces can extend other
+// interfaces at run-time, if the origin trial is enabled.
+class OriginTrialsTestPartial final {
+ STATIC_ONLY(OriginTrialsTestPartial);
+public:
+ static bool normalAttributePartial(OriginTrialsTest&) { return true; }
+ static bool staticAttributePartial() { return true; }
+ static bool methodPartial(OriginTrialsTest&) { return true; }
+ static bool staticMethodPartial() { return true; }
+ static const unsigned kConstantPartial = 2;
+};
+
+} // namespace blink
+
+#endif // OriginTrialsTestPartial_h

Powered by Google App Engine
This is Rietveld 408576698