text:
palikka
.define(['jQuery'], function () {

  return window[this.id];

})
.define('docReady', ['jQuery'], function ($) {

  return palikka.defer($);

})
.define('winReady', function () {

  return palikka.defer(function (resolve) {
    window.addEventListener("load", resolve);
  });

})
.define('app.bootstrap', ['jQuery', 'docReady'], function () {

  $('#login-btn').on('click', hideModal);

  // In addition to hiding the modal, hide the bottom green search modal
  // and make more space for signup to expand

  $('#signup-btn').on('click', function() {
    hideModal();
    hideSearchModal();
  });

  $('#account-dropdown').on('click', hideModal);
  $('#nav-collapse-btn').on('click', hideModal);

  $('#landing-search-close').on('click', hideSearchModal);
  $('.actions').on('click', hideSearchModal);
  $('#zoomable-image-container').on('click', hideSearchModal);

  function hideModal() {
    $('.modal').each(function() {
      if ($(this).hasClass('in')) {
        $(this).modal('hide');
      }
    });
  }

  // Close the search modal function whenever called

  function hideSearchModal() {
    $('#landing-search').fadeOut();
  }

  $('.modal').on('shown.bs.modal', function() {
    $(this).find('[autofocus]').focus();
  });

  $('.modal.fade').each(function() {
    if ($(this).hasClass('error')) {
      $(this).modal('show');
    }
  });

})
.define('app.search-filter', ['jQuery', 'docReady'], function () {
  var $accordion = $('#accordion');
  var $filterLink = $('.list-group__link');
  var $searchTerm = $accordion.attr('data-search');
  var authors = [];
  var dates = [];
  var $deleteBtns = $('.search-filter__delete');
  var searchParams = '?search=' + $searchTerm;

  $('.search-filter__text').each(function() {
    authors.push($(this).attr('data-author-facet'));
    dates.push($(this).attr('data-date-facet'));
  });

  $filterLink.on('click', function() {
    var authorParam = $(this).attr('data-author-value');
    var dateParam = $(this).attr('data-date-value');
    if (typeof authorParam != 'undefined') {
      searchParams += '&author[]=' + authorParam;
    }
    if (typeof dateParam != 'undefined') {
      searchParams += '&main_date_str[]=' + dateParam;
    }
    for (var i = 0; i < authors.length; i++) {
      if (typeof authors[i] != 'undefined') {
        searchParams += '&author[]=' + authors[i];
      }
    }
    for (var i = 0; i < dates.length; i++) {
      if (typeof dates[i] != 'undefined') {
        searchParams += '&main_date_str[]=' + dates[i];
      }
    }
    window.open(searchParams, '_self');
  });

  $deleteBtns.on('click', function() {
    searchParams = '?search=' + $searchTerm;
    authors.splice(authors.indexOf($(this).attr('data-author-facet')), 1);
    dates.splice(dates.indexOf($(this).attr('data-date-facet')), 1);
    for (var i = 0; i < authors.length; i++) {
      if (typeof authors[i] != 'undefined') {
        searchParams += '&author[]=' + authors[i];
      }
    }
    for (var i = 0; i < dates.length; i++) {
      if (typeof dates[i] != 'undefined') {
        searchParams += '&main_date_str[]=' + dates[i];
      }
    }
    window.open(searchParams, '_self');
  });

})
.define('app.grid', ['jQuery', 'docReady', 'winReady'], function () {

  var $window = $(window);
  var $container = $('.flex-images');
  var $infiniteScroll = $('.flex-images.infinite-scroll');
  var $itemGroup = $('.grid__group');
  var $items = $('.flex-images .item');
  var $maxPages = $('.grid').attr('data-pages');
  var loadMoreButton = $('#btn-load-more');
  var page = 1;
  var loadedImageCount = 0;
  var imageCount = 40;
  var fetchingMoreImages = false;
  var queryParameters = {};
  var queryString = location.search.substring(1);

  gridInit();

  function gridInit() {
    $('.grid__group').each(function () {
      $('.flex-images .item').each(function () {
        var w = $(this).find('.flex-img').width();
        var h = $(this).find('.flex-img').height();
        if (! $(this).attr('data-w')) {
          $(this).attr('data-w', w);
          $(this).attr('data-h', h);
        }
      });
      $(this).removeClass('invisible');
    });
    if ($itemGroup.attr('data-grid-type') == 'collection') {
      $container.flexImages({
        rowHeight: 222
      });
    }
    else if ($window.width() < 450) {
      $container.flexImages({
        rowHeight: 180
      });
    }
    else {
      $container.flexImages({
        rowHeight: 310
      });
    }
    scrollToLastItem();
  }

  function scrollToLastItem() {

    var itemId = localStorage.getItem("last_record_browsed") || "_";
    // Remove white spaces in case of multiple search keywords
    itemId = itemId.replace(' ', '_');
    var $item = $("[name="+itemId+"]");
    if($item.length) {
      $('html, body').animate({
        scrollTop: $item.offset().top
      }, 1000);
      localStorage.setItem("last_record_browsed", "");
    }
  }

  // Make ajax calls to the api server on button click

  loadMoreButton.on('click', function() {
    fetchingMoreImages = true;
    var page = parseInt($(this).data("current-page")) || 0;
    ajaxGetPageImages(page+1);
    // if ( !$(this).has('.icon-spinner') ) {
    //   $(this).append($(''));
    // }
    $(this).append($(''));
  });

  function ajaxGetPageImages(page) {
    $.get({
      url: '',
      data: 'loadallpages=0&page=' + page,
      success: function(data) {
        var re = /([^&=]+)=([^&]*)/g, m;
        while (m = re.exec(queryString)) {
          queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
        }
        queryParameters['page'] = page;

        window.history.replaceState("", "", "?"+$.param(queryParameters));
        $container.append(data);
        $container.imagesLoaded().progress(onProgress);
        imageCount = $container.find('img').length;
        loadedImageCount = 0;
        fetchingMoreImages = false;
        loadMoreButton.find('.icon-spinner').remove();
        loadMoreButton.data({'current-page': page})
      }
    })
    .fail(function() {
      loadMoreButton.addClass('disabled').find('.icon-spinner').remove();
      var buttonText = loadMoreButton.text();

      if (buttonText === "Lataa lisää... ") {
        loadMoreButton.text('Ei tuloksia');
      }

      else if (buttonText === "Load more...") {
        loadMoreButton.text('No more results');
      }

      else {
        loadMoreButton.text('Inga fler resultat');
      }
      queryParameters['page'] = page;

      window.history.replaceState("", "", "?"+$.param(queryParameters));
      $container.append(data);
      $container.imagesLoaded().progress(onProgress);
      imageCount = $container.find('img').length;
      loadedImageCount = 0;
      fetchingMoreImages = false;
      loadMoreButton.find('.icon-spinner').remove();
      loadMoreButton.data({'current-page': page})
    })
    .fail(function(jqXHR, textStatus){
      loadMoreButton.attr("disabled", true);
      // translated button text is given in search.html template
      loadMoreButton.html(window.NO_MORE_SEARCH_RESULTS_TEXT);
    });
  }

  function onProgress(imgLoad, image) {
    loadedImageCount++;
    if (loadedImageCount == imageCount) {
      gridInit();
    }
  }
})
.define('app.pop-over', ['jQuery', 'docReady'], function () {

  $("#popover-cart").popover({
    html: true,
    toggle: 'popover',
    container: '.actions',
    placement: 'top',
    trigger: 'click',
    html: true,
    content: function() {
      return $('#popover-cart-content').html();
    }
  });

  $("#popover-buy").popover({
    html: true,
    toggle: 'popover',
    container: '.actions',
    placement: 'top',
    trigger: 'click',
    html: true,
    content: function() {
      return $('#popover-buy-content').html();
    }
  });

  // scroll down to detail section when info button clicked
  $("#popover-info").click(function(){
    $("html, body").animate({
      scrollTop: $("#detail-section").offset().top
    }, 500);
  })

  var clipboard = new Clipboard('.popover-list__btn--share');
  $("#popover-share").popover({
    html: true,
    toggle: 'popover',
    container: '.actions',
    placement: 'top',
    trigger: 'click',
    html: true,
    content: function() {
      return $('#popover-share-content').html();
    }
  });

  $("#popover-add").popover({
    html: true,
    toggle: 'popover',
    container: '.actions',
    placement: 'top',
    trigger: 'click',
    html: true,
    content: function() {
      return $('#popover-add-content').html();
    }
  });

  $('.has-popover').on('click', function() {
      var clickedButton = this;
      $('.has-popover').each(function(current) {
        if ($(this)[0] !== clickedButton) {
          $(this).popover('hide').tooltip('hide');
        }
        else {
          $(this).popover('toggle');
        }
      });
      $(this).tooltip('hide');
  });

  $('.actions__btn').each(function(){
    $(this).tooltip({
      title: $(this).attr("tooltip-title")
    })
  });
})
.define('app.fav', ['jQuery', 'docReady'], function () {

  favBtn = '.grid__fav';
  navFavBtn = '.nav__fav';

  $(document).on('click', favBtn, function() {
    postFav($(this), favBtn);
  });

  $(document).on('click', navFavBtn, function() {
    console.log('nav fav button clicked');
    postFav($(this), navFavBtn);
  });

  function postFav($this, favClass) {
    if (! $this.hasClass('active')) {
      $.post('/ajax/record/fav/', {
        action: 'add',
        record_id: $this.attr('data-record-id')
      })
      .done(function(){
        $(favClass + '[data-record-id="' + $this.attr('data-record-id') + '"]').addClass('active');
      });
    }
    else {
      $.post('/ajax/record/fav/', {
        action: 'remove',
        record_id: $this.attr('data-record-id')
      })
      .done(function(){
        $(favClass + '[data-record-id="' + $this.attr('data-record-id') + '"]').removeClass('active');
      });
    }
  }

})
.define('app.crop', ['jQuery', 'docReady'], function () {

  var $btn = $('.popover-list__btn');
  var $collection;
  var Cropper = window.Cropper;
  var submit;
  var target;
  var url;
  var image;
  var cropper;
  var aspectRatio;
  var recordId;
  var options = {
    aspectRatio: '',
    checkCrossOrigin: false,
    checkOrientation: false,
    movable: false,
    rotatable: false,
    scalable: false,
    zoomable: false,
    autoCropArea: 1,
    viewMode: 1
  }

  function cropperInit() {
    cropper = new Cropper(image, options);
  }

  $(document).ready(function() {

    // if order preview image found in document, initialize a cropper
    var orderPreviewImage = document.getElementById('order-preview__image');
    if (orderPreviewImage) {

      function productSettingsExistInForm () {
        if ($crop_x.val() === "None" || $crop_x.val() === "") return false;
        if ($crop_y.val() === "None" || $crop_y.val() === "") return false;
        if ($crop_width.val() === "None" || $crop_width.val() === "") return false;
        if ($crop_height.val() === "None" || $crop_height.val() === "") return false;
        return true;
      }

      function setCropCoordinatesToFormFields () {
        var imageData = cropper.getImageData();
        var boxData = cropper.getCropBoxData();
        $crop_x.val(boxData.left);
        $crop_y.val(boxData.top);
        $crop_width.val(boxData.width);
        $crop_height.val(boxData.height);
        $original_width.val(imageData.width);
        $original_height.val(imageData.height);
      }

      function calculateNewPrice () {
        var amount = $('input[id="id_order-product-form-amount"]').val();
        var unitPrice = $('input[name=product]:checked').attr('data-price');
        var newPrice = parseFloat(unitPrice) * parseInt(amount);
        $('#price-indicator').text(typeof newPrice !== 'number' || isNaN(newPrice) ? '?' : newPrice.toFixed(2));
        console.log('calculate new price for UI');
      }

      function isEmpty(obj) {
        for (var key in obj) {
          if (obj.hasOwnProperty(key)) return false;
        }
        return true;
      }

      function calculatePPI () {
        var $ppiIndicator = $('#ppi-indicator');
        var fullX = $ppiIndicator.attr('data-full-x');
        var fullY = $ppiIndicator.attr('data-full-y');
        $inputChecked = $('input[name=product]:checked');
        var xInches = parseInt($inputChecked.attr('data-xsize')) / 25.4; // mm to in
        var yInches = parseInt($inputChecked.attr('data-ysize')) / 25.4;

        var imageArea = cropper.getImageData();
        console.log(imageArea)
        var cropArea = cropper.getCropBoxData();
        console.log(cropArea)
        var widthMultiplier = parseFloat(fullX) / imageArea.width;
        var heightMultiplier = parseFloat(fullY) / imageArea.height;

        var finalWidth = cropArea.width * widthMultiplier;
        var finalHeight = cropArea.height * heightMultiplier;

        var $PPIBox = $('#ppi-box');
        var PPI = Math.sqrt(Math.pow(finalWidth, 2) + Math.pow(finalHeight, 2)) /
          Math.sqrt(Math.pow(xInches, 2) + Math.pow(yInches, 2));

        var language = $ppiIndicator.attr('data-language');
        var PPI_OK = 'OK'
        var PPI_NOT_OK = {
          'fi': 'Liian alhainen. Rajaa alue suuremmaksi!',
          'en': 'Too low. Increase the crop area!',
          'sv': 'För låg. Öka storleken på den beskärda bilden!'
        }

        if (isNaN(PPI)) {
          $('#ppi-indicator').text('?');
        } else {
          if (PPI < 120) {
            if (!$PPIBox.hasClass('alert-danger')) $PPIBox.addClass('alert-danger');

            if (language && PPI_NOT_OK.hasOwnProperty(language)) $ppiIndicator.text(PPI_NOT_OK[language]);
            else $('#ppi-indicator').text(PPI_NOT_OK['fi']);

          }
          if (PPI >= 120) {
            if ($PPIBox.hasClass('alert-danger')) $PPIBox.removeClass('alert-danger');
            $ppiIndicator.text(PPI_OK);
          }
        }

      }
      var $crop_x = $("input[name='crop_x']");
      var $crop_y = $("input[name='crop_y']");
      var $crop_width = $("input[name='crop_width']");
      var $crop_height = $("input[name='crop_height']");
      var $original_width = $("input[name='original_width']");
      var $original_height = $("input[name='original_height']");
      var $inputChecked = $('input[name=product]:checked');

      url = orderPreviewImage.getAttribute('data-img-url');
      image = orderPreviewImage;
      image.src=url;
      var aspectLandscape = 1.414;
      var aspectPortrait = 0.707;

      var savedAspectRatio = $inputChecked.attr('data-xsize') / $inputChecked.attr('data-ysize');
      options.aspectRatio = savedAspectRatio ? savedAspectRatio: aspectLandscape;
      cropperInit();

      // whenever print product type is reselected, change form values and show in UI
      $('.ordertype').click(function() {
          console.log(this);
          options.aspectRatio = this.getAttribute('data-xsize') / this.getAttribute('data-ysize');
          console.log('aspect ratio changed');
          // Restart
          cropper.destroy();
          cropper = new Cropper(image, options);

          calculateNewPrice();
          calculatePPI();
          //setCropCoordinatesToFormFields();
      });

      // why not work LöL
      var amountField = document.querySelector('#id_order-product-form-amount');
      amountField.addEventListener('input', function() {
        calculateNewPrice();
      });

     $(document).on('cropmove', function (e) {
        console.log('cropping');
        setCropCoordinatesToFormFields();
        calculatePPI();
        /* Prevent to start cropping, moving, etc if necessary
        if (e.action === 'crop') {
          e.preventDefault();
        }  */
      });

      window.onresize = function () {
        console.log('canvas area resizing...');
        var imageData = cropper.getImageData();
        var boxData = cropper.getCropBoxData();
        setCropCoordinatesToFormFields();
        /* Prevent to start cropping, moving, etc if necessary
        if (e.action === 'crop') {
          e.preventDefault();
        } */
      };

      // need to wait until cropper is completely built to calculate PPI value and set cropper coordinates
      // to match order specs
      $(document).on('ready', function(e) {

        if (productSettingsExistInForm()) {
          console.log('settings exist');
          cropper.setCropBoxData({
            left: parseInt($crop_x.val()),
            top: parseInt($crop_y.val()),
            width: parseInt($crop_width.val()),
            height: parseInt($crop_height.val())
          });
          setCropCoordinatesToFormFields();
        }
        if (!productSettingsExistInForm()) {
          console.log('settings dont exist');
          setCropCoordinatesToFormFields();
        }

        calculatePPI();
      });

    }

    // Initialize tooltips
    $('[data-toggle="tooltip"]').tooltip({
      container: 'body'
    });

  });

  // modal related cropper stuff begins here

  $('.my-modal--crop').on('shown.bs.modal', function() {
    if (image.complete && image.naturalHeight !== 0) {
      cropperInit();
    }
    else {
      image.addEventListener('load', cropperInit);
    }
  });
  $('.my-modal--crop').on('hidden.bs.modal', function() {
    cropper.destroy();
  });

  $(document).on('click', '.popover-list__btn--crop', function() {
    target = document.getElementById(this.getAttribute('data-target').substring(1));
    url = this.getAttribute('data-img-url');
    recordId = this.getAttribute('data-record-id')
    image = target.getElementsByClassName('crop__image')[0];
    image.src = url;
  });

  $('.crop__submit').on('click', function() {
    var $action = $(this).val();
    if ($action == 'add') {
      $action = $('input[name=collection]:checked').attr('data-action');
    }
    var $collectionTitle = $('#add-collection-input').val();
    var $collectionId = $('input[name=collection]:checked').val();
    var imageData = cropper.getImageData();
    var boxData = cropper.getCropBoxData();
    $.post('/ajax/crop/', {
      action: $action,
      x: boxData.left,
      y: boxData.top,
      width: boxData.width,
      height: boxData.height,
      original_width: imageData.width,
      original_height: imageData.height,
      collection_id: $collectionId,
      collection_title: $collectionTitle,
      record_id: recordId,
    })
    .done(function(data){
      if (data.url) {
        // creates anchor element and forces download
        var a = document.createElement('a');
        a.href = window.location.origin + data.url;
        a.id = 'crop-dl';
        a.download = data.url;
        a.style.display = 'none';
        document.body.appendChild(a);
        a.click();
        $('#crop-dl').remove();
        $('.my-modal--crop').modal('hide');
      }
      else {
        location.reload();
      }
    })
    .fail(function(data){
      alert('Crop failed.');
    });
  });

  $(document).on('change', '.docs-toggles', function(event) {
    var e = event || window.event;
    var target = e.target || e.srcElement;
    var cropBoxData;
    var canvasData;
    var isCheckbox;
    var isRadio;

    if (!cropper) {
      return;
    }

    if (target.tagName.toLowerCase() === 'label') {
      target = target.querySelector('input');
    }

    isCheckbox = target.type === 'checkbox';
    isRadio = target.type === 'radio';

    if (isCheckbox || isRadio) {
      if (isCheckbox) {
        options[target.name] = target.checked;
        cropBoxData = cropper.getCropBoxData();
        canvasData = cropper.getCanvasData();

        options.ready = function () {
          cropper.setCropBoxData(cropBoxData).setCanvasData(canvasData);
        };
      } else {
        options[target.name] = target.value;
        options.ready = function () {
        };
      }

      // Restart
      cropper.destroy();
      cropper = new Cropper(image, options);
    }
  });

})
.define('app.editTitle', ['jQuery', 'docReady'], function () {

  $editBtn = $('#edit-title-btn');
  $editCancel = $('#edit-title-cancel');
  $removeItem = $('.grid__item-remove');
  $title = $('.banner__title');
  $description = $('.banner__description');
  $collectionForm = $('.banner__form');

  $removeItem.on('click', function() {
    var confirmRemove = confirm($(this).attr('data-confirm'));
    var $recordId = $(this).attr('data-record-id');
    if (confirmRemove) {
      $.post('', {
        action: 'remove-record',
        record_id: $recordId
      })
      .done(function() {
        location.reload();
      });
    }
  });

  $editCancel.on('click', function() {
    $title.toggle();
    $description.toggle();
    $collectionForm.toggle();
    $removeItem.toggle();
  });

  $editBtn.on('click', function() {
    $title.toggle();
    $description.toggle();
    $collectionForm.toggle();
    $removeItem.toggle();
  });

})
.define('app.zoom', ['jQuery', 'docReady'], function () {

  var img = document.getElementById('zoomable-image');

  if (!img) {
    return
  }

  if (img.complete && img.naturalHeight !== 0) {
    handleImageLoaded.call(img);
  }
  else {
    img.addEventListener('load', handleImageLoaded);
  }

  function handleImageLoaded() {
    var w = this.naturalWidth;
    var h = this.naturalHeight;
    var ar = w / h;
    var url = this.src;
    var fullResUrl = this.getAttribute('data-full-res-url');

    if (window.innerWidth > window.innerHeight) {
      if (w > h) {
        w = window.innerWidth * ar;
        h = w / ar;
      }
      else {
        h = window.innerHeight / ar * 1.2;
        w = h * ar;
      }
    }
    else {
    }
    zoomInit(w, h, url, fullResUrl);
  }

  function zoomInit(w, h, url, fullResUrl) {
    // debugger;

    var initialZoom = 3;

    var imageContainer = L.map('zoomable-image-container', {
      center: [500, 500],
      minZoom: 1,
      maxZoom: 5,
      zoom: initialZoom,
      crs: L.CRS.Simple,
      maxBoundsViscosity: 1,
      scrollWheelZoom: false,
      zoomControl: true
    });
    var bottomLeft = imageContainer.unproject([0, h], imageContainer.getMaxZoom()-1);
    var topRight = imageContainer.unproject([w, 0], imageContainer.getMaxZoom()-1);
    var bounds = new L.LatLngBounds(bottomLeft, topRight);
    var imagelayer = L.imageOverlay(url, bounds).addTo(imageContainer);
    var fullResLoaded = false;
    var $zoomInBtn = $('#zoom-in-btn');
    var $zoomOutBtn = $('#zoom-out-btn');
    var $image = $('#zoomable-image-container');
    var zoomable = true;
    var clickedAt;

    imageContainer.setMaxBounds(bounds);

    imageContainer.on('zoomstart', function() {
      if (!fullResLoaded) {
        setTimeout(function() {
          L.imageOverlay(fullResUrl, bounds).addTo(imageContainer);
          img.addEventListener('load', function() {
            imagelayer.remove();
          });
          fullResLoaded = true;
        }, 300);
      }
    });

    // image can be zoomed with buttons and with left and right mouse clicks. image can be moved by click-dragginw with mouse
    $zoomInBtn.on('click', function() {
      imageContainer.zoomIn();
    });
    $zoomOutBtn.on('click', function() {
      imageContainer.zoomOut();
    });

    $image.on('mousedown', function(e) {

      clickedAt = new Date().getTime();
    });
    // on mouseup, zoom if permitted
   $image.on('mouseup', function(e) {

      var mouseUpAt = new Date().getTime();
      if (zoomable && mouseUpAt - clickedAt < 300) {
        switch(e.which) {
          case 1:
            console.log('left mouse button');
            imageContainer.zoomIn();
            break;
          case 3:
            imageContainer.zoomOut();
            console.log('right mouse button');
            break;
          default:
            break;
        }
      }
    });

   imageContainer.on('movestart', function() {
      zoomable = false;
   });
   imageContainer.on('moveend', function() {
      zoomable = true;
   });

    // prevent right click menu
    $image.on('contextmenu', function(e) {
      e.preventDefault();
    });

  }
});


