browser_webconsole_previewers.snapshot.mjs (10392B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 /* 5 * THIS FILE IS AUTOGENERATED. DO NOT MODIFY BY HAND. 6 * 7 * More info in https://firefox-source-docs.mozilla.org/devtools/tests/js-object-tests.html 8 */ 9 10 export default [ 11 // undefined 12 "undefined", 13 14 // null 15 "null", 16 17 // true 18 "true", 19 20 // false 21 "false", 22 23 // NaN 24 "NaN", 25 26 // "abc" 27 "\"abc\"", 28 29 // "鼬ú" 30 "\"鼬ú\"", 31 32 // 42 33 "42", 34 35 // -42 36 "-42", 37 38 // -0 39 "-0", 40 41 // Infinity 42 "Infinity", 43 44 // BigInt(1000000000000000000) 45 "1000000000000000000n", 46 47 // 1n 48 "1n", 49 50 // -2n 51 "-2n", 52 53 // 0n 54 "0n", 55 56 // ({}) 57 "Object { }", 58 59 // ({ foo: "bar"}) 60 "Object { foo: \"bar\" }", 61 62 // [] 63 "Array []", 64 65 // [1] 66 "Array [ 1 ]", 67 68 // ["foo"] 69 "Array [ \"foo\" ]", 70 71 // new BigInt64Array() 72 "BigInt64Array []", 73 74 // const a = new BigInt64Array(1); 75 // a[0] = BigInt(42); 76 // a; 77 // 78 "BigInt64Array [ 42n ]", 79 80 // new Map( 81 // Array.from({ length: 2 }).map((el, i) => [ 82 // { key: i }, 83 // { object: 42 }, 84 // ]) 85 // ) 86 "Map { {…} → {…}, {…} → {…} }", 87 88 // new Map(Array.from({ length: 20 }).map((el, i) => [Symbol(i), i])) 89 "Map(20) { Symbol(\"0\") → 0, Symbol(\"1\") → 1, Symbol(\"2\") → 2, Symbol(\"3\") → 3, Symbol(\"4\") → 4, Symbol(\"5\") → 5, Symbol(\"6\") → 6, Symbol(\"7\") → 7, Symbol(\"8\") → 8, Symbol(\"9\") → 9, … }", 90 91 // new Map(Array.from({ length: 331 }).map((el, i) => [Symbol(i), i])) 92 "Map(331) { Symbol(\"0\") → 0, Symbol(\"1\") → 1, Symbol(\"2\") → 2, Symbol(\"3\") → 3, Symbol(\"4\") → 4, Symbol(\"5\") → 5, Symbol(\"6\") → 6, Symbol(\"7\") → 7, Symbol(\"8\") → 8, Symbol(\"9\") → 9, … }", 93 94 // new Set(Array.from({ length: 2 }).map((el, i) => ({ value: i }))) 95 "Set [ {…}, {…} ]", 96 97 // new Set(Array.from({ length: 20 }).map((el, i) => i)) 98 "Set(20) [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, … ]", 99 100 // new Set(Array.from({ length: 222 }).map((el, i) => i)) 101 "Set(222) [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, … ]", 102 103 // new Temporal.Instant(355924804000000000n) 104 "Temporal.Instant 1981-04-12T12:00:04Z", 105 106 // new Temporal.PlainDate(2021, 7, 1, "coptic") 107 "Temporal.PlainDate 2021-07-01[u-ca=coptic]", 108 109 // new Temporal.PlainDateTime(2021, 7, 1, 0, 0, 0, 0, 0, 0, "gregory") 110 "Temporal.PlainDateTime 2021-07-01T00:00:00[u-ca=gregory]", 111 112 // new Temporal.PlainMonthDay(7, 1, "chinese") 113 "Temporal.PlainMonthDay 1972-07-01[u-ca=chinese]", 114 115 // new Temporal.PlainTime(4, 20) 116 "Temporal.PlainTime 04:20:00", 117 118 // new Temporal.PlainYearMonth(2021, 7, "indian") 119 "Temporal.PlainYearMonth 2021-07-01[u-ca=indian]", 120 121 // new Temporal.ZonedDateTime(0n, "America/New_York") 122 "Temporal.ZonedDateTime 1969-12-31T19:00:00-05:00[America/New_York]", 123 124 // Temporal.Duration.from({ years: 1 }) 125 "Temporal.Duration P1Y", 126 127 // myPolicy.createHTML("hello") 128 "TrustedHTML \"<my-policy>hello</my-policy>\"", 129 130 // myPolicy.createScript("const hello = 'world'") 131 "TrustedScript \"/* myPolicy */ const hello = 'world'\"", 132 133 // myPolicy.createScriptURL("https://example.com/trusted") 134 "TrustedScriptURL https://example.com/trusted?myPolicy", 135 136 // const formData = new FormData(); 137 // formData.append("a", 1); 138 // formData.append("a", 2); 139 // formData.append("b", 3); 140 // formData; 141 // 142 "FormData(3) { a → \"1\", a → \"2\", b → \"3\" }", 143 144 // customElements.define("fx-test", class extends HTMLElement {}); 145 // const { states } = document.createElement("fx-test").attachInternals(); 146 // states.add("custom-state"); 147 // states.add("another-custom-state"); 148 // states; 149 // 150 "CustomStateSet [ \"custom-state\", \"another-custom-state\" ]", 151 152 // CSS.highlights.set("search", new Highlight()); 153 // CSS.highlights.set("glow", new Highlight()); 154 // CSS.highlights.set("anchor", new Highlight()); 155 // CSS.highlights; 156 // 157 "HighlightRegistry(3) { search → Highlight, glow → Highlight, anchor → Highlight }", 158 159 // new URLSearchParams([ 160 // ["a", 1], 161 // ["a", 2], 162 // ["b", 3], 163 // ["b", 3], 164 // ["b", 5], 165 // ["c", "this is 6"], 166 // ["d", 7], 167 // ["e", 8], 168 // ["f", 9], 169 // ["g", 10], 170 // ["h", 11], 171 // ]) 172 "URLSearchParams(11) { a → \"1\", a → \"2\", b → \"3\", b → \"3\", b → \"5\", c → \"this is 6\", d → \"7\", e → \"8\", f → \"9\", g → \"10\", … }", 173 174 // new Error("foo") 175 "Error: foo", 176 177 // throw new Error("Long error ".repeat(10000)); 178 "Uncaught Error: Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error…\ndebugger eval code:1:7", 179 180 // throw `“https://evil.com/?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ is evil and “https://not-so-evil.com/?bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb“ is not good either`; 181 // 182 "Uncaught “https://evil.com/?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ is evil and “https://not-so-evil.com/?bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb“ is not good either\ndebugger eval code:2:7", 183 184 // Error("bar") 185 "Error: bar", 186 187 // function bar() { 188 // asdf(); 189 // } 190 // function foo() { 191 // bar(); 192 // } 193 // 194 // foo(); 195 // 196 "Uncaught ReferenceError: asdf is not defined[Learn More]\ndebugger eval code:3:9", 197 198 // eval("let a, a") 199 "Uncaught SyntaxError: redeclaration of let a[Learn More]\ndebugger eval code:1:1\nnote: Previously declared at line 1, column 5\ndebugger eval code:1:5", 200 201 // throw ""; 202 "Uncaught <empty string>\ndebugger eval code:1:1", 203 204 // throw false; 205 "Uncaught false\ndebugger eval code:1:1", 206 207 // throw undefined; 208 "Uncaught undefined\ndebugger eval code:1:1", 209 210 // throw 0; 211 "Uncaught 0\ndebugger eval code:1:1", 212 213 // throw { vegetable: "cucumber" }; 214 "Uncaught \nObject { vegetable: \"cucumber\" }\ndebugger eval code:1:1", 215 216 // throw Symbol("potato"); 217 "Uncaught Symbol(\"potato\")\ndebugger eval code:1:7", 218 219 // var err = new Error("pineapple"); 220 // err.name = "JuicyError"; 221 // err.flavor = "delicious"; 222 // throw err; 223 // 224 "Uncaught JuicyError: pineapple\ndebugger eval code:5:7", 225 226 // var originalError = new SyntaxError("original error"); 227 // var err = new Error("something went wrong", { 228 // cause: originalError, 229 // }); 230 // throw err; 231 // 232 "Uncaught Error: something went wrong\nCaused by: SyntaxError: original error\ndebugger eval code:6:7", 233 234 // var a = new Error("err-a"); 235 // var b = new Error("err-b", { cause: a }); 236 // var c = new Error("err-c", { cause: b }); 237 // var d = new Error("err-d", { cause: c }); 238 // throw d; 239 // 240 "Uncaught SyntaxError: redeclaration of const a[Learn More]\ndebugger eval code:1:1", 241 242 // var a = new Error("err-a", { cause: b }); 243 // var b = new Error("err-b", { cause: a }); 244 // throw b; 245 // 246 "Uncaught SyntaxError: redeclaration of const a[Learn More]\ndebugger eval code:1:1", 247 248 // throw new Error("null cause", { cause: null }); 249 "Uncaught Error: null cause\nCaused by: null\ndebugger eval code:1:7", 250 251 // throw new Error("number cause", { cause: 0 }); 252 "Uncaught Error: number cause\nCaused by: 0\ndebugger eval code:1:7", 253 254 // throw new Error("string cause", { cause: "cause message" }); 255 "Uncaught Error: string cause\nCaused by: \"cause message\"\ndebugger eval code:1:7", 256 257 // throw new Error("object cause", { 258 // cause: { code: 234, message: "ERR_234" }, 259 // }); 260 // 261 "Uncaught Error: object cause\nCaused by: Object { … }\ndebugger eval code:2:13", 262 263 // Promise.reject("") 264 "Promise { <state>: \"rejected\", <reason>: \"\" }", 265 266 // Promise.reject("tomato") 267 "Promise { <state>: \"rejected\", <reason>: \"tomato\" }", 268 269 // Promise.reject(false) 270 "Promise { <state>: \"rejected\", <reason>: false }", 271 272 // Promise.reject(0) 273 "Promise { <state>: \"rejected\", <reason>: 0 }", 274 275 // Promise.reject(null) 276 "Promise { <state>: \"rejected\", <reason>: null }", 277 278 // Promise.reject(undefined) 279 "Promise { <state>: \"rejected\", <reason>: undefined }", 280 281 // Promise.reject(Symbol("potato")) 282 "Promise { <state>: \"rejected\", <reason>: Symbol(\"potato\") }", 283 284 // Promise.reject({vegetable: "cucumber"}) 285 "Promise { <state>: \"rejected\", <reason>: {…} }", 286 287 // Promise.reject(new Error("pumpkin")) 288 "Promise { <state>: \"rejected\", <reason>: Error }", 289 290 // var err = new Error("pineapple"); 291 // err.name = "JuicyError"; 292 // err.flavor = "delicious"; 293 // Promise.reject(err); 294 // 295 "Promise { <state>: \"rejected\", <reason>: JuicyError }", 296 297 // Promise.resolve().then(() => { 298 // try { 299 // unknownFunc(); 300 // } catch(e) { 301 // throw new Error("something went wrong", { cause: e }) 302 // } 303 // }) 304 "Promise { <state>: \"rejected\", <reason>: Error }", 305 ];