Author: br...@google.com Date: Wed Mar 4 13:18:20 2009 New Revision: 4923
Added: releases/1.6/user/src/com/google/gwt/debug/client/package-info.java releases/1.6/user/test/com/google/gwt/debug/client/DebugInfoTestDisabled.java releases/1.6/user/test/com/google/gwt/user/DebugTestDisabled.gwt.xml Log: This is should be considered atomic with r4922; I had a weird error with my OS X svn GUI client (the adds didn't get included). Added: releases/1.6/user/src/com/google/gwt/debug/client/package-info.java ============================================================================== --- (empty file) +++ releases/1.6/user/src/com/google/gwt/debug/client/package-info.java Wed Mar 4 13:18:20 2009 @@ -0,0 +1,49 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Provides low-level functionality to support the creation of testing and + * diagnostic frameworks. + * + * <p> + * To use the functionality in this package, your GWT module should inherit the + * module <code>com.google.gwt.debug.Debug</code>. The <code>Debug</code> + * module introduces the client property <code>gwt.enableDebugId</code>, + * which controls whether or not this debug code is enabled (and therefore + * included in the final compiled result). It is set to <code>true</code> by + * default, but a module being compiled for production would very likely want to + * set it to <code>false</code> to avoid unnecessary extra code in the final + * compiled output. + * + * <h3>Example</h3> + * A module using this package might look like the following: + * + * <pre> + * <module> + * <inherits name='com.google.gwt.user.User'/> + * + * <!-- Inheriting 'Debug' on the next line makes the features available. --> + * <inherits name='com.google.gwt.debug.Debug'/> + * + * <!-- Disable for production by uncommenting the next line --> + * <!-- <set-property name="gwt.enableDebugId" value="false"/> --> + * + * <entry-point class='your-entry-point-class'/> + * </module> + * </pre> + */ +package com.google.gwt.debug.client; + Added: releases/1.6/user/test/com/google/gwt/debug/client/DebugInfoTestDisabled.java ============================================================================== --- (empty file) +++ releases/1.6/user/test/com/google/gwt/debug/client/DebugInfoTestDisabled.java Wed Mar 4 13:18:20 2009 @@ -0,0 +1,36 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.debug.client; + +import com.google.gwt.junit.client.GWTTestCase; + +/** + * Test Case for {...@link DebugInfo} when <code>gwt.enableDebugId</code> is disabled. + */ +public class DebugInfoTestDisabled extends GWTTestCase { + + @Override + public String getModuleName() { + return "com.google.gwt.user.DebugTestDisabled"; + } + + /** + * Test that the {...@link DebugInfo#isDebugIdEnabled()} method works correctly when debug ids are disabled. + */ + public void testIsDebugIdDisabled() { + assertFalse(DebugInfo.isDebugIdEnabled()); + } +} Added: releases/1.6/user/test/com/google/gwt/user/DebugTestDisabled.gwt.xml ============================================================================== --- (empty file) +++ releases/1.6/user/test/com/google/gwt/user/DebugTestDisabled.gwt.xml Wed Mar 4 13:18:20 2009 @@ -0,0 +1,19 @@ +<!-- --> +<!-- Copyright 2008 Google Inc. --> +<!-- Licensed under the Apache License, Version 2.0 (the "License"); you --> +<!-- may not use this file except in compliance with the License. You may --> +<!-- may obtain a copy of the License at --> +<!-- --> +<!-- http://www.apache.org/licenses/LICENSE-2.0 --> +<!-- --> +<!-- Unless required by applicable law or agreed to in writing, software --> +<!-- distributed under the License is distributed on an "AS IS" BASIS, --> +<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or --> +<!-- implied. License for the specific language governing permissions and --> +<!-- limitations under the License. --> + +<module> + <inherits name="com.google.gwt.user.User"/> + <inherits name="com.google.gwt.user.Debug"/> + <set-property name="gwt.enableDebugId" value="false"/> +</module> --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---