{"ScriptPreparationCode":null,"TestCases":[{"Name":"matchMedia \u002B addListener","Code":"const matchMedia400 = window.matchMedia(\u0022(min-width: 400px)\u0022);\r\nmatchMedia400.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(\u0022400\u0022, true); \r\n }\r\n})\r\n\r\nconst matchMedia500 = window.matchMedia(\u0022(min-width: 500px)\u0022);\r\nmatchMedia500.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(\u0022500\u0022, true); \r\n }\r\n})\r\n\r\nconst matchMedia600 = window.matchMedia(\u0022(min-width: 600px)\u0022);\r\nmatchMedia600.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(\u0022600\u0022, true); \r\n }\r\n})\r\n\r\nconst matchMedia700 = window.matchMedia(\u0022(min-width: 700px)\u0022);\r\nmatchMedia700.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(\u0022700\u0022, true); \r\n }\r\n})\r\n\r\nconst matchMedia450 = window.matchMedia(\u0022(min-width: 450px)\u0022);\r\nmatchMedia450.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(\u0022450\u0022, true); \r\n }\r\n})\r\n\r\nconst matchMedia550 = window.matchMedia(\u0022(min-width: 550px)\u0022);\r\nmatchMedia550.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(\u0022550\u0022, true); \r\n }\r\n})\r\n\r\nconst matchMedia650 = window.matchMedia(\u0022(min-width: 650px)\u0022);\r\nmatchMedia650.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(\u0022650\u0022, true); \r\n }\r\n})\r\n\r\nconst matchMedia750 = window.matchMedia(\u0022(min-width: 750px)\u0022);\r\nmatchMedia750.addListener((query) =\u003E {\r\n if (query.matches) {\r\n console.log(\u0022750\u0022, true); \r\n }\r\n})\r\n","IsDeferred":false},{"Name":"resize \u002B innerWidth","Code":"let currentWidth = window.innerWidth;\r\n\r\nwindow.addEventListener(\u0027resize\u0027, () =\u003E {\r\n currentWidth = window.innerWidth;\r\n});\r\n\r\nswitch (currentWidth) {\r\n case 400:\r\n console.log(\u0022400\u0022, true)\r\n break\r\n case 500:\r\n console.log(\u0022500\u0022, true)\r\n break\r\n case 600:\r\n console.log(\u0022600\u0022, true)\r\n break\r\n case 700:\r\n console.log(\u0022700\u0022, true)\r\n break\r\n case 450:\r\n console.log(\u0022450\u0022, true)\r\n break\r\n case 550:\r\n console.log(\u0022550\u0022, true)\r\n break\r\n case 650:\r\n console.log(\u0022650\u0022, true)\r\n break\r\n case 750:\r\n console.log(\u0022750\u0022, true)\r\n break\r\n}","IsDeferred":false}]}