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

Unified Diff: Source/bindings/tests/idls/TestConstants.idl

Issue 23068032: Add constants and primitive type readonly attributes to Python IDL compiler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix spacing Created 7 years, 4 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: Source/bindings/tests/idls/TestConstants.idl
diff --git a/Source/bindings/v8/ExceptionMessages.h b/Source/bindings/tests/idls/TestConstants.idl
similarity index 59%
copy from Source/bindings/v8/ExceptionMessages.h
copy to Source/bindings/tests/idls/TestConstants.idl
index 8cd532caf681c6620277cdd9003e8d43f1c49048..7f65869d1f1479112cbfe3881054c83b86f3fcb3 100644
--- a/Source/bindings/v8/ExceptionMessages.h
+++ b/Source/bindings/tests/idls/TestConstants.idl
@@ -28,20 +28,27 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ExceptionMessages_h
-#define ExceptionMessages_h
+interface TestConstants {
+ const unsigned short CONST_VALUE_0 = 0;
haraken 2013/08/26 09:33:40 CONST_VALUE_0 => ConstValue0 (according to Blink c
Nils Barth (inactive) 2013/08/27 02:59:27 Constants in IDL files are generally UPPER_CASE. S
+ const unsigned short CONST_VALUE_1 = 1;
+ const unsigned short CONST_VALUE_2 = 2;
+ const unsigned short CONST_VALUE_4 = 4;
+ const unsigned short CONST_VALUE_8 = 8;
+ const short CONST_VALUE_9 = -1;
+ const DOMString CONST_VALUE_10 = "my constant string";
+ const unsigned short CONST_VALUE_11 = 0xffffffff;
+ const unsigned short CONST_VALUE_12 = 0x01;
+ const unsigned short CONST_VALUE_13 = 0X20;
+ const unsigned short CONST_VALUE_14 = 0x1abc;
+ const unsigned short CONST_VALUE_15 = 010;
+ const unsigned short CONST_VALUE_16 = -010;
+ const unsigned short CONST_VALUE_16 = -0x1A;
+ const unsigned short CONST_VALUE_17 = -0X1a;
-#include "wtf/text/WTFString.h"
-
-namespace WebCore {
-
-class ExceptionMessages {
-public:
- static String failedToExecute(const String& method, const String& type, const String& detail = String());
- static String failedToGet(const String& property, const String& type, const String& detail);
- static String failedToSet(const String& property, const String& type, const String& detail);
+ // Extended attributes
+ [Conditional=Condition] const short CONDITIONAL_CONST = 0;
+ [DeprecateAs=Constant] const short DEPRECATED_CONSTANT = 1;
+ [EnabledAtRuntime] const short RUNTIME_ENABLED_CONST = 1;
+ [EnabledAtRuntime=FeatureName] const short FEATURE_ENABLED_CONST = 1;
+ [Reflect=CONST_IMPL] const short CONST_JAVASCRIPT = 1;
haraken 2013/08/26 09:33:40 You can keep these tests in TestObject.idl. We mig
Nils Barth (inactive) 2013/08/27 02:59:27 I need to split them out for Python to test them (
haraken 2013/08/27 03:39:00 That said, until we have a good framework for unit
};
-
-} // namespace WebCore
-
-#endif // ExceptionMessages_h

Powered by Google App Engine
This is Rietveld 408576698