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

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: IDL-backed methods are not static on full interfaces 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..296fbe78528eb0657d3ca974e2ca2d33a5a3fa4e
--- /dev/null
+++ b/third_party/WebKit/Source/core/testing/OriginTrialsTest.h
@@ -0,0 +1,46 @@
+// 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. (This is distinct from the InternalsFrobulate interface, which is a
chasej 2016/09/16 15:17:02 InternalsFrobulate doesn't exist anymore. I gather
iclelland 2016/09/16 15:59:46 Done.
+// partial interface that extends the internals object.)
+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

Powered by Google App Engine
This is Rietveld 408576698