Bug 1457199 [wpt PR 10658] - Encoding: remove bogus euc-kr test, a=testonly
authorAnne van Kesteren <annevk@annevk.nl>
Tue, 01 May 2018 15:00:06 +0000
changeset 472673 c792e5a24b8cb6e2ce804dc02f74d5cc6b3cea72
parent 472672 ec73f6441af6f652a2c1e64f50c0b9d4b8e509cf
child 472674 22226423b006da14b61e173f36b6e228880d04db
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1457199, 10658, 10635
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1457199 [wpt PR 10658] - Encoding: remove bogus euc-kr test, a=testonly Automatic update from web-platform-testsEncoding: remove bogus euc-kr test Fixes #10635. -- wpt-commits: f3bac8d66ea97dda98adda2e16aade6ef4be1b66 wpt-pr: 10658
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -326965,24 +326965,16 @@
    "encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han.html": [
     [
      "/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han.html",
      {
       "timeout": "long"
      }
     ]
    ],
-   "encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html": [
-    [
-     "/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html",
-     {
-      "timeout": "long"
-     }
-    ]
-   ],
    "encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-misc.html": [
     [
      "/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-misc.html",
      {
       "timeout": "long"
      }
     ]
    ],
@@ -555586,20 +555578,16 @@
   "encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han.html": [
    "ac3af4e3ae4831d6bbb4a10cf20165c8c6f6f0c0",
    "testharness"
   ],
   "encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han.html.headers": [
    "c79f9150befa2f7ce67d17069da7fb66f7f22ca0",
    "support"
   ],
-  "encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html": [
-   "3a2d013060c95824579de848af715c1c8135c206",
-   "testharness"
-  ],
   "encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html.headers": [
    "c79f9150befa2f7ce67d17069da7fb66f7f22ca0",
    "support"
   ],
   "encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-misc.html": [
    "ac75e0cdb92edcec4ccbcea4e4d45329305fd4be",
    "testharness"
   ],
