<commit_before>library polymerjs.iron_test_helpers;

import 'dart:js';
import 'dart:html';
import 'package:polymerjs/jsutils.dart';

/// Make sure to import the following in your html test:
/// <script src="components/iron-test-helpers/mock-interactions.js"></script>
/// <script src="components/iron-test-helpers/test-helpers.js"></script>
class MockInteractions extends Object with JsStaticMixin {
  
  static JsObject js = context["MockInteractions"];

  static blur(HtmlElement target) => js["blur"].apply([target]);

  static down(HtmlElement target) => js["down"].apply([target]);

  static up(HtmlElement target) => js["up"].apply([target]);

  static downAndUp(HtmlElement target) => js["downAndUp"].apply([target]);

  static tap(HtmlElement target) => js["tap"].apply([target]);

  static track(HtmlElement target) => js["track"].apply([target]);

  static pressEnter(HtmlElement target) => js["pressEnter"].apply([target]);

  static pressSpace(HtmlElement target) => js["pressSpace"].apply([target]);

  static keyDownOn(HtmlElement target, {int keyCode: 13}) => js["keyDownOn"].apply([target,keyCode]);

  static keyUpOn(HtmlElement target, {int keyCode: 13}) => js["keyUpOn"].apply([target,keyCode]);

  // TODO: implements those two as well
  // middleOfNode: middleOfNode,
  // topLeftOfNode: topLeftOfNode
}<commit_msg>add middleOfNode and topLeftOfNode to iron-test-helper<commit_after>library polymerjs.iron_test_helpers;

import 'dart:js';
import 'dart:html';
import 'package:polymerjs/jsutils.dart';

/// Make sure to import the following in your html test:
/// <script src="components/iron-test-helpers/mock-interactions.js"></script>
/// <script src="components/iron-test-helpers/test-helpers.js"></script>
class MockInteractions extends Object with JsStaticMixin {
  
  static JsObject js = context["MockInteractions"];

  static blur(HtmlElement target) => js["blur"].apply([target]);

  static down(HtmlElement target) => js["down"].apply([target]);

  static up(HtmlElement target) => js["up"].apply([target]);

  static downAndUp(HtmlElement target) => js["downAndUp"].apply([target]);

  static tap(HtmlElement target) => js["tap"].apply([target]);

  static track(HtmlElement target) => js["track"].apply([target]);

  static pressEnter(HtmlElement target) => js["pressEnter"].apply([target]);

  static pressSpace(HtmlElement target) => js["pressSpace"].apply([target]);

  static keyDownOn(HtmlElement target, {int keyCode: 13}) => js["keyDownOn"].apply([target,keyCode]);

  static keyUpOn(HtmlElement target, {int keyCode: 13}) => js["keyUpOn"].apply([target,keyCode]);

  static Point middleOfNode(HtmlElement element) {
    var point = js['middleOfNode'].apply([element]);
    return new Point(point['x'], point['y']);
  }
  static Point topLeftOfNode(HtmlElement element) {
    var point = js['topLeftOfNode'].apply([element]);
    return new Point(point['x'], point['y']);
  }
}
{'fraction_non_alphanumeric': 0.1700960219478738, 'fraction_numerical': 0.0027434842249657062, 'mean_word_length': 5.92874109263658, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6622727', 'n_tokens_mistral': 890, 'n_tokens_neox': 858, 'n_words': 193}