test/com/google/javascript/jscomp/IntegrationTest.java
// Regression test for b/77650996
Regression test for b/77650996
Regression test for b / 77650996
@Test
  public void testPolymer2b() {
    CompilerOptions options = createCompilerOptions();
    options.setPolymerVersion(2);
    options.setWarningLevel(DiagnosticGroups.CHECK_TYPES, CheckLevel.ERROR);
    options.declaredGlobalExternsOnWindow = true;
    options.setLanguageIn(LanguageMode.ECMASCRIPT_2017);
    options.setLanguageOut(LanguageMode.ECMASCRIPT5);
    addPolymer2Externs();
    test(
        options,
        new String[] {
          lines(
              "class DeviceConfigEditor extends Polymer.Element {",
              "",
              "  static get is() {",
              "    return 'device-config-editor';",
              "  }",
              "",
              "  static get properties() {",
              "    return {};",
              "  }",
              "}",
              "",
              "window.customElements.define(DeviceConfigEditor.is, DeviceConfigEditor);"),
          lines(
              "(function() {",
              "  /**",
              "   * @customElement",
              "   * @polymer",
              "   * @memberof Polymer",
              "   * @constructor",
              "   * @implements {Polymer_ElementMixin}",
              "   * @extends {HTMLElement}",
              "   */",
              "  const Element = Polymer.ElementMixin(HTMLElement);",
              "",
              "  /**",
              "   * @constructor",
              "   * @implements {Polymer_ElementMixin}",
              "   * @extends {HTMLElement}",
              "   */",
              "  Polymer.Element = Element;",
              "})();",
              ""),
        },
        (String []) null);
  }
@ Test public void testPolymer2b ( ) { CompilerOptions options = createCompilerOptions ( ) ; options . setPolymerVersion ( 2 ) ; options . setWarningLevel ( DiagnosticGroups . CHECK_TYPES , CheckLevel . ERROR ) ; options . declaredGlobalExternsOnWindow = true ; options . setLanguageIn ( LanguageMode . ECMASCRIPT_2017 ) ; options . setLanguageOut ( LanguageMode . ECMASCRIPT5 ) ; addPolymer2Externs ( ) ; test ( options , new String [ ] { lines ( "class DeviceConfigEditor extends Polymer.Element {" , "" , "  static get is() {" , "    return 'device-config-editor';" , "  }" , "" , "  static get properties() {" , "    return {};" , "  }" , "}" , "" , "window.customElements.define(DeviceConfigEditor.is, DeviceConfigEditor);" ) , lines ( "(function() {" , "  /**" , "   * @customElement" , "   * @polymer" , "   * @memberof Polymer" , "   * @constructor" , "   * @implements {Polymer_ElementMixin}" , "   * @extends {HTMLElement}" , "   */" , "  const Element = Polymer.ElementMixin(HTMLElement);" , "" , "  /**" , "   * @constructor" , "   * @implements {Polymer_ElementMixin}" , "   * @extends {HTMLElement}" , "   */" , "  Polymer.Element = Element;" , "})();" , "" ) , } , ( String [ ] ) null ) ; }
Regression test for b/77650996
Regression test for b / 77650996