text:
//
//  Generated by the J2ObjC translator.  DO NOT EDIT!
//  source: android/libcore/luni/src/main/java/java/util/IdentityHashMap.java
//

#ifndef _JavaUtilIdentityHashMap_H_
#define _JavaUtilIdentityHashMap_H_

#include "J2ObjC_header.h"
#include "java/io/Serializable.h"
#include "java/util/AbstractCollection.h"
#include "java/util/AbstractMap.h"
#include "java/util/AbstractSet.h"
#include "java/util/Iterator.h"
#include "java/util/Map.h"
#include "java/util/MapEntry.h"

@class IOSObjectArray;
@protocol JavaUtilCollection;
@protocol JavaUtilSet;

/*!
 @brief IdentityHashMap is a variant on HashMap which tests equality by reference
 instead of equality by value.
 Basically, keys and values are compared for
 equality by checking if their references are equal rather than by calling the
 "equals" function.

 Note: This class intentionally violates the general contract of Map
 's on comparing objects by their equals method.

 IdentityHashMap uses open addressing (linear probing in particular) for
 collision resolution. This is different from HashMap which uses Chaining.

 Like HashMap, IdentityHashMap is not thread safe, so access by multiple
 threads must be synchronized by an external mechanism such as
 Collections.synchronizedMap.
 @since 1.4
 */
