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

Unified Diff: third_party/WebKit/Source/core/testing/OriginTrialsTest.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/OriginTrialsTest.h
diff --git a/third_party/WebKit/Source/core/testing/OriginTrialsTest.h b/third_party/WebKit/Source/core/testing/OriginTrialsTest.h
new file mode 100644
index 0000000000000000000000000000000000000000..81b491aa62be96991db025db1178f425a73cdd4a
--- /dev/null
+++ b/third_party/WebKit/Source/core/testing/OriginTrialsTest.h
@@ -0,0 +1,45 @@
+// 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 OriginTrialsTest_h
+#define OriginTrialsTest_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class ExceptionState;
+class ScriptState;
+
+// OriginTrialsTest is a very simple interface used for testing
+// origin-trial-enabled features which are attached directly to interfaces at
+// run-time.
+class OriginTrialsTest : public GarbageCollectedFinalized<OriginTrialsTest>, public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static OriginTrialsTest* create()
+ {
+ return new OriginTrialsTest();
+ }
+ virtual ~OriginTrialsTest() = default;
+
+ bool normalAttribute();
+ static bool staticAttribute();
+
+ bool throwingAttribute(ScriptState*, ExceptionState&);
+ bool unconditionalAttribute();
+
+ static const unsigned short kConstant = 1;
+
+ DECLARE_TRACE();
+
+private:
+ OriginTrialsTest() = default;
+
+};
+
+} // namespace blink
+
+#endif // OriginTrialsTest_h
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.idl ('k') | third_party/WebKit/Source/core/testing/OriginTrialsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698