blob: ffd00a35e35904c17ee34529336bfb5fa6c0dc94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function () {
info("Test ignored charset parameter started");
const encodedChar = "%E2%9D%A4"; // In UTF-8 this is a heavy black heart
const result = "❤";
const TEST_JSON_URL = "data:application/json;charset=ANSI," + encodedChar;
await addJsonViewTab(TEST_JSON_URL);
await selectJsonViewContentTab("rawdata");
const text = await getElementText(".textPanelBox .data");
is(text, result, "The charset parameter is ignored and UTF-8 is used.");
});
|