blob: c272d70b7454b83dd45f1ee2d574804fa3cb2ccf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
loadPage("file:///res/html/misc/blank.html");
afterInitialPageLoad(() => {
test("atob", () => {
expect(atob("YQ==")).toBe("a");
expect(atob("YWE=")).toBe("aa");
expect(atob("YWFh")).toBe("aaa");
expect(atob("YWFhYQ==")).toBe("aaaa");
expect(atob("/w==")).toBe("\xff");
});
test("btoa", () => {
expect(btoa("a")).toBe("YQ==");
expect(btoa("aa")).toBe("YWE=");
expect(btoa("aaa")).toBe("YWFh");
expect(btoa("aaaa")).toBe("YWFhYQ==");
expect(btoa("\xff")).toBe("/w==");
});
});
|