@interface JavaUtilIdentityHashMap : JavaUtilAbstractMap < JavaUtilMap, JavaIoSerializable, NSCopying > {
 @public
  IOSObjectArray *elementData_;
  jint size_;
  jint threshold_;
  jint modCount_;
}

#pragma mark Public

/*!
 @brief Creates an IdentityHashMap with default expected maximum size.
 */
- (instancetype)init;

/*!
 @brief Creates an IdentityHashMap with the specified maximum size parameter.
 @param maxSize
 The estimated maximum number of entries that will be put in
 this map.
 */
- (instancetype)initWithInt:(jint)maxSize;

/*!
 @brief Creates an IdentityHashMap using the given map as initial values.
 @param map
 A map of (key,value) pairs to copy into the IdentityHashMap.
 */
- (instancetype)initWithJavaUtilMap:(id<JavaUtilMap>)map;

/*!
 @brief Removes all elements from this map, leaving it empty.
 */
- (void)clear;

/*!
 @brief Returns a new IdentityHashMap with the same mappings and size as this
 one.
 @return a shallow copy of this IdentityHashMap.
 */
- (id)clone;

/*!
 @brief Returns whether this map contains the specified key.
 @param key
 the key to search for.
 @return true if this map contains the specified key,
 false otherwise.
 */
- (jboolean)containsKeyWithId:(id)key;

/*!
 @brief Returns whether this map contains the specified value.
 @param value
 the value to search for.
 @return true if this map contains the specified value,
 false otherwise.
 */
- (jboolean)containsValueWithId:(id)value;

/*!
 @brief Returns a set containing all of the mappings in this map.
 Each mapping is
 an instance of Map.Entry. As the set is backed by this map,
 changes in one will be reflected in the other.
 @return a set of the mappings.
 */
- (id<JavaUtilSet>)entrySet;

/*!
 @brief Compares this map with other objects.
 This map is equal to another map is
 it represents the same set of mappings. With this map, two mappings are
 the same if both the key and the value are equal by reference. When
 compared with a map that is not an IdentityHashMap, the equals method is
 neither necessarily symmetric (a.equals(b) implies b.equals(a)) nor
 transitive (a.equals(b) and b.equals(c) implies a.equals(c)).
 @param object
 the object to compare to.
 @return whether the argument object is equal to this object.
 */
- (jboolean)isEqual:(id)object;

/*!
 @brief Returns the value of the mapping with the specified key.
 @param key
 the key.
 @return the value of the mapping with the specified key.
 */
- (id)getWithId:(id)key;