deleted file mode 100644
--- a/testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html
+++ /dev/null
@@ -1,181 +0,0 @@
-<!DOCTYPE html>
-<html>   <!-- DOESN'T WORK, NOT SURE WHY - THERE ARE 11 CHARACTERS PRODUCED, BUT ALL ARE UNASSIGNED CODE POINTS, SO SAFE TO IGNORE FOR NOW -->
-<head>
-<title>EUC-KR encoding errors (form, hangul)</title>
-<meta charset="euc-kr"> <!-- test breaks if the server overrides this -->
-<meta name="timeout" content="long">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="euckr_index.js"></script>
-<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
-<link rel="help" href="https://encoding.spec.whatwg.org/#euc-kr">
-<meta name="assert" content="The browser produces percent-escaped character references when encoding bytes for a URL produced by a form when encoding hangul characters that are not in the euc-kr encoding.">
-<style>
- iframe { display:none }
- form { display:none }
-</style>
-</head>
-<body>
-<div id="log"></div>
-<script>
-var tests = [];
-var cplist = [];
-var numTests = null;
-var numFrames = 2;
-var chunkSize = 400;
-var numChunks = null;
-var frames = null;
-var frames = null;
-var forms = null;
-var seperator = ",";
-var encodedSeperator = encodeURIComponent(",");
-var currentChunkIndex = 0;
-
-function getByteSequence(cp) {
-  // uses the Encoding spec algorithm to derive a sequence of bytes for a character that can be encoded
-  // the result is either a percent-encoded value or null (if the character can't be encoded)
-  // cp: integer, a code point number
-  var cps = [cp];
-  var out = "";
-
-  while (cps.length > 0) {
-    cp = cps.shift();
-    if (cp >= 0x00 && cp <= 0x7f) {
-      // ASCII
-      out += "%" + cp.toString(16);
-      continue;
-    }
-    var ptr = indexcodepoints[cp];
-    if (ptr == null) {
-      return null;
-    }
-    var lead = Math.floor(ptr / 190) + 0x81;
-    var trail = ptr % 190 + 0x41;
-    out +=
-      "%" +
-      lead.toString(16).toUpperCase() +
-      "%" +
-      trail.toString(16).toUpperCase();
-  }
-  return out;
-}
-
-// set up a sparse array of all unicode codepoints listed in the index
-// this will be used for lookup in getByteSequence
-var indexcodepoints = []; // index is unicode cp, value is pointer
-for (p = 0; p < euckr.length; p++) {
-  if (euckr[p] != null && indexcodepoints[euckr[p]] == null) {
-    indexcodepoints[euckr[p]] = p;
-  }
-}
-
-setup(function() {
-  // set up a simple array of all unicode codepoints that are not encoded
-  var codepoints = [];
-
-  for (i = 0xac00; i < 0xd7af; i++) {
-    result = getByteSequence(i);
-    if (!result) {
-      var item = {};
-      codepoints.push(item);
-      item.cp = i;
-      item.expected = "%26%23" + item.cp + "%3B";
-      item.desc = "hangul ";
-    }
-  }
-
-  // convert the information into a simple array of objects that can be easily traversed
-  var currentChunk = [];
-  var currentTests = [];
-  cplist = [currentChunk];
-  tests = [currentTests];
-  for (i = 161; i < codepoints.length; i++) {
-    if (currentChunk.length == chunkSize) {
-      currentChunk = [];
-      cplist.push(currentChunk);
-      currentTests = [];
-      tests.push(currentTests);
-    }
-    var item = {};
-    currentChunk.push(item);
-    item.cp = codepoints[i].cp;
-    item.expected = codepoints[i].expected;
-    item.desc = codepoints[i].desc;
-    currentTests.push(
-      async_test(
-        item.desc +
-          " U+" +
-          item.cp.toString(16).toUpperCase() +
-          " " +
-          String.fromCodePoint(item.cp) +
-          item.expected
-      )
-    );
-  }
-
-  numChunks = cplist.length;
-
-  for (var i = 0; i < numFrames; i++) {
-    var frame = document.createElement("iframe");
-    frame.id = frame.name = "frame-" + i;
-    document.body.appendChild(frame);
-    var form = document.createElement("form");
-    form.id = "form-" + i;
-    form.method = "GET";
-    form.action = "/common/blank.html";
-    form.acceptCharset = "euc-kr";
-    form.target = frame.id;
-    var input = document.createElement("input");
-    input.id = input.name = "input-" + i;
-    form.appendChild(input);
-    document.body.appendChild(form);
-  }
-
-  addEventListener("load", function() {
-    frames = Array.prototype.slice.call(
-      document.getElementsByTagName("iframe")
-    );
-    forms = Array.prototype.slice.call(document.getElementsByTagName("form"));
-    inputs = Array.prototype.slice.call(document.getElementsByTagName("input"));
-    for (var i = 0; i < Math.min(numFrames, numChunks); i++) {
-      runNext(i);
-    }
-  });
-});
-
-function runNext(id) {
-  var i = currentChunkIndex;
-  currentChunkIndex += 1;
-
-  var iframe = frames[id];
-  var form = forms[id];
-  var input = inputs[id];
-
-  input.value = cplist[i]
-    .map(function(x) {
-      return String.fromCodePoint(x.cp);
-    })
-    .join(seperator);
-  form.submit();
-
-  iframe.onload = function() {
-    var url = iframe.contentWindow.location;
-    var query = url.search;
-    var result_string = query.substr(query.indexOf("=") + 1);
-    var results = result_string.split(encodedSeperator);
-
-    for (var j = 0; j < cplist[i].length; j++) {
-      var t = tests[i][j];
-      t.step(function() {
-        assert_equals(results[j], cplist[i][j].expected); // HERE'S THE TEST
-      });
-      t.done();
-    }
-    if (currentChunkIndex < numChunks) {
-      runNext(id);
-    }
-  };
-}
-</script>
-</body>
-</html>