<commit_before><!doctype html>
<html>
<head>
  <title>Standard vertical test</title>
  <link rel="stylesheet" type="text/css" href="test.css" />
  <script src="js/helper.js"></script>
  <script src="../lazyload.js"></script>
</head>
<body>

<h1>Standard vertical test</h1>

<div id="result"></div>
<div id="debug"></div>
<div id="content"></div>
<div id="ajax"></div>

<script>
setup(test);

function setup(cb) {
  insertSlowImage(1);
  insertImage(15);
  insertSlowImage(1);
  // cb();
}

function test() {
  var imgs = document.getElementsByTagName('img');
  var first = imgs[0];
  var last = imgs[imgs.length - 1];

  if (imgs.length !== 17)
    error("Bad image count");
  if (first.getAttribute('data-src') === null)
    error("Top images should not be shown, yet");
  if (last.getAttribute('data-src') === null)
    error("Bottom images should not be shown");

  setTimeout(function() {
    if (first.getAttribute('data-src') !== null)
      error("Top image should be shown");
    if (first.getAttribute('onload') !== null)
      error("Top image should have onload removed");<commit_msg>Put back test() on vertical test<commit_after><!doctype html>
<html>
<head>
  <title>Standard vertical test</title>
  <link rel="stylesheet" type="text/css" href="test.css" />
  <script src="js/helper.js"></script>
  <script src="../lazyload.js"></script>
</head>
<body>

<h1>Standard vertical test</h1>

<div id="result"></div>
<div id="debug"></div>
<div id="content"></div>
<div id="ajax"></div>

<script>
setup(test);

function setup(cb) {
  insertSlowImage(1);
  insertImage(15);
  insertSlowImage(1);
  cb();
}

function test() {
  var imgs = document.getElementsByTagName('img');
  var first = imgs[0];
  var last = imgs[imgs.length - 1];

  if (imgs.length !== 17)
    error("Bad image count");
  if (first.getAttribute('data-src') === null)
    error("Top images should not be shown, yet");
  if (last.getAttribute('data-src') === null)
    error("Bottom images should not be shown");

  setTimeout(function() {
    if (first.getAttribute('data-src') !== null)
      error("Top image should be shown");
    if (first.getAttribute('onload') !== null)
      error("Top image should have onload removed");
{'fraction_non_alphanumeric': 0.19492293744333636, 'fraction_numerical': 0.009066183136899365, 'mean_word_length': 4.343825665859564, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '7088403', 'n_tokens_mistral': 754, 'n_tokens_neox': 747, 'n_words': 186}