/*!
 @brief Returns whether this IdentityHashMap has no elements.
 @return true if this IdentityHashMap has no elements,
 false otherwise.
 */
- (jboolean)isEmpty;

/*!
 @brief Returns a set of the keys contained in this map.
 The set is backed by
 this map so changes to one are reflected by the other. The set does not
 support adding.
 @return a set of the keys.
 */
- (id<JavaUtilSet>)keySet;

/*!
 @brief Maps the specified key to the specified value.
 @param key
 the key.
 @param value
 the value.
 @return the value of any previous mapping with the specified key or
 null if there was no such mapping.
 */
- (id)putWithId:(id)key
         withId:(id)value;

/*!
 @brief Copies all the mappings in the specified map to this map.
 These mappings
 will replace all mappings that this map had for any of the keys currently
 in the given map.
 @param map
 the map to copy mappings from.
 @throws NullPointerException
 if map is null.
 */
- (void)putAllWithJavaUtilMap:(id<JavaUtilMap>)map;

/*!
 @brief Removes the mapping with the specified key from this map.
 @param key
 the key of the mapping to remove.
 @return the value of the removed mapping, or null if no mapping
 for the specified key was found.
 */
- (id)removeWithId:(id)key;

/*!
 @brief Returns the number of mappings in this IdentityHashMap.
 @return the number of mappings in this IdentityHashMap.
 */
- (jint)size;

/*!
 @brief Returns a collection of the values contained in this map.
 The collection
 is backed by this map so changes to one are reflected by the other. The
 collection supports remove, removeAll, retainAll and clear operations,
 and it does not support add or addAll operations.

 This method returns a collection which is the subclass of
 AbstractCollection. The iterator method of this subclass returns a
 "wrapper object" over the iterator of map's entrySet(). The size
 method wraps the map's size method and the contains method wraps
 the map's containsValue method.

 The collection is created when this method is called for the first time
 and returned in response to all subsequent calls. This method may return
 different collections when multiple concurrent calls occur, since no
 synchronization is performed.
 @return a collection of the values contained in this map.
 */
- (id<JavaUtilCollection>)values;

@end

J2OBJC_STATIC_INIT(JavaUtilIdentityHashMap)

J2OBJC_FIELD_SETTER(JavaUtilIdentityHashMap, elementData_, IOSObjectArray *)

FOUNDATION_EXPORT void JavaUtilIdentityHashMap_init(JavaUtilIdentityHashMap *self);

FOUNDATION_EXPORT JavaUtilIdentityHashMap *new_JavaUtilIdentityHashMap_init() NS_RETURNS_RETAINED;

FOUNDATION_EXPORT void JavaUtilIdentityHashMap_initWithInt_(JavaUtilIdentityHashMap *self, jint maxSize);

FOUNDATION_EXPORT JavaUtilIdentityHashMap *new_JavaUtilIdentityHashMap_initWithInt_(jint maxSize) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT void JavaUtilIdentityHashMap_initWithJavaUtilMap_(JavaUtilIdentityHashMap *self, id<JavaUtilMap> map);

FOUNDATION_EXPORT JavaUtilIdentityHashMap *new_JavaUtilIdentityHashMap_initWithJavaUtilMap_(id<JavaUtilMap> map) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaUtilIdentityHashMap)

@interface JavaUtilIdentityHashMap_IdentityHashMapEntry : JavaUtilMapEntry

#pragma mark Public

- (id)clone;

- (jboolean)isEqual:(id)object;

- (NSUInteger)hash;

- (id)setValueWithId:(id)object;

- (NSString *)description;

#pragma mark Package-Private

- (instancetype)initWithJavaUtilIdentityHashMap:(JavaUtilIdentityHashMap *)map
                                         withId:(id)theKey
                                         withId:(id)theValue;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaUtilIdentityHashMap_IdentityHashMapEntry)

FOUNDATION_EXPORT void JavaUtilIdentityHashMap_IdentityHashMapEntry_initWithJavaUtilIdentityHashMap_withId_withId_(JavaUtilIdentityHashMap_IdentityHashMapEntry *self, JavaUtilIdentityHashMap *map, id theKey, id theValue);

FOUNDATION_EXPORT JavaUtilIdentityHashMap_IdentityHashMapEntry *new_JavaUtilIdentityHashMap_IdentityHashMapEntry_initWithJavaUtilIdentityHashMap_withId_withId_(JavaUtilIdentityHashMap *map, id theKey, id theValue) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaUtilIdentityHashMap_IdentityHashMapEntry)

@interface JavaUtilIdentityHashMap_IdentityHashMapIterator : NSObject < JavaUtilIterator > {
 @public
  JavaUtilIdentityHashMap *associatedMap_;
  jint expectedModCount_;
  id<JavaUtilMapEntry_Type> type_;
  jboolean canRemove_;
}

#pragma mark Public

- (jboolean)hasNext;

- (id)next;

- (void)remove;

#pragma mark Package-Private

- (instancetype)initWithJavaUtilMapEntry_Type:(id<JavaUtilMapEntry_Type>)value
                  withJavaUtilIdentityHashMap:(JavaUtilIdentityHashMap *)hm;

- (void)checkConcurrentMod;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaUtilIdentityHashMap_IdentityHashMapIterator)

J2OBJC_FIELD_SETTER(JavaUtilIdentityHashMap_IdentityHashMapIterator, associatedMap_, JavaUtilIdentityHashMap *)
J2OBJC_FIELD_SETTER(JavaUtilIdentityHashMap_IdentityHashMapIterator, type_, id<JavaUtilMapEntry_Type>)

FOUNDATION_EXPORT void JavaUtilIdentityHashMap_IdentityHashMapIterator_initWithJavaUtilMapEntry_Type_withJavaUtilIdentityHashMap_(JavaUtilIdentityHashMap_IdentityHashMapIterator *self, id<JavaUtilMapEntry_Type> value, JavaUtilIdentityHashMap *hm);

FOUNDATION_EXPORT JavaUtilIdentityHashMap_IdentityHashMapIterator *new_JavaUtilIdentityHashMap_IdentityHashMapIterator_initWithJavaUtilMapEntry_Type_withJavaUtilIdentityHashMap_(id<JavaUtilMapEntry_Type> value, JavaUtilIdentityHashMap *hm) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaUtilIdentityHashMap_IdentityHashMapIterator)

@interface JavaUtilIdentityHashMap_IdentityHashMapEntrySet : JavaUtilAbstractSet

#pragma mark Public

- (instancetype)initWithJavaUtilIdentityHashMap:(JavaUtilIdentityHashMap *)hm;

- (void)clear;

- (jboolean)containsWithId:(id)object;

- (id<JavaUtilIterator>)iterator;

- (jboolean)removeWithId:(id)object;

- (jint)size;

#pragma mark Package-Private

- (JavaUtilIdentityHashMap *)hashMap;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaUtilIdentityHashMap_IdentityHashMapEntrySet)

FOUNDATION_EXPORT void JavaUtilIdentityHashMap_IdentityHashMapEntrySet_initWithJavaUtilIdentityHashMap_(JavaUtilIdentityHashMap_IdentityHashMapEntrySet *self, JavaUtilIdentityHashMap *hm);

FOUNDATION_EXPORT JavaUtilIdentityHashMap_IdentityHashMapEntrySet *new_JavaUtilIdentityHashMap_IdentityHashMapEntrySet_initWithJavaUtilIdentityHashMap_(JavaUtilIdentityHashMap *hm) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaUtilIdentityHashMap_IdentityHashMapEntrySet)

@interface JavaUtilIdentityHashMap_KeySet : JavaUtilAbstractSet

#pragma mark Public

- (void)clear;

- (jboolean)containsWithId:(id)object;

- (id<JavaUtilIterator>)iterator;

- (jboolean)removeWithId:(id)key;

- (jint)size;

#pragma mark Package-Private

- (instancetype)initWithJavaUtilIdentityHashMap:(JavaUtilIdentityHashMap *)outer$;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaUtilIdentityHashMap_KeySet)

FOUNDATION_EXPORT void JavaUtilIdentityHashMap_KeySet_initWithJavaUtilIdentityHashMap_(JavaUtilIdentityHashMap_KeySet *self, JavaUtilIdentityHashMap *outer$);

FOUNDATION_EXPORT JavaUtilIdentityHashMap_KeySet *new_JavaUtilIdentityHashMap_KeySet_initWithJavaUtilIdentityHashMap_(JavaUtilIdentityHashMap *outer$) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaUtilIdentityHashMap_KeySet)

@interface JavaUtilIdentityHashMap_ValuesCollection : JavaUtilAbstractCollection

#pragma mark Public

- (void)clear;

- (jboolean)containsWithId:(id)object;

- (id<JavaUtilIterator>)iterator;

- (jboolean)removeWithId:(id)object;

- (jint)size;

#pragma mark Package-Private

- (instancetype)initWithJavaUtilIdentityHashMap:(JavaUtilIdentityHashMap *)outer$;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaUtilIdentityHashMap_ValuesCollection)

FOUNDATION_EXPORT void JavaUtilIdentityHashMap_ValuesCollection_initWithJavaUtilIdentityHashMap_(JavaUtilIdentityHashMap_ValuesCollection *self, JavaUtilIdentityHashMap *outer$);

