function testCompactQwertyLayoutAsync(testDoneCallback) {
  var testCallback = function() {
    var lowercase = ['qwertyuiop', 'asdfghjkl', 'zxcvbnm!?'];
    var uppercase = ['QWERTYUIOP', 'ASDFGHJKL', 'ZXCVBNM!?'];
    var symbol = ['1234567890', '@#$%&-+()', '\\=*"\':;!?'];
    var more = [
      '~`|', '\u00a3\u00a2\u20ac\u00a5^\u00b0={}',
      '\\\u00a9\u00ae\u2122\u2105[]\u00a1\u00bf'
    ];
    var view = getActiveView();
    assertTrue(!!view, 'Unable to find active view');
    assertEquals('us-compact-qwerty', view.id, 'Expecting compact layout');
    verifyLayout(lowercase);
    mockTap(findKeyById('ShiftLeft'));
    verifyLayout(uppercase);
    // Keyset views for symbol and more on the compact layout are lazy
    // initialized. Wait for view creation to complete before continuing the
    // test.
    onKeysetsReady(['us.compact.symbol', 'us.compact.more'], function() {
      onSwitchToKeyset('us.compact.symbol', function() {
        assertEquals(
            'us-compact-symbol', getActiveView().id, 'Expecting symbol layout');
        verifyLayout(symbol);
        onSwitchToKeyset('us.compact.more', function() {
          assertEquals(
              'us-compact-more', getActiveView().id,
              'Expecting more symbols layout');
          verifyLayout(more);
          onSwitchToKeyset('us.compact.qwerty', function() {
            assertEquals(
                'us-compact-qwerty', getActiveView().id,
                'Expecting compact text layout');
            verifyLayout(lowercase);
            testDoneCallback();
          });
          mockTap(findKey('abc'));
        });
        mockTap(findKey('~[<'));
      });
      mockTap(findKey('?123'));
    });
  };
  var config = {
    keyset: 'us.compact.qwerty',
    languageCode: 'en',
    passwordLayout: 'us',
    name: 'English'
  };
  onKeyboardReady(testCallback, config);
}
/**
 * Validates compact layout for a US QWERTY keyboard.
 */
Validates compact layout for a US QWERTY keyboard.
Validates compact layout for a US QWERTY keyboard .
function testCompactQwertyLayoutAsync(testDoneCallback) {
  var testCallback = function() {
    var lowercase = ['qwertyuiop', 'asdfghjkl', 'zxcvbnm!?'];
    var uppercase = ['QWERTYUIOP', 'ASDFGHJKL', 'ZXCVBNM!?'];
    var symbol = ['1234567890', '@#$%&-+()', '\\=*"\':;!?'];
    var more = [
      '~`|', '\u00a3\u00a2\u20ac\u00a5^\u00b0={}',
      '\\\u00a9\u00ae\u2122\u2105[]\u00a1\u00bf'
    ];
    var view = getActiveView();
    assertTrue(!!view, 'Unable to find active view');
    assertEquals('us-compact-qwerty', view.id, 'Expecting compact layout');
    verifyLayout(lowercase);
    mockTap(findKeyById('ShiftLeft'));
    verifyLayout(uppercase);
    onKeysetsReady(['us.compact.symbol', 'us.compact.more'], function() {
      onSwitchToKeyset('us.compact.symbol', function() {
        assertEquals(
            'us-compact-symbol', getActiveView().id, 'Expecting symbol layout');
        verifyLayout(symbol);
        onSwitchToKeyset('us.compact.more', function() {
          assertEquals(
              'us-compact-more', getActiveView().id,
              'Expecting more symbols layout');
          verifyLayout(more);
          onSwitchToKeyset('us.compact.qwerty', function() {
            assertEquals(
                'us-compact-qwerty', getActiveView().id,
                'Expecting compact text layout');
            verifyLayout(lowercase);
            testDoneCallback();
          });
          mockTap(findKey('abc'));
        });
        mockTap(findKey('~[<'));
      });
      mockTap(findKey('?123'));
    });
  };
  var config = {
    keyset: 'us.compact.qwerty',
    languageCode: 'en',
    passwordLayout: 'us',
    name: 'English'
  };
  onKeyboardReady(testCallback, config);
}
function testCompactQwertyLayoutAsync ( testDoneCallback ) { var testCallback = function ( ) { var lowercase = [ 'qwertyuiop' , 'asdfghjkl' , 'zxcvbnm!?' ] ; var uppercase = [ 'QWERTYUIOP' , 'ASDFGHJKL' , 'ZXCVBNM!?' ] ; var symbol = [ '1234567890' , '@#$%&-+()' , '\\=*"\':;!?' ] ; var more = [ '~`|' , '\u00a3\u00a2\u20ac\u00a5^\u00b0={}' , '\\\u00a9\u00ae\u2122\u2105[]\u00a1\u00bf' ] ; var view = getActiveView ( ) ; assertTrue ( ! ! view , 'Unable to find active view' ) ; assertEquals ( 'us-compact-qwerty' , view . id , 'Expecting compact layout' ) ; verifyLayout ( lowercase ) ; mockTap ( findKeyById ( 'ShiftLeft' ) ) ; verifyLayout ( uppercase ) ; onKeysetsReady ( [ 'us.compact.symbol' , 'us.compact.more' ] , function ( ) { onSwitchToKeyset ( 'us.compact.symbol' , function ( ) { assertEquals ( 'us-compact-symbol' , getActiveView ( ) . id , 'Expecting symbol layout' ) ; verifyLayout ( symbol ) ; onSwitchToKeyset ( 'us.compact.more' , function ( ) { assertEquals ( 'us-compact-more' , getActiveView ( ) . id , 'Expecting more symbols layout' ) ; verifyLayout ( more ) ; onSwitchToKeyset ( 'us.compact.qwerty' , function ( ) { assertEquals ( 'us-compact-qwerty' , getActiveView ( ) . id , 'Expecting compact text layout' ) ; verifyLayout ( lowercase ) ; testDoneCallback ( ) ; } ) ; mockTap ( findKey ( 'abc' ) ) ; } ) ; mockTap ( findKey ( '~[<' ) ) ; } ) ; mockTap ( findKey ( '?123' ) ) ; } ) ; } ; var config = { keyset : 'us.compact.qwerty' , languageCode : 'en' , passwordLayout : 'us' , name : 'English' } ; onKeyboardReady ( testCallback , config ) ; }
Validates compact layout for a US QWERTY keyboard.
Validates compact layout for a US QWERTY keyboard .
// Keyset views for symbol and more on the compact layout are lazy // initialized. Wait for view creation to complete before continuing the // test.