<commit_before>// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library test_mocks;

import 'dart:html';
import 'package:unittest/mock.dart';

class MockWindow extends Mock implements Window {
  MockHistory history = new MockHistory();
  MockLocation location = new MockLocation();
  MockDocument document = new MockDocument();
}

class MockHistory extends Mock implements History {
  //TODO(pavelgj): ugly hack for making tests run in dart2js
  void pushState(Object data, String title, [String url]) {
    log.add(new LogEntry(name, 'pushState', [data, title, url], Action.IGNORE));
  }

  //TODO(pavelgj): ugly hack for making tests run in dart2js
  void replaceState(Object data, String title, [String url]) {
    log.add(new LogEntry(name, 'replaceState', [data, title, url], Action.IGNORE));
  }
}

class MockLocation extends Mock implements Location {}

class MockDocument extends Mock implements HtmlDocument {
  //TODO(pavelgj): ugly hack for making tests run in dart2js
  String set title(title) =>
      log.add(new LogEntry(name, '=title', [title], Action.IGNORE));
}<commit_msg>Cleaning up warnings<commit_after>// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library test_mocks;

import 'dart:html';
import 'package:unittest/mock.dart';

class MockWindow extends Mock implements Window {
  MockHistory history = new MockHistory();
  MockLocation location = new MockLocation();
  MockDocument document = new MockDocument();

  noSuchMethod(_) => super.noSuchMethod(_);
}

class MockHistory extends Mock implements History {
  //TODO(pavelgj): ugly hack for making tests run in dart2js
  void pushState(Object data, String title, [String url]) {
    log.add(new LogEntry(name, 'pushState', [data, title, url], Action.IGNORE));
  }

  //TODO(pavelgj): ugly hack for making tests run in dart2js
  void replaceState(Object data, String title, [String url]) {
    log.add(new LogEntry(name, 'replaceState', [data, title, url], Action.IGNORE));
  }
  noSuchMethod(_) => super.noSuchMethod(_);
}

class MockLocation extends Mock implements Location {
  noSuchMethod(_) => super.noSuchMethod(_);
}

class MockDocument extends Mock implements HtmlDocument {
  //TODO(pavelgj): ugly hack for making tests run in dart2js
  set title(String title) =>
      log.add(new LogEntry(name, '=title', [title], Action.IGNORE));
  noSuchMethod(_) => super.noSuchMethod(_);
}
{'fraction_non_alphanumeric': 0.10802811690714022, 'fraction_numerical': 0.005179430262671106, 'mean_word_length': 4.598343685300207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6462326', 'n_tokens_mistral': 811, 'n_tokens_neox': 784, 'n_words': 294}