FOUNDATION_EXPORT JavaUtilIdentityHashMap_ValuesCollection *new_JavaUtilIdentityHashMap_ValuesCollection_initWithJavaUtilIdentityHashMap_(JavaUtilIdentityHashMap *outer$) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaUtilIdentityHashMap_ValuesCollection)

#endif // _JavaUtilIdentityHashMap_H_

redpajama_set_name: RedPajamaGithub


text:
import os
import dotenv
import redis
import json

from pathlib import Path
from .tokenizer import TermCountTokenizer
from .bit import BitDocument

basedir = Path(__file__).parent
dotenv.load_dotenv(basedir.parent / '.env')

class BitIndexer:
    def __init__(self, tokenizer=None, redisdb=None):
        self.init(tokenizer=tokenizer, redisdb=redisdb)

    def init(self, tokenizer=None, redisdb=None):
        """Initialize an Indexer instance.
        """
        if redisdb is None:
            password = os.environ['REDIS_PASSWORD']
            host = os.environ['REDIS_HOST']
            port = int(os.environ['REDIS_PORT'])
            redisdb = redis.Redis(host=host, port=port, password=password, decode_responses=True)

        if tokenizer is None:
            tokenizer = TermCountTokenizer()

        self.tokenizer = tokenizer
        self.redisdb = redisdb

    def _tokenize(self, title='', content='', tags=None):
        # Take all indexable content (e.g, title, tags, and content) and feed as
        # one giant string to tokenizer to break into terms.
        tags_str = ' '.join(tags or [])
        return self.tokenizer.tokenize(' '.join([title, content, tags_str]))

    def add(self, bit: BitDocument ):
        """Build index for the given indexable content.
        """
        if not (bit or bit.id):
            return

        # Pipeline it to reduce round trip time (rtt)
        pipe = self.redisdb.pipeline()

        # Store info about each bit we are going to index, keyed by bit id.
        # On search, resolve each term to this info, and display as search results.
        pipe.hset(name='bits', key=bit.id, value=json.dumps(bit.as_partial()))

        tokens = self._tokenize(bit.as_indexable_str())
        for term_cnt in tokens.values():
            # Our reverse index is just a term -> {bit id, term cnt}, stored as redis
            # sorted set member
            # - naively, term count is used as a score, indicating how relevant the term is to the bit
            # - terms are search using "ZINTER", unfortunately ZINTER order asc, but
            #   we need terms return desc (higher term cnt), so we negate each score
            #   as a hack to get the terms ordered correctly
            pipe.zadd(name=f'_{term_cnt.term}', mapping={bit.id: -term_cnt.cnt})
        pipe.execute()

    def delete(self, bit: BitDocument):
        """Remove all terms for bit with given id. Terms are parsed from
        combination of title, content and tags for the given bit.
        """
        if not (bit or bit.id):
            return

        tokens = self._tokenize(bit.as_indexable_str())
        pipe = self.redisdb.pipeline()

        # Delete the bit info lookup hash
        pipe.hdel('bits', bit.id)

        # For each term, remove the member with given id
        for term_cnt in tokens.values():
            pipe.zrem(f'_{term_cnt.term}', bit.id)
        pipe.execute()


text: Contains data directories for long-term storage.


text:
namespace extensions {
namespace declarative_net_request {
namespace {

namespace dnr_api = api::declarative_net_request;

// Helper to connvert a flat::HeaderOperation to an
// api::declarative_net_request::HeaderOperation.
dnr_api::HeaderOperation ConvertFlatHeaderOperation(
    flat::HeaderOperation operation) {
  switch (operation) {
    case flat::HeaderOperation_remove:
      return dnr_api::HEADER_OPERATION_REMOVE;
  }
}

}  // namespace

RequestAction::HeaderInfo::HeaderInfo(std::string header,
                                      dnr_api::HeaderOperation operation)
    : header(std::move(header)), operation(operation) {}

RequestAction::HeaderInfo::HeaderInfo(const flat::ModifyHeaderInfo& info)
    : header(CreateString<std::string>(*info.header())),
      operation(ConvertFlatHeaderOperation(info.operation())) {}

RequestAction::RequestAction(RequestAction::Type type,
                             uint32_t rule_id,
                             uint64_t index_priority,
                             RulesetID ruleset_id,
                             const ExtensionId& extension_id)
    : type(type),
      rule_id(rule_id),
      index_priority(index_priority),
      ruleset_id(ruleset_id),
      extension_id(extension_id) {}
RequestAction::~RequestAction() = default;
RequestAction::RequestAction(RequestAction&&) = default;
RequestAction& RequestAction::operator=(RequestAction&&) = default;

RequestAction RequestAction::Clone() const {
  // Use the private copy constructor to create a copy.
  return *this;
}

RequestAction::RequestAction(const RequestAction&) = default;

base::Optional<RequestAction> GetMaxPriorityAction(
    base::Optional<RequestAction> lhs,
    base::Optional<RequestAction> rhs) {
  if (!lhs)
    return rhs;
  if (!rhs)
    return lhs;
  return lhs->index_priority >= rhs->index_priority ? std::move(lhs)
                                                    : std::move(rhs);
}

}  // namespace declarative_net_request
}  // namespace extensions


text:
namespace OpenLiveWriter.HtmlParser.Parser.FormAgent
{
    public class Hidden : FormElementWithValue
    {
        public Hidden(HtmlForm parentForm, string name, string value) : base(parentForm, name, value)
        {
        }

        public override bool IsSuccessful
        {
            get { return true; }
        }
    }
}


text:
#ifndef RenderMathMLSquareRoot_h
#define RenderMathMLSquareRoot_h

#if ENABLE(MATHML)

#include "RenderMathMLRoot.h"

namespace WebCore {

// Render sqrt(base), using radical notation.
class RenderMathMLSquareRoot : public RenderMathMLRoot {
public:
    RenderMathMLSquareRoot(Element*);

private:
    virtual bool isRenderMathMLSquareRoot() const { return true; }
    virtual const char* renderName() const { return "RenderMathMLSquareRoot"; }
};

}

#endif // ENABLE(MATHML)

#endif // RenderMathMLSquareRoot_h


text:
from bears.go.GoErrCheckBear import GoErrCheckBear
from coalib.testing.LocalBearTestHelper import verify_local_bear

good_file = """package main
import "fmt"
func main() {
    fmt.Println("Hello, Arch!")
}
"""

bad_file = """package main
import "os"
func main() {
f, _ := os.Open("foo")
f.Write([]byte("Hello, world."))
f.Close()
}
"""

assert_file = """package main

func main() {
// Type assertions
  var i interface{}
  s1 := i.(string)    // ASSERT
  s1 = i.(string)     // ASSERT
  s2, _ := i.(string) // ASSERT
  s2, _ = i.(string)  // ASSERT
  s3, ok := i.(string)
  s3, ok = i.(string)
  switch s4 := i.(type) {
  case string:
    _ = s4
  }
  _, _, _, _ = s1, s2, s3, ok

}
"""

blank_file = """package main
import "os"
import "fmt"

func main() {
f, _ := os.Open("random")
    fmt.Println(f)
}"""

ignorepkg_file = """package main
import (
  "io"
  "log"
  "os"
)
func main() {
  f, _ := os.Open("foo")
  log.Println("opened file")
  io.Copy(os.Stdout, f)
}"""

GoErrCheckBearTest = verify_local_bear(GoErrCheckBear,
                                       valid_files=(
                                           good_file, assert_file, blank_file),
                                       invalid_files=(bad_file,),
                                       tempfile_kwargs={'suffix': '.go'})

GoErrCheckBearWithIgnoreTest = verify_local_bear(GoErrCheckBear,
                                                 valid_files=(
                                                     good_file,
                                                     assert_file,
                                                     blank_file),
                                                 invalid_files=(bad_file,),
                                                 settings={
                                                     'ignore':
                                                     "'[rR]ead|[wW]rite'"},
                                                 tempfile_kwargs={'suffix':
                                                                  '.go'})
GoErrCheckBearWithIgnorePkgTest = verify_local_bear(GoErrCheckBear,
                                                    valid_files=(
                                                        good_file, assert_file,
                                                        blank_file),
                                                    invalid_files=(
                                                        ignorepkg_file,),
                                                    settings={
                                                        'ignorepkg':
                                                        "'io'"},
                                                    tempfile_kwargs={'suffix':
                                                                     '.go'})

GoErrCheckBearWithBlankTest = verify_local_bear(GoErrCheckBear,
                                                valid_files=(good_file,
                                                             assert_file),
                                                invalid_files=(blank_file,),
                                                settings={'blank': True},
                                                tempfile_kwargs={'suffix':
                                                                 '.go'})
GoErrCheckBearWithAssertsTest = verify_local_bear(GoErrCheckBear,
                                                  valid_files=(good_file,
                                                               blank_file),
                                                  invalid_files=(assert_file,),
                                                  settings={'asserts': True},
                                                  tempfile_kwargs={'suffix':
                                                                   '.go'})


text:
@implementation YCDraggableTreeController

- (void)awakeFromNib
{
    [self.outlineView registerForDraggedTypes:@[YCMovedRowsType]];
}

- (id <NSPasteboardWriting>)outlineView:(NSOutlineView *)pOutlineView
                pasteboardWriterForItem:(NSTreeNode *)pItem
{
    return [[NSPasteboardItem alloc] initWithPasteboardPropertyList:[NSNumber numberWithBool:YES]
                                                             ofType:YCMovedRowsType];
}

#pragma mark NSOutlineViewDatasource

- (NSInteger)outlineView:(NSOutlineView *)pOutlineView
  numberOfChildrenOfItem:(NSTreeNode *)pItem
{
    return 0;
}
- (NSTreeNode *)outlineView:(NSOutlineView *)pOutlineView
                      child:(NSInteger)pChildIndex ofItem:(id)pItem
{
    return nil;
}
- (BOOL)outlineView:(NSOutlineView *)pOutlineView
   isItemExpandable:(NSTreeNode *)pItem
{
    return NO;
}

- (void)outlineView:(NSOutlineView *)pOutlineView
    draggingSession:(NSDraggingSession *)pDraggingSession
   willBeginAtPoint:(NSPoint)pScreenPoint
           forItems:(NSArray *)pDraggedItems
{
    self.draggingItems = [pDraggedItems copy];
}

- (void)outlineView:(NSOutlineView *)pOutlineView
    draggingSession:(NSDraggingSession *)pDraggingSession
       endedAtPoint:(NSPoint)pScreenPoint
          operation:(NSDragOperation)pOperation
{
    self.draggingItems = nil;
}

- (NSDragOperation)outlineView:(NSOutlineView *)outlineView
                  validateDrop:(id<NSDraggingInfo>)info
                  proposedItem:(NSTreeNode *)item
            proposedChildIndex:(NSInteger)index
{
    if([info draggingSource] == self.outlineView)
    {
        for(NSTreeNode *draggingItem in self.draggingItems)
        {
            if((index < 0 || item.parentNode != nil || draggingItem.parentNode.parentNode != nil) &&
               (index < 0 || draggingItem.root != item.root || ![item.childNodes containsObject:draggingItem]))
            {
                return NSDragOperationNone;
            }
        }
        return NSDragOperationMove;
    }
    return NSDragOperationNone;
}

- (BOOL)outlineView:(NSOutlineView *)outlineView
         acceptDrop:(id<NSDraggingInfo>)info
               item:(NSTreeNode *)item
         childIndex:(NSInteger)index
{
    if([info draggingSource] == self.outlineView)
    {
        // Note that this will not make use of KVC Accessors to perform the change in the model.
        // As such, the model will be oblivious of the change, even though the tree in the model
        // will actually have changed. We remedy this by defining a delegate and informing it of
        // the change.
        NSIndexPath *path = item == nil ? [NSIndexPath indexPathWithIndex:index] :
        [item.indexPath indexPathByAddingIndex:index];
        if (self.delegate && [self.delegate respondsToSelector:@selector(moveNodes:toIndexPath:)])
        {
            [self.delegate moveNodes:[self.draggingItems valueForKey:@"representedObject"]
                         toIndexPath:path];
        }
        else
        {
            [self moveNodes:self.draggingItems toIndexPath:path];
        }
        if (self.delegate && [self.delegate respondsToSelector:@selector(nodes:didMoveToIndexPath:)])
        {
            [self.delegate nodes:[self.draggingItems valueForKey:@"representedObject"]
              didMoveToIndexPath:path];
        }
        return YES;
    }
    return NO;
}

@end


text:
namespace content {

using ui::AXPropertyFilter;
using ui::AXTreeFormatter;

class DumpAccessibilityNodeTest : public DumpAccessibilityTestBase {
 public:
  void SetUpCommandLine(base::CommandLine* command_line) override {
    // kDisableAXMenuList is true on Chrome OS by default. This can cause the
    // calculation of text alternatives from content to fail in blink tests
    // which include a select element descendant.
    base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
        switches::kDisableAXMenuList, "false");
    // Enable MathMLCore for some MathML tests.
    base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
        switches::kEnableBlinkFeatures, "MathMLCore");
    DumpAccessibilityTestBase::SetUpCommandLine(command_line);
  }

  std::vector<ui::AXPropertyFilter> DefaultFilters() const override {
    std::vector<AXPropertyFilter> property_filters;
    if (GetParam() == ui::AXApiType::kMac)
      return property_filters;

    property_filters.emplace_back("value='*'", AXPropertyFilter::ALLOW);
    property_filters.emplace_back("value='http*'", AXPropertyFilter::DENY);
    property_filters.emplace_back("layout-guess:*", AXPropertyFilter::ALLOW);
    property_filters.emplace_back("select*", AXPropertyFilter::ALLOW);
    property_filters.emplace_back("selectedFromFocus=*",
                                  AXPropertyFilter::DENY);
    property_filters.emplace_back("descript*", AXPropertyFilter::ALLOW);
    property_filters.emplace_back("check*", AXPropertyFilter::ALLOW);
    property_filters.emplace_back("horizontal", AXPropertyFilter::ALLOW);
    property_filters.emplace_back("multiselectable", AXPropertyFilter::ALLOW);
    property_filters.emplace_back("placeholder=*", AXPropertyFilter::ALLOW);
    property_filters.emplace_back("*=''", AXPropertyFilter::DENY);
    property_filters.emplace_back("name=*", AXPropertyFilter::ALLOW_EMPTY);
    return property_filters;
  }

  std::vector<std::string> Dump() override {
    WaitForFinalTreeContents();

    std::unique_ptr<AXTreeFormatter> formatter(CreateFormatter());

    formatter->SetPropertyFilters(scenario_.property_filters,
                                  AXTreeFormatter::kFiltersDefaultSet);

    BrowserAccessibility* test_node = FindNodeByHTMLAttribute("id", "test");
    if (!test_node)
      test_node = FindNodeByHTMLAttribute("class", "test");

    std::string contents =
        test_node ? formatter->FormatNode(test_node) : "Test node not found.";

    std::string escaped_contents = base::EscapeNonASCII(contents);
    return base::SplitString(escaped_contents, "\n", base::KEEP_WHITESPACE,
                             base::SPLIT_WANT_NONEMPTY);
  }

  void RunAriaTest(const base::FilePath::CharType* file_path) {
    base::FilePath test_path = GetTestFilePath("accessibility", "aria");
    {
      base::ScopedAllowBlockingForTesting allow_blocking;
      ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
    }
    base::FilePath aria_file = test_path.Append(base::FilePath(file_path));
    RunTest(aria_file, "accessibility/aria", FILE_PATH_LITERAL("node"));
  }

  void RunHtmlTest(const base::FilePath::CharType* file_path) {
    base::FilePath test_path = GetTestFilePath("accessibility", "html");
    {
      base::ScopedAllowBlockingForTesting allow_blocking;
      ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
    }
    base::FilePath html_file = test_path.Append(base::FilePath(file_path));
    RunTest(html_file, "accessibility/html", FILE_PATH_LITERAL("node"));
  }
};

class DumpAccessibilityAccNameTest : public DumpAccessibilityNodeTest {
 public:
  std::vector<ui::AXPropertyFilter> DefaultFilters() const override {
    std::vector<AXPropertyFilter> property_filters;
    if (GetParam() == ui::AXApiType::kMac)
      return property_filters;

    property_filters.emplace_back("name*", AXPropertyFilter::ALLOW_EMPTY);
    property_filters.emplace_back("description*",
                                  AXPropertyFilter::ALLOW_EMPTY);

    // Since we normally care about the name and/or description, filter out
    // various irrelevant states and properties.
    property_filters.emplace_back("checkable", AXPropertyFilter::DENY);
    property_filters.emplace_back("clickable", AXPropertyFilter::DENY);
    property_filters.emplace_back("editable*", AXPropertyFilter::DENY);
    property_filters.emplace_back("focusable", AXPropertyFilter::DENY);
    property_filters.emplace_back("horizontal", AXPropertyFilter::DENY);
    property_filters.emplace_back("multiselectable", AXPropertyFilter::DENY);
    property_filters.emplace_back("vertical", AXPropertyFilter::DENY);
    return property_filters;
  }

  void RunAccNameTest(const base::FilePath::CharType* file_path) {
    base::FilePath test_path = GetTestFilePath("accessibility", "accname");
    {
      base::ScopedAllowBlockingForTesting allow_blocking;
      ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
    }
    base::FilePath accname_file = test_path.Append(base::FilePath(file_path));
    RunTest(accname_file, "accessibility/accname");
  }
};

class DumpAccessibilityAccNameTestExceptUIA
    : public DumpAccessibilityAccNameTest {};

// Revert CL 3721405 once crbug.com/1260585 (implement MathML UIA) is fixed,
// also see related crbug.com/1272996 (MathML tests fail on UIA).
class DumpAccessibilityMathMLNodeTest : public DumpAccessibilityNodeTest {
 public:
  void RunMathMLTest(const base::FilePath::CharType* file_path) {
    base::FilePath test_path = GetTestFilePath("accessibility", "mathml");
    {
      base::ScopedAllowBlockingForTesting allow_blocking;
      ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
    }
    base::FilePath mathml_file = test_path.Append(base::FilePath(file_path));
    RunTest(mathml_file, "accessibility/mathml", FILE_PATH_LITERAL("node"));
  }
};

class DumpAccessibilityNodeWithoutMathMLTest
    : public DumpAccessibilityMathMLNodeTest {
 public:
  void SetUpCommandLine(base::CommandLine* command_line) override {
    DumpAccessibilityNodeTest::SetUpCommandLine(command_line);
    command_line->AppendSwitchASCII(switches::kDisableBlinkFeatures,
                                    "MathMLCore");
  }
};

// Parameterize the tests so that each test-pass is run independently.
struct TestPassToString {
  std::string operator()(
      const ::testing::TestParamInfo<ui::AXApiType::Type>& i) const {
    return std::string(i.param);
  }
};

INSTANTIATE_TEST_SUITE_P(
    All,
    DumpAccessibilityNodeTest,
    ::testing::ValuesIn(ui::AXInspectTestHelper::TreeTestPasses()),
    TestPassToString());

INSTANTIATE_TEST_SUITE_P(
    All,
    DumpAccessibilityAccNameTest,
    ::testing::ValuesIn(ui::AXInspectTestHelper::TreeTestPasses()),
    TestPassToString());

INSTANTIATE_TEST_SUITE_P(
    All,
    DumpAccessibilityAccNameTestExceptUIA,
    ::testing::ValuesIn(DumpAccessibilityTestBase::TreeTestPassesExceptUIA()),
    TestPassToString());

INSTANTIATE_TEST_SUITE_P(
    All,
    DumpAccessibilityNodeWithoutMathMLTest,
    ::testing::ValuesIn(DumpAccessibilityTestBase::TreeTestPassesExceptUIA()),
    TestPassToString());

INSTANTIATE_TEST_SUITE_P(
    All,
    DumpAccessibilityMathMLNodeTest,
    ::testing::ValuesIn(DumpAccessibilityTestBase::TreeTestPassesExceptUIA()),
    TestPassToString());

// ARIA tests.
IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, AccessibilityAriaScrollbar) {
  RunAriaTest(FILE_PATH_LITERAL("aria-scrollbar.html"));
}

// HTML tests.
IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest,
                       AccessibilityTableThColHeader) {
  RunHtmlTest(FILE_PATH_LITERAL("table-th-colheader.html"));
}

//
// MathML tests.
//

IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLAction) {
  RunMathMLTest(FILE_PATH_LITERAL("maction.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLAnnotation) {
  RunMathMLTest(FILE_PATH_LITERAL("annotation.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLAnnotationXML) {
  RunMathMLTest(FILE_PATH_LITERAL("annotation-xml.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLError) {
  RunMathMLTest(FILE_PATH_LITERAL("merror.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLFraction) {
  RunMathMLTest(FILE_PATH_LITERAL("mfrac.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLIdentifier) {
  RunMathMLTest(FILE_PATH_LITERAL("mi.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLMath) {
  RunMathMLTest(FILE_PATH_LITERAL("math.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeWithoutMathMLTest, MathMLMath) {
  RunMathMLTest(FILE_PATH_LITERAL("math-disabled.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLMultiscripts) {
  RunMathMLTest(FILE_PATH_LITERAL("mmultiscripts.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLNone) {
  RunMathMLTest(FILE_PATH_LITERAL("none.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLNumber) {
  RunMathMLTest(FILE_PATH_LITERAL("mn.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLOperator) {
  RunMathMLTest(FILE_PATH_LITERAL("mo.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLOver) {
  RunMathMLTest(FILE_PATH_LITERAL("mover.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLPadded) {
  RunMathMLTest(FILE_PATH_LITERAL("mpadded.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLPhantom) {
  RunMathMLTest(FILE_PATH_LITERAL("mphantom.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLPrescripts) {
  RunMathMLTest(FILE_PATH_LITERAL("mprescripts.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLRoot) {
  RunMathMLTest(FILE_PATH_LITERAL("mroot.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLRow) {
  RunMathMLTest(FILE_PATH_LITERAL("mrow.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLSemantics) {
  RunMathMLTest(FILE_PATH_LITERAL("semantics.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLSpace) {
  RunMathMLTest(FILE_PATH_LITERAL("mspace.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLSquareRoot) {
  RunMathMLTest(FILE_PATH_LITERAL("msqrt.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLStringLiteral) {
  RunMathMLTest(FILE_PATH_LITERAL("ms.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLStyle) {
  RunMathMLTest(FILE_PATH_LITERAL("mstyle.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLSub) {
  RunMathMLTest(FILE_PATH_LITERAL("msub.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLSubSup) {
  RunMathMLTest(FILE_PATH_LITERAL("msubsup.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLSup) {
  RunMathMLTest(FILE_PATH_LITERAL("msup.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLTable) {
  RunMathMLTest(FILE_PATH_LITERAL("mtable.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLTableCell) {
  RunMathMLTest(FILE_PATH_LITERAL("mtd.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLTableRow) {
  RunMathMLTest(FILE_PATH_LITERAL("mtr.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLText) {
  RunMathMLTest(FILE_PATH_LITERAL("mtext.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLUnder) {
  RunMathMLTest(FILE_PATH_LITERAL("munder.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLUnderOver) {
  RunMathMLTest(FILE_PATH_LITERAL("munderover.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityMathMLNodeTest, MathMLUnknown) {
  RunMathMLTest(FILE_PATH_LITERAL("unknown.html"));
}

//
// AccName tests.
//
IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, DescComboboxFocusable) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-combobox-focusable.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescFromContentOfDescribedbyElement) {
  RunAccNameTest(
      FILE_PATH_LITERAL("desc-from-content-of-describedby-element.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescFromContentOfDescribedbyElementRecursive) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "desc-from-content-of-describedby-element-recursive.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescImgAltDescribedbyHidden) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-img-alt-describedby-hidden.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, DescImgAltDescribedby) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-img-alt-describedby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescImgAltDescribedbyInvalid) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-img-alt-describedby-invalid.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescImgAltDescribedbyNotDisplayed) {
  RunAccNameTest(
      FILE_PATH_LITERAL("desc-img-alt-describedby-not-displayed.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescImgAltDescribedbyPresentational) {
  RunAccNameTest(
      FILE_PATH_LITERAL("desc-img-alt-describedby-presentational.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, DescImgDescribedby) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-img-describedby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescImgDescribedbyNotDisplayed) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-img-describedby-not-displayed.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescImgDescribedbyPresentational) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-img-describedby-presentational.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, DescImgLabelAltTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-img-label-alt-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescImgOneValidDescribedby) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-img-one-valid-describedby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescInputTitleAndDescribedby) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-input-title-and-describedby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       DescLinkWithLabelAndTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("desc-link-with-label-and-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameButtonAriaPressedFalse) {
  RunAccNameTest(FILE_PATH_LITERAL("name-button-aria-pressed-false.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameButtonLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-button-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameButtonLabelLabelledby) {
  RunAccNameTest(FILE_PATH_LITERAL("name-button-label-labelledby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameButtonLabelledby) {
  RunAccNameTest(FILE_PATH_LITERAL("name-button-labelledby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameButtonRoleContentOnly) {
  RunAccNameTest(FILE_PATH_LITERAL("name-button-role-content-only.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameButtonRoleTitleOnly) {
  RunAccNameTest(FILE_PATH_LITERAL("name-button-role-title-only.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameButtonValue) {
  RunAccNameTest(FILE_PATH_LITERAL("name-button-value.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxCssAfterInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-css-after-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxCssBeforeInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-css-before-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxCssBeforeAndAfterWithWhitespace) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "name-checkbox-css-before-and-after-with-whitespace.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameCheckboxInputInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-input-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxInsideLabelWithGeneratedContent) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "name-checkbox-inside-label-with-generated-content.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelEmbeddedCombobox) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-checkbox-label-embedded-combobox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelEmbeddedListbox) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-checkbox-label-embedded-listbox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelEmbeddedMenu) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-label-embedded-menu.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelEmbeddedSelect) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-label-embedded-select.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelEmbeddedSlider) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-label-embedded-slider.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelEmbeddedSpinbutton) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-checkbox-label-embedded-spinbutton.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelEmbeddedTextbox) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-checkbox-label-embedded-textbox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameCheckboxLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelMultipleLabelAlternative) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-checkbox-label-multiple-label-alternative.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelMultipleLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-label-multiple-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxLabelWithInput) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-label-with-input.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameCheckboxSpinbuttonValuenowInLabel) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-checkbox-spinbutton-valuenow-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameCheckboxTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-checkbox-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameComboboxFocusableAlternative) {
  RunAccNameTest(FILE_PATH_LITERAL("name-combobox-focusable-alternative.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameComboboxFocusable) {
  RunAccNameTest(FILE_PATH_LITERAL("name-combobox-focusable.html"));
}

// TODO(crbug.com/1329523): disabled on UIA
IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTestExceptUIA,
                       NameDivContentOnly) {
  RunAccNameTest(FILE_PATH_LITERAL("name-div-content-only.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameDivLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-div-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameDivLabelLabelledby) {
  RunAccNameTest(FILE_PATH_LITERAL("name-div-label-labelledby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameDivLabelledby) {
  RunAccNameTest(FILE_PATH_LITERAL("name-div-labelledby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameDivMultipleSources) {
  RunAccNameTest(FILE_PATH_LITERAL("name-div-multiple-sources.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFileCssAfterInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-css-after-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFileCssBeforeInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-css-before-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFileInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelEmbeddedCombobox) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label-embedded-combobox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelEmbeddedMenu) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label-embedded-menu.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelEmbeddedSelect) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label-embedded-select.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelEmbeddedSlider) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label-embedded-slider.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelEmbeddedSpinbutton) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label-embedded-spinbutton.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFileLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelInlineBlockElements) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-file-label-inline-block-elements.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelInlineBlockStyles) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label-inline-block-styles.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelInlineHiddenElements) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-file-label-inline-hidden-elements.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelOwnedCombobox) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label-owned-combobox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileLabelOwnedComboboxOwnedListbox) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-file-label-owned-combobox-owned-listbox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFileLabelWithInput) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-label-with-input.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFileSpinbuttonValuenowInLabel) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-file-spinbutton-valuenow-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFileTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-file-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFromContent) {
  RunAccNameTest(FILE_PATH_LITERAL("name-from-content.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFromContentOfLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-from-content-of-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFromContentOfLabelledbyElement) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-from-content-of-labelledby-element.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameFromContentOfLabelledbyElementsOneOfWhichIsHidden) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "name-from-content-of-labelledby-elements-one-of-which-is-hidden.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameFromListItem) {
  RunAccNameTest(FILE_PATH_LITERAL("name-from-list-item.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameHeadingComboboxFocusableAlternative) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-heading-combobox-focusable-alternative.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImageCssAfterInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-image-css-after-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameImageCssBeforeInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-image-css-before-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImageInputAlt) {
  RunAccNameTest(FILE_PATH_LITERAL("name-image-input-alt.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameImageInputInsideLabelWithGeneratedContent) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "name-image-input-inside-label-with-generated-content.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImageInputLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-image-input-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameImageInputLabelWithInput) {
  RunAccNameTest(FILE_PATH_LITERAL("name-image-input-label-with-input.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameImageSpinbuttonValuenowInLabel) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-image-spinbutton-valuenow-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImageTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-image-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImgLabelAltTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-img-label-alt-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImgLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-img-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImgLabelledbyInputs) {
  RunAccNameTest(FILE_PATH_LITERAL("name-img-labelledby-inputs.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameImgLabelledbySelfAndInput) {
  RunAccNameTest(FILE_PATH_LITERAL("name-img-labelledby-self-and-input.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameImgLabelledbySelfAndTwoInputs) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-img-labelledby-self-and-two-inputs.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImgLabelledbySelf) {
  RunAccNameTest(FILE_PATH_LITERAL("name-img-labelledby-self.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameImgMultipleSources) {
  RunAccNameTest(FILE_PATH_LITERAL("name-img-multiple-sources.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameImgMultipleSourcesSomeEmpty) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-img-multiple-sources-some-empty.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameImgWithLabelLabelsItself) {
  RunAccNameTest(FILE_PATH_LITERAL("name-img-with-label-labels-itself.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameLinkContentOnly) {
  RunAccNameTest(FILE_PATH_LITERAL("name-link-content-only.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameLinkEmptyWithTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-link-empty-with-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameLinkLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-link-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameLinkLabelledby) {
  RunAccNameTest(FILE_PATH_LITERAL("name-link-labelledby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameLinkLabelledbySelfAndParagraph) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-link-labelledby-self-and-paragraph.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameLinkLabelTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-link-label-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameLinkMixedContent) {
  RunAccNameTest(FILE_PATH_LITERAL("name-link-mixed-content.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameLinkMultipleSources) {
  RunAccNameTest(FILE_PATH_LITERAL("name-link-multiple-sources.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordCssAfterInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-css-after-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordCssBeforeInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-css-before-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NamePasswordInputInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-input-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordInsideLabelWithGeneratedContent) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "name-password-inside-label-with-generated-content.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordLabelEmbeddedCombobox) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-password-label-embedded-combobox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordLabelEmbeddedMenu) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-label-embedded-menu.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordLabelEmbeddedSelect) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-label-embedded-select.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordLabelEmbeddedSlider) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-label-embedded-slider.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordLabelEmbeddedSpinbutton) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-password-label-embedded-spinbutton.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NamePasswordLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NamePasswordLabelWithInput) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-label-with-input.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NamePasswordTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-password-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameRadioCssAfterInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-css-after-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameRadioCssBeforeInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-css-before-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameRadioInputInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-input-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameRadioInsideLabelWithGeneratedContent) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-radio-inside-label-with-generated-content.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameRadioLabelEmbeddedCombobox) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-label-embedded-combobox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameRadioLabelEmbeddedMenu) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-label-embedded-menu.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameRadioLabelEmbeddedSelect) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-label-embedded-select.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameRadioLabelEmbeddedSlider) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-label-embedded-slider.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameRadioLabelEmbeddedSpinbutton) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-radio-label-embedded-spinbutton.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameRadioLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameRadioLabelWithInput) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-label-with-input.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameRadioSpinbuttonValuenowInLabel) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-radio-spinbutton-valuenow-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameRadioTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-radio-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameResetButton) {
  RunAccNameTest(FILE_PATH_LITERAL("name-reset-button.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextContentOfLabelledByElementRecursive) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "name-text-content-of-labelledby-element-recursive.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextCssAfterInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-css-after-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextCssBeforeInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-css-before-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextDynamicLabelledby) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-dynamic-labelledby.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextInputInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-input-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextInsideLabelWithGeneratedContent) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-inside-label-with-generated-content.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelEmbeddedCombobox) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-label-embedded-combobox.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelEmbeddedMenu) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-label-embedded-menu.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelEmbeddedSelect) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-label-embedded-select.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelEmbeddedSlider) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-label-embedded-slider.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelEmbeddedSpinbutton) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-label-embedded-spinbutton.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelInlineWithWhitespace) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-label-inline-with-whitespace.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelledbyDynamicallyHidden) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-labelledby-dynamically-hidden.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelledbyAriaHiddenDifferentVisibilityTypes) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "name-text-labelledby-aria-hidden-different-visibility-types.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelledbyHiddenDifferentVisibilityTypes) {
  RunAccNameTest(FILE_PATH_LITERAL(
      "name-text-labelledby-hidden-different-visibility-types.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelledbyHiddenMultipleLevels) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-labelledby-hidden-multiple-levels.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelledbyHiddenWithHiddenChild) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-labelledby-hidden-with-hidden-child.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelledbyParagraphs) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-labelledby-paragraphs.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelledbySelfAndDiv) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-labelledby-self-and-div.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelledbyWithGeneratedContent) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-labelledby-with-generated-content.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextLabelWithInput) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-label-with-input.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextLabelWithReadonlyInput) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-label-with-readonly-input.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextSelectInLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-select-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextSpinbuttonValuenowInLabel) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-spinbutton-valuenow-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextSpinbuttonValuetextInLabel) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-spinbutton-valuetext-in-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextTitle) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-title.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextTitleValue) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-title-value.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest, NameTextWithLabel) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-with-label.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextWithValueLabelsImg) {
  RunAccNameTest(FILE_PATH_LITERAL("name-text-with-value-labels-img.html"));
}

IN_PROC_BROWSER_TEST_P(DumpAccessibilityAccNameTest,
                       NameTextWithValueLabelsImgWithLabel) {
  RunAccNameTest(
      FILE_PATH_LITERAL("name-text-with-value-labels-img-with-label.html"));
}

}  // namespace content


text:
<?php

namespace App\Exception;

class InvalidArgumentException extends \InvalidArgumentException
{
}


text:
============
Introduction
============

We have good news for you. Programming is not as hard as it seems to be and we
want to show you how fun and informative it can be.

The tutorial will not magically turn you to a programmer. If you want to be
good at it, you will have to spend  months or even years learning and
practicing. Our goal is to show you that programming or creating web
applications is not too complicated in general.

We will try to explain different bits and pieces as well as we can, so you will
not feel intimidated by technology.

What will you learn during the tutorial?
----------------------------------------

When you finish this tutorial, you will have a simple and working "TODO" web
application. You will learn how to make it available in the Internet, so you
will be able to share your work with your friends and family.

.. image:: image/screenshot/flask-css-complete-1.png
   :width: 640px


text:
<?php

namespace EcoleDeMusique\WelcomeBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class CoursType extends AbstractType
{

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('jour', 'choice',array('choices' => array('10' => 'Lundi', '11' => 'Mardi','12' => 'Mecredi','13'=>'Jeudi','14'=>'Vendredi','15'=>'Samedi','16'=>'Dimanche')))
            ->add('heure','time', array('input'  => 'timestamp', 'widget' => 'choice','hours' => range(8,21),))
            ->add('duree','time', array('input'  => 'timestamp', 'widget' => 'choice','hours' => range(0,6),))
            ->add('salle')
            ->add('prof')
            ->add('activite')
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'EcoleDeMusique\WelcomeBundle\Entity\Cours'
        ));
    }

    public function getName()
    {
        return 'ecoledemusique_welcomebundle_courstype';
    }
}