simdeck 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (807) hide show
  1. package/README.md +34 -14
  2. package/build/simdeck-bin +0 -0
  3. package/client/dist/assets/index-D2-CFde1.css +1 -0
  4. package/client/dist/assets/index-E1gIgaOR.js +9 -0
  5. package/client/dist/chrome-devtools-ui/Images/3d-center.svg +1 -0
  6. package/client/dist/chrome-devtools-ui/Images/3d-pan.svg +1 -0
  7. package/client/dist/chrome-devtools-ui/Images/3d-rotate.svg +1 -0
  8. package/client/dist/chrome-devtools-ui/Images/Images.js +296 -0
  9. package/client/dist/chrome-devtools-ui/Images/accelerometer-back.svg +1 -0
  10. package/client/dist/chrome-devtools-ui/Images/accelerometer-bottom.png +0 -0
  11. package/client/dist/chrome-devtools-ui/Images/accelerometer-front.svg +1 -0
  12. package/client/dist/chrome-devtools-ui/Images/accelerometer-left.png +0 -0
  13. package/client/dist/chrome-devtools-ui/Images/accelerometer-right.png +0 -0
  14. package/client/dist/chrome-devtools-ui/Images/accelerometer-top.png +0 -0
  15. package/client/dist/chrome-devtools-ui/Images/account-tree.svg +1 -0
  16. package/client/dist/chrome-devtools-ui/Images/align-content-center.svg +1 -0
  17. package/client/dist/chrome-devtools-ui/Images/align-content-end.svg +1 -0
  18. package/client/dist/chrome-devtools-ui/Images/align-content-space-around.svg +1 -0
  19. package/client/dist/chrome-devtools-ui/Images/align-content-space-between.svg +1 -0
  20. package/client/dist/chrome-devtools-ui/Images/align-content-space-evenly.svg +1 -0
  21. package/client/dist/chrome-devtools-ui/Images/align-content-start.svg +1 -0
  22. package/client/dist/chrome-devtools-ui/Images/align-content-stretch.svg +1 -0
  23. package/client/dist/chrome-devtools-ui/Images/align-items-baseline.svg +1 -0
  24. package/client/dist/chrome-devtools-ui/Images/align-items-center.svg +1 -0
  25. package/client/dist/chrome-devtools-ui/Images/align-items-end.svg +1 -0
  26. package/client/dist/chrome-devtools-ui/Images/align-items-start.svg +1 -0
  27. package/client/dist/chrome-devtools-ui/Images/align-items-stretch.svg +1 -0
  28. package/client/dist/chrome-devtools-ui/Images/align-self-center.svg +1 -0
  29. package/client/dist/chrome-devtools-ui/Images/align-self-end.svg +1 -0
  30. package/client/dist/chrome-devtools-ui/Images/align-self-start.svg +1 -0
  31. package/client/dist/chrome-devtools-ui/Images/align-self-stretch.svg +1 -0
  32. package/client/dist/chrome-devtools-ui/Images/animation.svg +1 -0
  33. package/client/dist/chrome-devtools-ui/Images/arrow-back.svg +1 -0
  34. package/client/dist/chrome-devtools-ui/Images/arrow-collapse.svg +1 -0
  35. package/client/dist/chrome-devtools-ui/Images/arrow-down.svg +1 -0
  36. package/client/dist/chrome-devtools-ui/Images/arrow-drop-down-dark.svg +1 -0
  37. package/client/dist/chrome-devtools-ui/Images/arrow-drop-down-light.svg +1 -0
  38. package/client/dist/chrome-devtools-ui/Images/arrow-drop-down.svg +1 -0
  39. package/client/dist/chrome-devtools-ui/Images/arrow-forward.svg +1 -0
  40. package/client/dist/chrome-devtools-ui/Images/arrow-right-circle.svg +1 -0
  41. package/client/dist/chrome-devtools-ui/Images/arrow-up-down-circle.svg +1 -0
  42. package/client/dist/chrome-devtools-ui/Images/arrow-up-down.svg +1 -0
  43. package/client/dist/chrome-devtools-ui/Images/arrow-up.svg +1 -0
  44. package/client/dist/chrome-devtools-ui/Images/bell.svg +1 -0
  45. package/client/dist/chrome-devtools-ui/Images/bezier-curve-filled.svg +1 -0
  46. package/client/dist/chrome-devtools-ui/Images/bin.svg +1 -0
  47. package/client/dist/chrome-devtools-ui/Images/bottom-panel-close.svg +1 -0
  48. package/client/dist/chrome-devtools-ui/Images/bottom-panel-open.svg +1 -0
  49. package/client/dist/chrome-devtools-ui/Images/brackets.svg +1 -0
  50. package/client/dist/chrome-devtools-ui/Images/breakpoint-circle.svg +1 -0
  51. package/client/dist/chrome-devtools-ui/Images/breakpoint-crossed-filled.svg +1 -0
  52. package/client/dist/chrome-devtools-ui/Images/breakpoint-crossed.svg +1 -0
  53. package/client/dist/chrome-devtools-ui/Images/brush-2.svg +1 -0
  54. package/client/dist/chrome-devtools-ui/Images/brush-filled.svg +1 -0
  55. package/client/dist/chrome-devtools-ui/Images/brush.svg +1 -0
  56. package/client/dist/chrome-devtools-ui/Images/bug.svg +1 -0
  57. package/client/dist/chrome-devtools-ui/Images/bundle.svg +1 -0
  58. package/client/dist/chrome-devtools-ui/Images/button-magic.svg +1 -0
  59. package/client/dist/chrome-devtools-ui/Images/calendar-today.svg +1 -0
  60. package/client/dist/chrome-devtools-ui/Images/center-focus-weak.svg +1 -0
  61. package/client/dist/chrome-devtools-ui/Images/check-circle.svg +1 -0
  62. package/client/dist/chrome-devtools-ui/Images/check-double.svg +1 -0
  63. package/client/dist/chrome-devtools-ui/Images/checker.svg +1 -0
  64. package/client/dist/chrome-devtools-ui/Images/checkmark.svg +1 -0
  65. package/client/dist/chrome-devtools-ui/Images/chevron-double-right.svg +1 -0
  66. package/client/dist/chrome-devtools-ui/Images/chevron-down.svg +1 -0
  67. package/client/dist/chrome-devtools-ui/Images/chevron-left-dot.svg +1 -0
  68. package/client/dist/chrome-devtools-ui/Images/chevron-left.svg +1 -0
  69. package/client/dist/chrome-devtools-ui/Images/chevron-right.svg +1 -0
  70. package/client/dist/chrome-devtools-ui/Images/chevron-up.svg +1 -0
  71. package/client/dist/chrome-devtools-ui/Images/chromeLeft.avif +0 -0
  72. package/client/dist/chrome-devtools-ui/Images/chromeMiddle.avif +0 -0
  73. package/client/dist/chrome-devtools-ui/Images/chromeRight.avif +0 -0
  74. package/client/dist/chrome-devtools-ui/Images/class.svg +1 -0
  75. package/client/dist/chrome-devtools-ui/Images/clear-list.svg +1 -0
  76. package/client/dist/chrome-devtools-ui/Images/clear.svg +1 -0
  77. package/client/dist/chrome-devtools-ui/Images/cloud.svg +1 -0
  78. package/client/dist/chrome-devtools-ui/Images/code-circle.svg +1 -0
  79. package/client/dist/chrome-devtools-ui/Images/code.svg +1 -0
  80. package/client/dist/chrome-devtools-ui/Images/colon.svg +1 -0
  81. package/client/dist/chrome-devtools-ui/Images/color-picker-filled.svg +1 -0
  82. package/client/dist/chrome-devtools-ui/Images/color-picker.svg +1 -0
  83. package/client/dist/chrome-devtools-ui/Images/compress.svg +1 -0
  84. package/client/dist/chrome-devtools-ui/Images/console-conditional-breakpoint.svg +1 -0
  85. package/client/dist/chrome-devtools-ui/Images/console-logpoint.svg +1 -0
  86. package/client/dist/chrome-devtools-ui/Images/cookie.svg +1 -0
  87. package/client/dist/chrome-devtools-ui/Images/cookie_off.svg +1 -0
  88. package/client/dist/chrome-devtools-ui/Images/copy.svg +1 -0
  89. package/client/dist/chrome-devtools-ui/Images/corporate-fare.svg +1 -0
  90. package/client/dist/chrome-devtools-ui/Images/credit-card.svg +1 -0
  91. package/client/dist/chrome-devtools-ui/Images/cross-circle-filled.svg +1 -0
  92. package/client/dist/chrome-devtools-ui/Images/cross-circle.svg +1 -0
  93. package/client/dist/chrome-devtools-ui/Images/cross.svg +1 -0
  94. package/client/dist/chrome-devtools-ui/Images/cssoverview_icons_2x.avif +0 -0
  95. package/client/dist/chrome-devtools-ui/Images/custom-typography.svg +1 -0
  96. package/client/dist/chrome-devtools-ui/Images/database.svg +1 -0
  97. package/client/dist/chrome-devtools-ui/Images/deployed.svg +1 -0
  98. package/client/dist/chrome-devtools-ui/Images/device-fold.svg +1 -0
  99. package/client/dist/chrome-devtools-ui/Images/devices.svg +1 -0
  100. package/client/dist/chrome-devtools-ui/Images/devtools-thumbnail.svg +1 -0
  101. package/client/dist/chrome-devtools-ui/Images/devtools-tips.svg +1 -0
  102. package/client/dist/chrome-devtools-ui/Images/devtools.svg +1 -0
  103. package/client/dist/chrome-devtools-ui/Images/difference.svg +1 -0
  104. package/client/dist/chrome-devtools-ui/Images/dock-bottom.svg +1 -0
  105. package/client/dist/chrome-devtools-ui/Images/dock-left.svg +1 -0
  106. package/client/dist/chrome-devtools-ui/Images/dock-right.svg +1 -0
  107. package/client/dist/chrome-devtools-ui/Images/dock-window.svg +1 -0
  108. package/client/dist/chrome-devtools-ui/Images/document.svg +1 -0
  109. package/client/dist/chrome-devtools-ui/Images/dog-paw.svg +1 -0
  110. package/client/dist/chrome-devtools-ui/Images/domain.svg +1 -0
  111. package/client/dist/chrome-devtools-ui/Images/dots-horizontal.svg +1 -0
  112. package/client/dist/chrome-devtools-ui/Images/dots-vertical.svg +1 -0
  113. package/client/dist/chrome-devtools-ui/Images/download.svg +1 -0
  114. package/client/dist/chrome-devtools-ui/Images/edit.svg +1 -0
  115. package/client/dist/chrome-devtools-ui/Images/empty.svg +1 -0
  116. package/client/dist/chrome-devtools-ui/Images/errorWave.svg +1 -0
  117. package/client/dist/chrome-devtools-ui/Images/exclamation.svg +1 -0
  118. package/client/dist/chrome-devtools-ui/Images/experiment-check.svg +1 -0
  119. package/client/dist/chrome-devtools-ui/Images/experiment.svg +1 -0
  120. package/client/dist/chrome-devtools-ui/Images/extension.svg +1 -0
  121. package/client/dist/chrome-devtools-ui/Images/eye.svg +1 -0
  122. package/client/dist/chrome-devtools-ui/Images/favicon.ico +0 -0
  123. package/client/dist/chrome-devtools-ui/Images/file-document.svg +1 -0
  124. package/client/dist/chrome-devtools-ui/Images/file-fetch-xhr.svg +1 -0
  125. package/client/dist/chrome-devtools-ui/Images/file-font.svg +1 -0
  126. package/client/dist/chrome-devtools-ui/Images/file-generic.svg +1 -0
  127. package/client/dist/chrome-devtools-ui/Images/file-image.svg +1 -0
  128. package/client/dist/chrome-devtools-ui/Images/file-json.svg +1 -0
  129. package/client/dist/chrome-devtools-ui/Images/file-manifest.svg +1 -0
  130. package/client/dist/chrome-devtools-ui/Images/file-media.svg +1 -0
  131. package/client/dist/chrome-devtools-ui/Images/file-script.svg +1 -0
  132. package/client/dist/chrome-devtools-ui/Images/file-snippet.svg +1 -0
  133. package/client/dist/chrome-devtools-ui/Images/file-stylesheet.svg +1 -0
  134. package/client/dist/chrome-devtools-ui/Images/file-wasm.svg +1 -0
  135. package/client/dist/chrome-devtools-ui/Images/file-websocket.svg +1 -0
  136. package/client/dist/chrome-devtools-ui/Images/filter-clear.svg +1 -0
  137. package/client/dist/chrome-devtools-ui/Images/filter-filled.svg +1 -0
  138. package/client/dist/chrome-devtools-ui/Images/filter.svg +1 -0
  139. package/client/dist/chrome-devtools-ui/Images/flex-direction.svg +1 -0
  140. package/client/dist/chrome-devtools-ui/Images/flex-no-wrap.svg +1 -0
  141. package/client/dist/chrome-devtools-ui/Images/flex-wrap.svg +1 -0
  142. package/client/dist/chrome-devtools-ui/Images/flow.svg +1 -0
  143. package/client/dist/chrome-devtools-ui/Images/fold-more.svg +1 -0
  144. package/client/dist/chrome-devtools-ui/Images/folder.svg +1 -0
  145. package/client/dist/chrome-devtools-ui/Images/frame-crossed.svg +1 -0
  146. package/client/dist/chrome-devtools-ui/Images/frame-icon.svg +1 -0
  147. package/client/dist/chrome-devtools-ui/Images/frame.svg +1 -0
  148. package/client/dist/chrome-devtools-ui/Images/gear-filled.svg +1 -0
  149. package/client/dist/chrome-devtools-ui/Images/gear.svg +1 -0
  150. package/client/dist/chrome-devtools-ui/Images/gears.svg +1 -0
  151. package/client/dist/chrome-devtools-ui/Images/global.svg +1 -0
  152. package/client/dist/chrome-devtools-ui/Images/google.svg +1 -0
  153. package/client/dist/chrome-devtools-ui/Images/goto-filled.svg +1 -0
  154. package/client/dist/chrome-devtools-ui/Images/grid-on.svg +1 -0
  155. package/client/dist/chrome-devtools-ui/Images/group.svg +1 -0
  156. package/client/dist/chrome-devtools-ui/Images/heap-snapshot.svg +1 -0
  157. package/client/dist/chrome-devtools-ui/Images/heap-snapshots.svg +1 -0
  158. package/client/dist/chrome-devtools-ui/Images/help.svg +1 -0
  159. package/client/dist/chrome-devtools-ui/Images/history.svg +1 -0
  160. package/client/dist/chrome-devtools-ui/Images/home.svg +1 -0
  161. package/client/dist/chrome-devtools-ui/Images/hover.svg +1 -0
  162. package/client/dist/chrome-devtools-ui/Images/iframe-crossed.svg +1 -0
  163. package/client/dist/chrome-devtools-ui/Images/iframe.svg +1 -0
  164. package/client/dist/chrome-devtools-ui/Images/import.svg +1 -0
  165. package/client/dist/chrome-devtools-ui/Images/indeterminate-question-box.svg +1 -0
  166. package/client/dist/chrome-devtools-ui/Images/info-filled.svg +1 -0
  167. package/client/dist/chrome-devtools-ui/Images/info.svg +1 -0
  168. package/client/dist/chrome-devtools-ui/Images/issue-cross-filled.svg +1 -0
  169. package/client/dist/chrome-devtools-ui/Images/issue-exclamation-filled.svg +1 -0
  170. package/client/dist/chrome-devtools-ui/Images/issue-questionmark-filled.svg +1 -0
  171. package/client/dist/chrome-devtools-ui/Images/issue-text-filled.svg +1 -0
  172. package/client/dist/chrome-devtools-ui/Images/justify-content-center.svg +1 -0
  173. package/client/dist/chrome-devtools-ui/Images/justify-content-end.svg +1 -0
  174. package/client/dist/chrome-devtools-ui/Images/justify-content-space-around.svg +1 -0
  175. package/client/dist/chrome-devtools-ui/Images/justify-content-space-between.svg +1 -0
  176. package/client/dist/chrome-devtools-ui/Images/justify-content-space-evenly.svg +1 -0
  177. package/client/dist/chrome-devtools-ui/Images/justify-content-start.svg +1 -0
  178. package/client/dist/chrome-devtools-ui/Images/justify-items-center.svg +1 -0
  179. package/client/dist/chrome-devtools-ui/Images/justify-items-end.svg +1 -0
  180. package/client/dist/chrome-devtools-ui/Images/justify-items-start.svg +1 -0
  181. package/client/dist/chrome-devtools-ui/Images/justify-items-stretch.svg +1 -0
  182. package/client/dist/chrome-devtools-ui/Images/keyboard-arrow-right.svg +1 -0
  183. package/client/dist/chrome-devtools-ui/Images/keyboard-full.svg +1 -0
  184. package/client/dist/chrome-devtools-ui/Images/keyboard-pen.svg +1 -0
  185. package/client/dist/chrome-devtools-ui/Images/keyboard.svg +1 -0
  186. package/client/dist/chrome-devtools-ui/Images/label.svg +1 -0
  187. package/client/dist/chrome-devtools-ui/Images/large-arrow-right-filled.svg +1 -0
  188. package/client/dist/chrome-devtools-ui/Images/layers-filled.svg +1 -0
  189. package/client/dist/chrome-devtools-ui/Images/layers.svg +1 -0
  190. package/client/dist/chrome-devtools-ui/Images/left-panel-close.svg +1 -0
  191. package/client/dist/chrome-devtools-ui/Images/left-panel-open.svg +1 -0
  192. package/client/dist/chrome-devtools-ui/Images/lightbulb-spark.svg +1 -0
  193. package/client/dist/chrome-devtools-ui/Images/lightbulb.svg +1 -0
  194. package/client/dist/chrome-devtools-ui/Images/lighthouse_logo.svg +1 -0
  195. package/client/dist/chrome-devtools-ui/Images/list.svg +1 -0
  196. package/client/dist/chrome-devtools-ui/Images/location-on.svg +1 -0
  197. package/client/dist/chrome-devtools-ui/Images/lock.svg +1 -0
  198. package/client/dist/chrome-devtools-ui/Images/match-case.svg +1 -0
  199. package/client/dist/chrome-devtools-ui/Images/match-whole-word.svg +1 -0
  200. package/client/dist/chrome-devtools-ui/Images/memory.svg +1 -0
  201. package/client/dist/chrome-devtools-ui/Images/minus.svg +1 -0
  202. package/client/dist/chrome-devtools-ui/Images/mop.svg +1 -0
  203. package/client/dist/chrome-devtools-ui/Images/mouse.svg +1 -0
  204. package/client/dist/chrome-devtools-ui/Images/navigationControls.png +0 -0
  205. package/client/dist/chrome-devtools-ui/Images/navigationControls_2x.png +0 -0
  206. package/client/dist/chrome-devtools-ui/Images/network-settings.svg +1 -0
  207. package/client/dist/chrome-devtools-ui/Images/node-stack-icon.svg +1 -0
  208. package/client/dist/chrome-devtools-ui/Images/nodeIcon.avif +0 -0
  209. package/client/dist/chrome-devtools-ui/Images/open-externally.svg +1 -0
  210. package/client/dist/chrome-devtools-ui/Images/override.svg +1 -0
  211. package/client/dist/chrome-devtools-ui/Images/palette.svg +1 -0
  212. package/client/dist/chrome-devtools-ui/Images/pause-circle.svg +1 -0
  213. package/client/dist/chrome-devtools-ui/Images/pause.svg +1 -0
  214. package/client/dist/chrome-devtools-ui/Images/pen-spark.svg +1 -0
  215. package/client/dist/chrome-devtools-ui/Images/performance-panel-delete-annotation.svg +1 -0
  216. package/client/dist/chrome-devtools-ui/Images/performance-panel-diagram.svg +1 -0
  217. package/client/dist/chrome-devtools-ui/Images/performance-panel-entry-label.svg +1 -0
  218. package/client/dist/chrome-devtools-ui/Images/performance-panel-time-range.svg +1 -0
  219. package/client/dist/chrome-devtools-ui/Images/performance.svg +1 -0
  220. package/client/dist/chrome-devtools-ui/Images/person.svg +1 -0
  221. package/client/dist/chrome-devtools-ui/Images/photo-camera.svg +1 -0
  222. package/client/dist/chrome-devtools-ui/Images/play.svg +1 -0
  223. package/client/dist/chrome-devtools-ui/Images/plus.svg +1 -0
  224. package/client/dist/chrome-devtools-ui/Images/policy.svg +1 -0
  225. package/client/dist/chrome-devtools-ui/Images/popoverArrows.png +0 -0
  226. package/client/dist/chrome-devtools-ui/Images/popup.svg +1 -0
  227. package/client/dist/chrome-devtools-ui/Images/preview_feature_video_thumbnail.svg +1 -0
  228. package/client/dist/chrome-devtools-ui/Images/profile.svg +1 -0
  229. package/client/dist/chrome-devtools-ui/Images/psychiatry.svg +1 -0
  230. package/client/dist/chrome-devtools-ui/Images/react_native/learn-debugging-basics.jpg +0 -0
  231. package/client/dist/chrome-devtools-ui/Images/react_native/learn-native-debugging.jpg +0 -0
  232. package/client/dist/chrome-devtools-ui/Images/react_native/learn-react-native-devtools.jpg +0 -0
  233. package/client/dist/chrome-devtools-ui/Images/react_native/welcomeIcon.png +0 -0
  234. package/client/dist/chrome-devtools-ui/Images/record-start.svg +1 -0
  235. package/client/dist/chrome-devtools-ui/Images/record-stop.svg +1 -0
  236. package/client/dist/chrome-devtools-ui/Images/redo.svg +1 -0
  237. package/client/dist/chrome-devtools-ui/Images/refresh.svg +1 -0
  238. package/client/dist/chrome-devtools-ui/Images/regular-expression.svg +1 -0
  239. package/client/dist/chrome-devtools-ui/Images/replace.svg +1 -0
  240. package/client/dist/chrome-devtools-ui/Images/replay.svg +1 -0
  241. package/client/dist/chrome-devtools-ui/Images/report.svg +1 -0
  242. package/client/dist/chrome-devtools-ui/Images/resizeDiagonal.svg +1 -0
  243. package/client/dist/chrome-devtools-ui/Images/resizeHorizontal.svg +1 -0
  244. package/client/dist/chrome-devtools-ui/Images/resizeVertical.svg +1 -0
  245. package/client/dist/chrome-devtools-ui/Images/resume.svg +1 -0
  246. package/client/dist/chrome-devtools-ui/Images/review.svg +1 -0
  247. package/client/dist/chrome-devtools-ui/Images/right-panel-close.svg +1 -0
  248. package/client/dist/chrome-devtools-ui/Images/right-panel-open.svg +1 -0
  249. package/client/dist/chrome-devtools-ui/Images/scissors.svg +1 -0
  250. package/client/dist/chrome-devtools-ui/Images/screen-rotation.svg +1 -0
  251. package/client/dist/chrome-devtools-ui/Images/search.svg +1 -0
  252. package/client/dist/chrome-devtools-ui/Images/select-element.svg +1 -0
  253. package/client/dist/chrome-devtools-ui/Images/send.svg +1 -0
  254. package/client/dist/chrome-devtools-ui/Images/shadow.svg +1 -0
  255. package/client/dist/chrome-devtools-ui/Images/small-status-dot.svg +1 -0
  256. package/client/dist/chrome-devtools-ui/Images/smart-assistant.svg +1 -0
  257. package/client/dist/chrome-devtools-ui/Images/snippet.svg +1 -0
  258. package/client/dist/chrome-devtools-ui/Images/spark-info.svg +1 -0
  259. package/client/dist/chrome-devtools-ui/Images/star.svg +1 -0
  260. package/client/dist/chrome-devtools-ui/Images/step-into.svg +1 -0
  261. package/client/dist/chrome-devtools-ui/Images/step-out.svg +1 -0
  262. package/client/dist/chrome-devtools-ui/Images/step-over.svg +1 -0
  263. package/client/dist/chrome-devtools-ui/Images/step.svg +1 -0
  264. package/client/dist/chrome-devtools-ui/Images/stop.svg +1 -0
  265. package/client/dist/chrome-devtools-ui/Images/symbol.svg +1 -0
  266. package/client/dist/chrome-devtools-ui/Images/sync.svg +1 -0
  267. package/client/dist/chrome-devtools-ui/Images/table.svg +1 -0
  268. package/client/dist/chrome-devtools-ui/Images/terminal.svg +1 -0
  269. package/client/dist/chrome-devtools-ui/Images/thumb-down-filled.svg +1 -0
  270. package/client/dist/chrome-devtools-ui/Images/thumb-down.svg +1 -0
  271. package/client/dist/chrome-devtools-ui/Images/thumb-up-filled.svg +1 -0
  272. package/client/dist/chrome-devtools-ui/Images/thumb-up.svg +1 -0
  273. package/client/dist/chrome-devtools-ui/Images/tonality.svg +1 -0
  274. package/client/dist/chrome-devtools-ui/Images/toolbarResizerVertical.png +0 -0
  275. package/client/dist/chrome-devtools-ui/Images/top-panel-close.svg +1 -0
  276. package/client/dist/chrome-devtools-ui/Images/top-panel-open.svg +1 -0
  277. package/client/dist/chrome-devtools-ui/Images/touch-app.svg +1 -0
  278. package/client/dist/chrome-devtools-ui/Images/touchCursor.png +0 -0
  279. package/client/dist/chrome-devtools-ui/Images/touchCursor_2x.png +0 -0
  280. package/client/dist/chrome-devtools-ui/Images/triangle-bottom-right.svg +1 -0
  281. package/client/dist/chrome-devtools-ui/Images/triangle-down.svg +1 -0
  282. package/client/dist/chrome-devtools-ui/Images/triangle-left.svg +1 -0
  283. package/client/dist/chrome-devtools-ui/Images/triangle-right.svg +1 -0
  284. package/client/dist/chrome-devtools-ui/Images/triangle-up.svg +1 -0
  285. package/client/dist/chrome-devtools-ui/Images/tune.svg +1 -0
  286. package/client/dist/chrome-devtools-ui/Images/undo.svg +1 -0
  287. package/client/dist/chrome-devtools-ui/Images/warning-filled.svg +1 -0
  288. package/client/dist/chrome-devtools-ui/Images/warning.svg +1 -0
  289. package/client/dist/chrome-devtools-ui/Images/watch.svg +1 -0
  290. package/client/dist/chrome-devtools-ui/Images/whatsnew.svg +1 -0
  291. package/client/dist/chrome-devtools-ui/Images/width.svg +1 -0
  292. package/client/dist/chrome-devtools-ui/Images/zoom-in.svg +1 -0
  293. package/client/dist/chrome-devtools-ui/Tests.js +1700 -0
  294. package/client/dist/chrome-devtools-ui/application_tokens.css +407 -0
  295. package/client/dist/chrome-devtools-ui/core/common/common.js +1 -0
  296. package/client/dist/chrome-devtools-ui/core/dom_extension/dom_extension.js +1 -0
  297. package/client/dist/chrome-devtools-ui/core/host/host.js +1 -0
  298. package/client/dist/chrome-devtools-ui/core/i18n/i18n.js +1 -0
  299. package/client/dist/chrome-devtools-ui/core/i18n/locales/en-US.json +1 -0
  300. package/client/dist/chrome-devtools-ui/core/i18n/locales/zh.json +1 -0
  301. package/client/dist/chrome-devtools-ui/core/platform/platform.js +1 -0
  302. package/client/dist/chrome-devtools-ui/core/protocol_client/protocol_client.js +1 -0
  303. package/client/dist/chrome-devtools-ui/core/rn_experiments/rn_experiments.js +1 -0
  304. package/client/dist/chrome-devtools-ui/core/root/root.js +1 -0
  305. package/client/dist/chrome-devtools-ui/core/sdk/sdk-meta.js +1 -0
  306. package/client/dist/chrome-devtools-ui/core/sdk/sdk.js +1 -0
  307. package/client/dist/chrome-devtools-ui/design_system_tokens.css +782 -0
  308. package/client/dist/chrome-devtools-ui/device_mode_emulation_frame.html +24 -0
  309. package/client/dist/chrome-devtools-ui/devtools_app.html +24 -0
  310. package/client/dist/chrome-devtools-ui/devtools_compatibility.js +1741 -0
  311. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  312. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  313. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  314. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  315. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  316. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  317. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  318. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  319. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  320. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  321. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  322. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  323. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  324. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  325. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  326. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  327. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  328. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  329. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  330. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  331. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  332. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  333. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  334. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  335. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  336. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  337. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  338. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  339. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  340. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  341. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  342. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  343. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPad-landscape.avif +0 -0
  344. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPad-portrait.avif +0 -0
  345. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  346. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  347. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  348. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  349. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  350. package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  351. package/client/dist/chrome-devtools-ui/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +1 -0
  352. package/client/dist/chrome-devtools-ui/entrypoints/devtools_app/devtools_app.js +1 -0
  353. package/client/dist/chrome-devtools-ui/entrypoints/formatter_worker/FormatterActions.js +1 -0
  354. package/client/dist/chrome-devtools-ui/entrypoints/formatter_worker/formatter_worker-entrypoint.js +1 -0
  355. package/client/dist/chrome-devtools-ui/entrypoints/formatter_worker/formatter_worker.js +1 -0
  356. package/client/dist/chrome-devtools-ui/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
  357. package/client/dist/chrome-devtools-ui/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
  358. package/client/dist/chrome-devtools-ui/entrypoints/inspector/inspector.js +1 -0
  359. package/client/dist/chrome-devtools-ui/entrypoints/inspector_main/inspector_main-meta.js +1 -0
  360. package/client/dist/chrome-devtools-ui/entrypoints/inspector_main/inspector_main.js +1 -0
  361. package/client/dist/chrome-devtools-ui/entrypoints/js_app/js_app.js +1 -0
  362. package/client/dist/chrome-devtools-ui/entrypoints/lighthouse_worker/lighthouse_worker.js +1 -0
  363. package/client/dist/chrome-devtools-ui/entrypoints/main/main-meta.js +1 -0
  364. package/client/dist/chrome-devtools-ui/entrypoints/main/main.js +48 -0
  365. package/client/dist/chrome-devtools-ui/entrypoints/ndb_app/ndb_app.js +1 -0
  366. package/client/dist/chrome-devtools-ui/entrypoints/node_app/node_app.js +1 -0
  367. package/client/dist/chrome-devtools-ui/entrypoints/rehydrated_devtools_app/rehydrated_devtools_app.js +1 -0
  368. package/client/dist/chrome-devtools-ui/entrypoints/rn_fusebox/rn_fusebox.js +24 -0
  369. package/client/dist/chrome-devtools-ui/entrypoints/shell/shell.js +1 -0
  370. package/client/dist/chrome-devtools-ui/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
  371. package/client/dist/chrome-devtools-ui/entrypoints/wasmparser_worker/wasmparser_worker.js +1 -0
  372. package/client/dist/chrome-devtools-ui/entrypoints/worker_app/worker_app.js +1 -0
  373. package/client/dist/chrome-devtools-ui/inspector.html +24 -0
  374. package/client/dist/chrome-devtools-ui/integration_test_runner.html +40 -0
  375. package/client/dist/chrome-devtools-ui/js_app.html +24 -0
  376. package/client/dist/chrome-devtools-ui/legacy_test_runner/legacy_test_runner.js +13 -0
  377. package/client/dist/chrome-devtools-ui/legacy_test_runner/test_runner/test_runner.js +1 -0
  378. package/client/dist/chrome-devtools-ui/models/ai_assistance/ai_assistance.js +1 -0
  379. package/client/dist/chrome-devtools-ui/models/autofill_manager/autofill_manager.js +1 -0
  380. package/client/dist/chrome-devtools-ui/models/bindings/bindings.js +1 -0
  381. package/client/dist/chrome-devtools-ui/models/breakpoints/breakpoints.js +1 -0
  382. package/client/dist/chrome-devtools-ui/models/cpu_profile/cpu_profile.js +1 -0
  383. package/client/dist/chrome-devtools-ui/models/crux-manager/crux-manager.js +1 -0
  384. package/client/dist/chrome-devtools-ui/models/emulation/emulation.js +1 -0
  385. package/client/dist/chrome-devtools-ui/models/extensions/extensions.js +1 -0
  386. package/client/dist/chrome-devtools-ui/models/formatter/formatter.js +1 -0
  387. package/client/dist/chrome-devtools-ui/models/har/har.js +1 -0
  388. package/client/dist/chrome-devtools-ui/models/heap_snapshot_model/heap_snapshot_model.js +1 -0
  389. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  390. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepCorpNotSameOrigin.md +8 -0
  391. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  392. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepCorpNotSameSite.md +7 -0
  393. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  394. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CompatibilityModeQuirks.md +5 -0
  395. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  396. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/LowTextContrast.md +5 -0
  397. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  398. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  399. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  400. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteInvalidSameParty.md +8 -0
  401. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  402. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  403. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  404. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  405. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  406. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  407. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  408. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  409. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  410. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInsecureContext.md +7 -0
  411. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidInfoHeader.md +5 -0
  412. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  413. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  414. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +5 -0
  415. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  416. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
  417. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
  418. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +5 -0
  419. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +5 -0
  420. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +5 -0
  421. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +5 -0
  422. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoWebOrOsSupport.md +4 -0
  423. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arOsSourceIgnored.md +18 -0
  424. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arOsTriggerIgnored.md +19 -0
  425. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +8 -0
  426. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
  427. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
  428. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
  429. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +10 -0
  430. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arWebAndOsHeaders.md +11 -0
  431. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/bounceTrackingMitigations.md +3 -0
  432. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  433. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  434. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  435. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
  436. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
  437. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludePortMismatch.md +8 -0
  438. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeSchemeMismatch.md +7 -0
  439. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  440. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  441. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
  442. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnMetadataGrantRead.md +4 -0
  443. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnMetadataGrantSet.md +4 -0
  444. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  445. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  446. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsAllowCredentialsRequired.md +6 -0
  447. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsDisabledScheme.md +7 -0
  448. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsDisallowedByMode.md +7 -0
  449. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  450. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsInsecurePrivateNetwork.md +10 -0
  451. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsInvalidHeaderValues.md +7 -0
  452. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  453. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  454. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  455. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsOriginMismatch.md +6 -0
  456. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsPreflightAllowPrivateNetworkError.md +10 -0
  457. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +5 -0
  458. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsPrivateNetworkPermissionDenied.md +10 -0
  459. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsRedirectContainsCredentials.md +5 -0
  460. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsWildcardOriginNotAllowed.md +8 -0
  461. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspEvalViolation.md +9 -0
  462. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspInlineViolation.md +10 -0
  463. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  464. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspTrustedTypesSinkViolation.md +8 -0
  465. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspURLViolation.md +10 -0
  466. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/deprecation.md +3 -0
  467. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  468. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  469. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  470. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  471. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestCanceled.md +1 -0
  472. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestClientMetadataHttpNotFound.md +1 -0
  473. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestClientMetadataInvalidResponse.md +1 -0
  474. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestClientMetadataNoResponse.md +1 -0
  475. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  476. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  477. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  478. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  479. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  480. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  481. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  482. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  483. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  484. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  485. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  486. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  487. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  488. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  489. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  490. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  491. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  492. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  493. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  494. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  495. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/fetchingPartitionedBlobURL.md +7 -0
  496. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormAriaLabelledByToNonExistingId.md +8 -0
  497. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  498. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormDuplicateIdForInputError.md +5 -0
  499. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  500. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  501. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  502. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormInputWithNoLabelError.md +5 -0
  503. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  504. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormLabelForNameError.md +5 -0
  505. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormLabelHasNeitherForNorNestedInput.md +5 -0
  506. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericResponseWasBlockedByORB.md +4 -0
  507. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/heavyAd.md +10 -0
  508. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/mixedContent.md +5 -0
  509. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/navigatingPartitionedBlobURL.md +5 -0
  510. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  511. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/propertyRuleInvalidNameIssue.md +3 -0
  512. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/propertyRuleIssue.md +7 -0
  513. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  514. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  515. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  516. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  517. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  518. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  519. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedArrayBuffer.md +7 -0
  520. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  521. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  522. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  523. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  524. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  525. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  526. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  527. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  528. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  529. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  530. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  531. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  532. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  533. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  534. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  535. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  536. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  537. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  538. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  539. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  540. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  541. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  542. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  543. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriInvalidSignatureHeader.md +14 -0
  544. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriInvalidSignatureInputHeader.md +15 -0
  545. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriMissingSignatureHeader.md +8 -0
  546. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriMissingSignatureInputHeader.md +7 -0
  547. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  548. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  549. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  550. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  551. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  552. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  553. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  554. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  555. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  556. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  557. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  558. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  559. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  560. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriValidationFailedIntegrityMismatch.md +12 -0
  561. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriValidationFailedInvalidLength.md +5 -0
  562. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriValidationFailedSignatureExpired.md +6 -0
  563. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  564. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/stylesheetLateImport.md +4 -0
  565. package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/stylesheetRequestFailed.md +3 -0
  566. package/client/dist/chrome-devtools-ui/models/issues_manager/issues_manager.js +1 -0
  567. package/client/dist/chrome-devtools-ui/models/javascript_metadata/javascript_metadata.js +1 -0
  568. package/client/dist/chrome-devtools-ui/models/live-metrics/live-metrics.js +1 -0
  569. package/client/dist/chrome-devtools-ui/models/live-metrics/web-vitals-injected/spec/spec.js +1 -0
  570. package/client/dist/chrome-devtools-ui/models/live-metrics/web-vitals-injected/web-vitals-injected.generated.js +1 -0
  571. package/client/dist/chrome-devtools-ui/models/logs/logs-meta.js +1 -0
  572. package/client/dist/chrome-devtools-ui/models/logs/logs.js +1 -0
  573. package/client/dist/chrome-devtools-ui/models/persistence/persistence-meta.js +1 -0
  574. package/client/dist/chrome-devtools-ui/models/persistence/persistence.js +1 -0
  575. package/client/dist/chrome-devtools-ui/models/project_settings/project_settings.js +1 -0
  576. package/client/dist/chrome-devtools-ui/models/react_native/react_native.js +1 -0
  577. package/client/dist/chrome-devtools-ui/models/source_map_scopes/source_map_scopes.js +1 -0
  578. package/client/dist/chrome-devtools-ui/models/text_utils/text_utils.js +1 -0
  579. package/client/dist/chrome-devtools-ui/models/trace/extras/extras.js +1 -0
  580. package/client/dist/chrome-devtools-ui/models/trace/handlers/handlers.js +1 -0
  581. package/client/dist/chrome-devtools-ui/models/trace/helpers/helpers.js +1 -0
  582. package/client/dist/chrome-devtools-ui/models/trace/insights/insights.js +1 -0
  583. package/client/dist/chrome-devtools-ui/models/trace/lantern/core/core.js +1 -0
  584. package/client/dist/chrome-devtools-ui/models/trace/lantern/graph/graph.js +1 -0
  585. package/client/dist/chrome-devtools-ui/models/trace/lantern/lantern.js +1 -0
  586. package/client/dist/chrome-devtools-ui/models/trace/lantern/metrics/metrics.js +1 -0
  587. package/client/dist/chrome-devtools-ui/models/trace/lantern/simulation/simulation.js +1 -0
  588. package/client/dist/chrome-devtools-ui/models/trace/lantern/types/types.js +1 -0
  589. package/client/dist/chrome-devtools-ui/models/trace/trace.js +1 -0
  590. package/client/dist/chrome-devtools-ui/models/trace/types/types.js +1 -0
  591. package/client/dist/chrome-devtools-ui/models/workspace/workspace.js +1 -0
  592. package/client/dist/chrome-devtools-ui/models/workspace_diff/workspace_diff.js +1 -0
  593. package/client/dist/chrome-devtools-ui/ndb_app.html +24 -0
  594. package/client/dist/chrome-devtools-ui/node_app.html +24 -0
  595. package/client/dist/chrome-devtools-ui/panels/accessibility/accessibility-meta.js +1 -0
  596. package/client/dist/chrome-devtools-ui/panels/accessibility/accessibility.js +1 -0
  597. package/client/dist/chrome-devtools-ui/panels/ai_assistance/ai_assistance-meta.js +1 -0
  598. package/client/dist/chrome-devtools-ui/panels/ai_assistance/ai_assistance.js +512 -0
  599. package/client/dist/chrome-devtools-ui/panels/animation/animation-meta.js +1 -0
  600. package/client/dist/chrome-devtools-ui/panels/animation/animation.js +1 -0
  601. package/client/dist/chrome-devtools-ui/panels/application/application-meta.js +1 -0
  602. package/client/dist/chrome-devtools-ui/panels/application/application.js +107 -0
  603. package/client/dist/chrome-devtools-ui/panels/application/components/components.js +765 -0
  604. package/client/dist/chrome-devtools-ui/panels/application/preloading/components/components.js +362 -0
  605. package/client/dist/chrome-devtools-ui/panels/application/preloading/helper/helper.js +1 -0
  606. package/client/dist/chrome-devtools-ui/panels/autofill/autofill-meta.js +1 -0
  607. package/client/dist/chrome-devtools-ui/panels/autofill/autofill.js +107 -0
  608. package/client/dist/chrome-devtools-ui/panels/browser_debugger/browser_debugger-meta.js +1 -0
  609. package/client/dist/chrome-devtools-ui/panels/browser_debugger/browser_debugger.js +1 -0
  610. package/client/dist/chrome-devtools-ui/panels/changes/changes-meta.js +1 -0
  611. package/client/dist/chrome-devtools-ui/panels/changes/changes.js +31 -0
  612. package/client/dist/chrome-devtools-ui/panels/common/common.js +45 -0
  613. package/client/dist/chrome-devtools-ui/panels/console/console-meta.js +1 -0
  614. package/client/dist/chrome-devtools-ui/panels/console/console.js +6 -0
  615. package/client/dist/chrome-devtools-ui/panels/console_counters/console_counters-meta.js +1 -0
  616. package/client/dist/chrome-devtools-ui/panels/console_counters/console_counters.js +1 -0
  617. package/client/dist/chrome-devtools-ui/panels/coverage/coverage-meta.js +1 -0
  618. package/client/dist/chrome-devtools-ui/panels/coverage/coverage.js +1 -0
  619. package/client/dist/chrome-devtools-ui/panels/css_overview/components/components.js +23 -0
  620. package/client/dist/chrome-devtools-ui/panels/css_overview/css_overview-meta.js +1 -0
  621. package/client/dist/chrome-devtools-ui/panels/css_overview/css_overview.js +148 -0
  622. package/client/dist/chrome-devtools-ui/panels/developer_resources/developer_resources-meta.js +1 -0
  623. package/client/dist/chrome-devtools-ui/panels/developer_resources/developer_resources.js +48 -0
  624. package/client/dist/chrome-devtools-ui/panels/elements/components/components.js +250 -0
  625. package/client/dist/chrome-devtools-ui/panels/elements/elements-meta.js +1 -0
  626. package/client/dist/chrome-devtools-ui/panels/elements/elements.js +67 -0
  627. package/client/dist/chrome-devtools-ui/panels/emulation/components/components.js +39 -0
  628. package/client/dist/chrome-devtools-ui/panels/emulation/emulation-meta.js +1 -0
  629. package/client/dist/chrome-devtools-ui/panels/emulation/emulation.js +1 -0
  630. package/client/dist/chrome-devtools-ui/panels/event_listeners/event_listeners.js +1 -0
  631. package/client/dist/chrome-devtools-ui/panels/explain/explain-meta.js +1 -0
  632. package/client/dist/chrome-devtools-ui/panels/explain/explain.js +231 -0
  633. package/client/dist/chrome-devtools-ui/panels/issues/components/components.js +14 -0
  634. package/client/dist/chrome-devtools-ui/panels/issues/issues-meta.js +1 -0
  635. package/client/dist/chrome-devtools-ui/panels/issues/issues.js +1 -0
  636. package/client/dist/chrome-devtools-ui/panels/js_timeline/js_timeline-meta.js +1 -0
  637. package/client/dist/chrome-devtools-ui/panels/js_timeline/js_timeline.js +2 -0
  638. package/client/dist/chrome-devtools-ui/panels/layer_viewer/layer_viewer-meta.js +1 -0
  639. package/client/dist/chrome-devtools-ui/panels/layer_viewer/layer_viewer.js +1 -0
  640. package/client/dist/chrome-devtools-ui/panels/layers/layers-meta.js +1 -0
  641. package/client/dist/chrome-devtools-ui/panels/layers/layers.js +1 -0
  642. package/client/dist/chrome-devtools-ui/panels/lighthouse/lighthouse-meta.js +1 -0
  643. package/client/dist/chrome-devtools-ui/panels/lighthouse/lighthouse.js +65 -0
  644. package/client/dist/chrome-devtools-ui/panels/linear_memory_inspector/components/components.js +179 -0
  645. package/client/dist/chrome-devtools-ui/panels/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
  646. package/client/dist/chrome-devtools-ui/panels/linear_memory_inspector/linear_memory_inspector.js +1 -0
  647. package/client/dist/chrome-devtools-ui/panels/media/media-meta.js +1 -0
  648. package/client/dist/chrome-devtools-ui/panels/media/media.js +25 -0
  649. package/client/dist/chrome-devtools-ui/panels/mobile_throttling/mobile_throttling-meta.js +1 -0
  650. package/client/dist/chrome-devtools-ui/panels/mobile_throttling/mobile_throttling.js +1 -0
  651. package/client/dist/chrome-devtools-ui/panels/network/components/components.js +346 -0
  652. package/client/dist/chrome-devtools-ui/panels/network/forward/forward.js +1 -0
  653. package/client/dist/chrome-devtools-ui/panels/network/network-meta.js +1 -0
  654. package/client/dist/chrome-devtools-ui/panels/network/network.js +1 -0
  655. package/client/dist/chrome-devtools-ui/panels/performance_monitor/performance_monitor-meta.js +1 -0
  656. package/client/dist/chrome-devtools-ui/panels/performance_monitor/performance_monitor.js +1 -0
  657. package/client/dist/chrome-devtools-ui/panels/profiler/profiler-meta.js +1 -0
  658. package/client/dist/chrome-devtools-ui/panels/profiler/profiler.js +8 -0
  659. package/client/dist/chrome-devtools-ui/panels/protocol_monitor/protocol_monitor-meta.js +1 -0
  660. package/client/dist/chrome-devtools-ui/panels/protocol_monitor/protocol_monitor.js +293 -0
  661. package/client/dist/chrome-devtools-ui/panels/react_devtools/react_devtools.js +1 -0
  662. package/client/dist/chrome-devtools-ui/panels/react_devtools/react_devtools_components-meta.js +1 -0
  663. package/client/dist/chrome-devtools-ui/panels/react_devtools/react_devtools_profiler-meta.js +1 -0
  664. package/client/dist/chrome-devtools-ui/panels/recorder/components/components.js +686 -0
  665. package/client/dist/chrome-devtools-ui/panels/recorder/controllers/controllers.js +1 -0
  666. package/client/dist/chrome-devtools-ui/panels/recorder/converters/converters.js +1 -0
  667. package/client/dist/chrome-devtools-ui/panels/recorder/extensions/extensions.js +1 -0
  668. package/client/dist/chrome-devtools-ui/panels/recorder/injected/injected.generated.js +1 -0
  669. package/client/dist/chrome-devtools-ui/panels/recorder/injected/injected.js +1 -0
  670. package/client/dist/chrome-devtools-ui/panels/recorder/models/models.js +1 -0
  671. package/client/dist/chrome-devtools-ui/panels/recorder/recorder-actions/recorder-actions.js +3 -0
  672. package/client/dist/chrome-devtools-ui/panels/recorder/recorder-meta.js +1 -0
  673. package/client/dist/chrome-devtools-ui/panels/recorder/recorder.js +126 -0
  674. package/client/dist/chrome-devtools-ui/panels/recorder/util/util.js +1 -0
  675. package/client/dist/chrome-devtools-ui/panels/rn_welcome/rn_welcome-meta.js +1 -0
  676. package/client/dist/chrome-devtools-ui/panels/rn_welcome/rn_welcome.js +62 -0
  677. package/client/dist/chrome-devtools-ui/panels/screencast/screencast-meta.js +1 -0
  678. package/client/dist/chrome-devtools-ui/panels/screencast/screencast.js +1 -0
  679. package/client/dist/chrome-devtools-ui/panels/search/search.js +1 -0
  680. package/client/dist/chrome-devtools-ui/panels/security/security-meta.js +1 -0
  681. package/client/dist/chrome-devtools-ui/panels/security/security.js +178 -0
  682. package/client/dist/chrome-devtools-ui/panels/sensors/sensors-meta.js +1 -0
  683. package/client/dist/chrome-devtools-ui/panels/sensors/sensors.js +1 -0
  684. package/client/dist/chrome-devtools-ui/panels/settings/components/components.js +22 -0
  685. package/client/dist/chrome-devtools-ui/panels/settings/emulation/components/components.js +221 -0
  686. package/client/dist/chrome-devtools-ui/panels/settings/emulation/emulation-meta.js +1 -0
  687. package/client/dist/chrome-devtools-ui/panels/settings/emulation/emulation.js +1 -0
  688. package/client/dist/chrome-devtools-ui/panels/settings/emulation/utils/utils.js +1 -0
  689. package/client/dist/chrome-devtools-ui/panels/settings/settings-meta.js +1 -0
  690. package/client/dist/chrome-devtools-ui/panels/settings/settings.js +91 -0
  691. package/client/dist/chrome-devtools-ui/panels/snippets/snippets.js +1 -0
  692. package/client/dist/chrome-devtools-ui/panels/sources/components/components.js +162 -0
  693. package/client/dist/chrome-devtools-ui/panels/sources/sources-meta.js +1 -0
  694. package/client/dist/chrome-devtools-ui/panels/sources/sources.js +2 -0
  695. package/client/dist/chrome-devtools-ui/panels/timeline/components/components.js +1063 -0
  696. package/client/dist/chrome-devtools-ui/panels/timeline/components/insights/insights.js +262 -0
  697. package/client/dist/chrome-devtools-ui/panels/timeline/extensions/extensions.js +1 -0
  698. package/client/dist/chrome-devtools-ui/panels/timeline/overlays/components/components.js +190 -0
  699. package/client/dist/chrome-devtools-ui/panels/timeline/overlays/overlays.js +1 -0
  700. package/client/dist/chrome-devtools-ui/panels/timeline/timeline-meta.js +1 -0
  701. package/client/dist/chrome-devtools-ui/panels/timeline/timeline.js +43 -0
  702. package/client/dist/chrome-devtools-ui/panels/timeline/utils/utils.js +1 -0
  703. package/client/dist/chrome-devtools-ui/panels/utils/utils.js +1 -0
  704. package/client/dist/chrome-devtools-ui/panels/web_audio/graph_visualizer/graph_visualizer.js +1 -0
  705. package/client/dist/chrome-devtools-ui/panels/web_audio/web_audio-meta.js +1 -0
  706. package/client/dist/chrome-devtools-ui/panels/web_audio/web_audio.js +19 -0
  707. package/client/dist/chrome-devtools-ui/panels/webauthn/webauthn-meta.js +1 -0
  708. package/client/dist/chrome-devtools-ui/panels/webauthn/webauthn.js +1 -0
  709. package/client/dist/chrome-devtools-ui/panels/whats_new/resources/WNDT.md +6 -0
  710. package/client/dist/chrome-devtools-ui/panels/whats_new/whats_new-meta.js +1 -0
  711. package/client/dist/chrome-devtools-ui/panels/whats_new/whats_new.js +32 -0
  712. package/client/dist/chrome-devtools-ui/rehydrated_devtools_app.html +24 -0
  713. package/client/dist/chrome-devtools-ui/rn_fusebox.html +24 -0
  714. package/client/dist/chrome-devtools-ui/services/puppeteer/puppeteer.js +1 -0
  715. package/client/dist/chrome-devtools-ui/services/trace_bounds/trace_bounds.js +1 -0
  716. package/client/dist/chrome-devtools-ui/services/tracing/tracing.js +1 -0
  717. package/client/dist/chrome-devtools-ui/services/window_bounds/window_bounds.js +1 -0
  718. package/client/dist/chrome-devtools-ui/third_party/acorn/acorn.js +1 -0
  719. package/client/dist/chrome-devtools-ui/third_party/chromium/client-variations/client-variations.js +1 -0
  720. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/angular.js +2 -0
  721. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/codemirror.js +2 -0
  722. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/cpp.js +2 -0
  723. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/java.js +2 -0
  724. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/legacy.js +2 -0
  725. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/less.js +2 -0
  726. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/markdown.js +2 -0
  727. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/php.js +2 -0
  728. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/python.js +2 -0
  729. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/sass.js +2 -0
  730. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/svelte.js +2 -0
  731. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/vue.js +2 -0
  732. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/wast.js +2 -0
  733. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/xml.js +2 -0
  734. package/client/dist/chrome-devtools-ui/third_party/codemirror.next/codemirror.next.js +2 -0
  735. package/client/dist/chrome-devtools-ui/third_party/csp_evaluator/csp_evaluator.js +194 -0
  736. package/client/dist/chrome-devtools-ui/third_party/diff/diff.js +1 -0
  737. package/client/dist/chrome-devtools-ui/third_party/i18n/i18n.js +1 -0
  738. package/client/dist/chrome-devtools-ui/third_party/intl-messageformat/intl-messageformat.js +15 -0
  739. package/client/dist/chrome-devtools-ui/third_party/json5/json5.js +1 -0
  740. package/client/dist/chrome-devtools-ui/third_party/legacy-javascript/legacy-javascript.js +7 -0
  741. package/client/dist/chrome-devtools-ui/third_party/lighthouse/lighthouse-dt-bundle.js +3023 -0
  742. package/client/dist/chrome-devtools-ui/third_party/lighthouse/report/report.js +39 -0
  743. package/client/dist/chrome-devtools-ui/third_party/lit/lit.js +121 -0
  744. package/client/dist/chrome-devtools-ui/third_party/marked/marked.js +1 -0
  745. package/client/dist/chrome-devtools-ui/third_party/puppeteer/puppeteer.js +373 -0
  746. package/client/dist/chrome-devtools-ui/third_party/puppeteer-replay/puppeteer-replay.js +1 -0
  747. package/client/dist/chrome-devtools-ui/third_party/react-devtools/react-devtools.js +41 -0
  748. package/client/dist/chrome-devtools-ui/third_party/third-party-web/third-party-web.js +1 -0
  749. package/client/dist/chrome-devtools-ui/third_party/wasmparser/wasmparser.js +1 -0
  750. package/client/dist/chrome-devtools-ui/third_party/web-vitals/web-vitals.js +1 -0
  751. package/client/dist/chrome-devtools-ui/ui/components/adorners/adorners.js +1 -0
  752. package/client/dist/chrome-devtools-ui/ui/components/buttons/buttons.js +17 -0
  753. package/client/dist/chrome-devtools-ui/ui/components/cards/cards.js +10 -0
  754. package/client/dist/chrome-devtools-ui/ui/components/chrome_link/chrome_link.js +6 -0
  755. package/client/dist/chrome-devtools-ui/ui/components/code_highlighter/code_highlighter.js +1 -0
  756. package/client/dist/chrome-devtools-ui/ui/components/dialogs/dialogs.js +61 -0
  757. package/client/dist/chrome-devtools-ui/ui/components/diff_view/diff_view.js +8 -0
  758. package/client/dist/chrome-devtools-ui/ui/components/expandable_list/expandable_list.js +17 -0
  759. package/client/dist/chrome-devtools-ui/ui/components/floating_button/floating_button.js +1 -0
  760. package/client/dist/chrome-devtools-ui/ui/components/helpers/helpers.js +1 -0
  761. package/client/dist/chrome-devtools-ui/ui/components/highlighting/highlighting.js +1 -0
  762. package/client/dist/chrome-devtools-ui/ui/components/icon_button/icon_button.js +13 -0
  763. package/client/dist/chrome-devtools-ui/ui/components/input/input.js +1 -0
  764. package/client/dist/chrome-devtools-ui/ui/components/issue_counter/issue_counter.js +10 -0
  765. package/client/dist/chrome-devtools-ui/ui/components/legacy_wrapper/legacy_wrapper.js +1 -0
  766. package/client/dist/chrome-devtools-ui/ui/components/linkifier/linkifier.js +1 -0
  767. package/client/dist/chrome-devtools-ui/ui/components/markdown_view/markdown_view.js +51 -0
  768. package/client/dist/chrome-devtools-ui/ui/components/menus/menus.js +71 -0
  769. package/client/dist/chrome-devtools-ui/ui/components/node_text/node_text.js +3 -0
  770. package/client/dist/chrome-devtools-ui/ui/components/panel_feedback/panel_feedback.js +37 -0
  771. package/client/dist/chrome-devtools-ui/ui/components/panel_introduction_steps/panel_introduction_steps.js +9 -0
  772. package/client/dist/chrome-devtools-ui/ui/components/render_coordinator/render_coordinator.js +1 -0
  773. package/client/dist/chrome-devtools-ui/ui/components/report_view/report_view.js +21 -0
  774. package/client/dist/chrome-devtools-ui/ui/components/request_link_icon/request_link_icon.js +8 -0
  775. package/client/dist/chrome-devtools-ui/ui/components/settings/settings.js +20 -0
  776. package/client/dist/chrome-devtools-ui/ui/components/spinners/spinners.js +16 -0
  777. package/client/dist/chrome-devtools-ui/ui/components/srgb_overlay/srgb_overlay.js +6 -0
  778. package/client/dist/chrome-devtools-ui/ui/components/suggestion_input/suggestion_input.js +29 -0
  779. package/client/dist/chrome-devtools-ui/ui/components/survey_link/survey_link.js +7 -0
  780. package/client/dist/chrome-devtools-ui/ui/components/switch/switch.js +10 -0
  781. package/client/dist/chrome-devtools-ui/ui/components/text_editor/text_editor.js +1 -0
  782. package/client/dist/chrome-devtools-ui/ui/components/text_prompt/text_prompt.js +4 -0
  783. package/client/dist/chrome-devtools-ui/ui/components/tooltips/tooltips.js +7 -0
  784. package/client/dist/chrome-devtools-ui/ui/components/tree_outline/tree_outline.js +32 -0
  785. package/client/dist/chrome-devtools-ui/ui/legacy/components/color_picker/color_picker.js +1 -0
  786. package/client/dist/chrome-devtools-ui/ui/legacy/components/cookie_table/cookie_table.js +85 -0
  787. package/client/dist/chrome-devtools-ui/ui/legacy/components/data_grid/data_grid.js +1 -0
  788. package/client/dist/chrome-devtools-ui/ui/legacy/components/inline_editor/inline_editor.js +58 -0
  789. package/client/dist/chrome-devtools-ui/ui/legacy/components/object_ui/object_ui-meta.js +1 -0
  790. package/client/dist/chrome-devtools-ui/ui/legacy/components/object_ui/object_ui.js +7 -0
  791. package/client/dist/chrome-devtools-ui/ui/legacy/components/perf_ui/perf_ui-meta.js +1 -0
  792. package/client/dist/chrome-devtools-ui/ui/legacy/components/perf_ui/perf_ui.js +60 -0
  793. package/client/dist/chrome-devtools-ui/ui/legacy/components/quick_open/quick_open-meta.js +1 -0
  794. package/client/dist/chrome-devtools-ui/ui/legacy/components/quick_open/quick_open.js +1 -0
  795. package/client/dist/chrome-devtools-ui/ui/legacy/components/source_frame/source_frame-meta.js +1 -0
  796. package/client/dist/chrome-devtools-ui/ui/legacy/components/source_frame/source_frame.js +1 -0
  797. package/client/dist/chrome-devtools-ui/ui/legacy/components/utils/utils.js +1 -0
  798. package/client/dist/chrome-devtools-ui/ui/legacy/legacy.js +59 -0
  799. package/client/dist/chrome-devtools-ui/ui/legacy/theme_support/theme_support.js +1 -0
  800. package/client/dist/chrome-devtools-ui/ui/lit/lit.js +1 -0
  801. package/client/dist/chrome-devtools-ui/ui/visual_logging/visual_logging.js +1 -0
  802. package/client/dist/chrome-devtools-ui/worker_app.html +24 -0
  803. package/client/dist/index.html +3 -3
  804. package/package.json +4 -1
  805. package/packages/simdeck-test/dist/index.d.ts +7 -1
  806. package/client/dist/assets/index-BHTf_1bs.js +0 -9
  807. package/client/dist/assets/index-PP2opq5o.css +0 -1
@@ -0,0 +1,1700 @@
1
+ /*
2
+ * Copyright (C) 2010 Google Inc. All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions are
6
+ * met:
7
+ *
8
+ * * Redistributions of source code must retain the above copyright
9
+ * notice, this list of conditions and the following disclaimer.
10
+ * * Redistributions in binary form must reproduce the above
11
+ * copyright notice, this list of conditions and the following disclaimer
12
+ * in the documentation and/or other materials provided with the
13
+ * distribution.
14
+ * * Neither the name of Google Inc. nor the names of its
15
+ * contributors may be used to endorse or promote products derived from
16
+ * this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
+ */
30
+
31
+ /**
32
+ * @fileoverview This file contains small testing framework along with the
33
+ * test suite for the frontend. These tests are a part of the continues build
34
+ * and are executed by the devtools_browsertest.cc as a part of the
35
+ * Interactive UI Test suite.
36
+ * FIXME: change field naming style to use trailing underscore.
37
+ */
38
+
39
+ (function createTestSuite(window) {
40
+ // 'Tests.js' is loaded as a classic script so we can't use static imports for these modules.
41
+ /** @type {import('./core/common/common.js')} */
42
+ let Common;
43
+ /** @type {import('./core/host/host.js')} */
44
+ let HostModule;
45
+ /** @type {import('./core/root/root.js')} */
46
+ let Root;
47
+ /** @type {import('./core/sdk/sdk.js')} */
48
+ let SDK;
49
+ /** @type {import('./panels/sources/sources.js')} */
50
+ let Sources;
51
+ /** @type {import('./panels/timeline/timeline.js')} */
52
+ let Timeline;
53
+ /** @type {import('./ui/legacy/legacy.js')} */
54
+ let UI;
55
+ /** @type {import('./models/workspace/workspace.js')} */
56
+ let Workspace;
57
+ const TestSuite = class {
58
+ /**
59
+ * Test suite for interactive UI tests.
60
+ * @param {Object} domAutomationController DomAutomationController instance.
61
+ */
62
+ constructor(domAutomationController) {
63
+ this.domAutomationController_ = domAutomationController;
64
+ this.controlTaken_ = false;
65
+ this.timerId_ = -1;
66
+ this._asyncInvocationId = 0;
67
+ }
68
+
69
+ /**
70
+ * Key event with given key identifier.
71
+ */
72
+ static createKeyEvent(key) {
73
+ return new KeyboardEvent('keydown', {bubbles: true, cancelable: true, key});
74
+ }
75
+ };
76
+
77
+ /**
78
+ * Reports test failure.
79
+ * @param {string} message Failure description.
80
+ */
81
+ TestSuite.prototype.fail = function(message) {
82
+ if (this.controlTaken_) {
83
+ this.reportFailure_(message);
84
+ } else {
85
+ throw message;
86
+ }
87
+ };
88
+
89
+ /**
90
+ * Equals assertion tests that expected === actual.
91
+ * @param {!Object|boolean} expected Expected object.
92
+ * @param {!Object|boolean} actual Actual object.
93
+ * @param {string} opt_message User message to print if the test fails.
94
+ */
95
+ TestSuite.prototype.assertEquals = function(expected, actual, opt_message) {
96
+ if (expected !== actual) {
97
+ let message = 'Expected: \'' + expected + '\', but was \'' + actual + '\'';
98
+ if (opt_message) {
99
+ message = opt_message + '(' + message + ')';
100
+ }
101
+ this.fail(message);
102
+ }
103
+ };
104
+
105
+ /**
106
+ * True assertion tests that value == true.
107
+ * @param {!Object} value Actual object.
108
+ * @param {string} opt_message User message to print if the test fails.
109
+ */
110
+ TestSuite.prototype.assertTrue = function(value, opt_message) {
111
+ this.assertEquals(true, Boolean(value), opt_message);
112
+ };
113
+
114
+ /**
115
+ * Takes control over execution.
116
+ * @param {{slownessFactor:number}=} options
117
+ */
118
+ TestSuite.prototype.takeControl = function(options) {
119
+ const {slownessFactor} = {slownessFactor: 1, ...options};
120
+ this.controlTaken_ = true;
121
+ // Set up guard timer.
122
+ const self = this;
123
+ const timeoutInSec = 20 * slownessFactor;
124
+ this.timerId_ = setTimeout(function() {
125
+ self.reportFailure_(`Timeout exceeded: ${timeoutInSec} sec`);
126
+ }, timeoutInSec * 1000);
127
+ };
128
+
129
+ /**
130
+ * Releases control over execution.
131
+ */
132
+ TestSuite.prototype.releaseControl = function() {
133
+ if (this.timerId_ !== -1) {
134
+ clearTimeout(this.timerId_);
135
+ this.timerId_ = -1;
136
+ }
137
+ this.controlTaken_ = false;
138
+ this.reportOk_();
139
+ };
140
+
141
+ /**
142
+ * Async tests use this one to report that they are completed.
143
+ */
144
+ TestSuite.prototype.reportOk_ = function() {
145
+ this.domAutomationController_.send('[OK]');
146
+ };
147
+
148
+ /**
149
+ * Async tests use this one to report failures.
150
+ */
151
+ TestSuite.prototype.reportFailure_ = function(error) {
152
+ if (this.timerId_ !== -1) {
153
+ clearTimeout(this.timerId_);
154
+ this.timerId_ = -1;
155
+ }
156
+ this.domAutomationController_.send('[FAILED] ' + error);
157
+ };
158
+
159
+ TestSuite.prototype.setupLegacyFilesForTest = async function() {
160
+ // 'Tests.js' is executed on 'about:blank' so we can't use `import` directly without
161
+ // specifying the full devtools://devtools/bundled URL.
162
+ ([
163
+ Common,
164
+ HostModule,
165
+ Root,
166
+ SDK,
167
+ Sources,
168
+ Timeline,
169
+ UI,
170
+ Workspace,
171
+ ] =
172
+ await Promise.all([
173
+ self.runtime.loadLegacyModule('core/common/common.js'),
174
+ self.runtime.loadLegacyModule('core/host/host.js'),
175
+ self.runtime.loadLegacyModule('core/root/root.js'),
176
+ self.runtime.loadLegacyModule('core/sdk/sdk.js'),
177
+ self.runtime.loadLegacyModule('panels/sources/sources.js'),
178
+ self.runtime.loadLegacyModule('panels/timeline/timeline.js'),
179
+ self.runtime.loadLegacyModule('ui/legacy/legacy.js'),
180
+ self.runtime.loadLegacyModule('models/workspace/workspace.js'),
181
+ ]));
182
+
183
+ // We have to map 'Host.InspectorFrontendHost' as the C++ uses it directly.
184
+ self.Host = {};
185
+ self.Host.InspectorFrontendHost = HostModule.InspectorFrontendHost.InspectorFrontendHostInstance;
186
+ self.Host.InspectorFrontendHostAPI = HostModule.InspectorFrontendHostAPI;
187
+ };
188
+
189
+ /**
190
+ * Run specified test on a fresh instance of the test suite.
191
+ * @param {Array<string>} args method name followed by its parameters.
192
+ */
193
+ TestSuite.prototype.dispatchOnTestSuite = async function(args) {
194
+ const methodName = args.shift();
195
+ try {
196
+ await this[methodName].apply(this, args);
197
+ if (!this.controlTaken_) {
198
+ this.reportOk_();
199
+ }
200
+ } catch (e) {
201
+ this.reportFailure_(e);
202
+ }
203
+ };
204
+
205
+ /**
206
+ * Wrap an async method with TestSuite.{takeControl(), releaseControl()}
207
+ * and invoke TestSuite.reportOk_ upon completion.
208
+ * @param {Array<string>} args method name followed by its parameters.
209
+ */
210
+ TestSuite.prototype.waitForAsync = function(var_args) {
211
+ const args = Array.prototype.slice.call(arguments);
212
+ this.takeControl();
213
+ args.push(this.releaseControl.bind(this));
214
+ this.dispatchOnTestSuite(args);
215
+ };
216
+
217
+ /**
218
+ * Overrides the method with specified name until it's called first time.
219
+ * @param {!Object} receiver An object whose method to override.
220
+ * @param {string} methodName Name of the method to override.
221
+ * @param {!Function} override A function that should be called right after the
222
+ * overridden method returns.
223
+ * @param {?boolean} opt_sticky Whether restore original method after first run
224
+ * or not.
225
+ */
226
+ TestSuite.prototype.addSniffer = function(receiver, methodName, override, opt_sticky) {
227
+ const orig = receiver[methodName];
228
+ if (typeof orig !== 'function') {
229
+ this.fail('Cannot find method to override: ' + methodName);
230
+ }
231
+ const test = this;
232
+ receiver[methodName] = function(var_args) {
233
+ let result;
234
+ try {
235
+ result = orig.apply(this, arguments);
236
+ } finally {
237
+ if (!opt_sticky) {
238
+ receiver[methodName] = orig;
239
+ }
240
+ }
241
+ // In case of exception the override won't be called.
242
+ try {
243
+ override.apply(this, arguments);
244
+ } catch (e) {
245
+ test.fail('Exception in overriden method \'' + methodName + '\': ' + e);
246
+ }
247
+ return result;
248
+ };
249
+ };
250
+
251
+ /**
252
+ * Waits for current throttler invocations, if any.
253
+ * @param {!Common.Throttler} throttler
254
+ * @param {function()} callback
255
+ */
256
+ TestSuite.prototype.waitForThrottler = function(throttler, callback) {
257
+ const test = this;
258
+ let scheduleShouldFail = true;
259
+ test.addSniffer(throttler, 'schedule', onSchedule);
260
+
261
+ function hasSomethingScheduled() {
262
+ return throttler._isRunningProcess || throttler._process;
263
+ }
264
+
265
+ function checkState() {
266
+ if (!hasSomethingScheduled()) {
267
+ scheduleShouldFail = false;
268
+ callback();
269
+ return;
270
+ }
271
+
272
+ test.addSniffer(throttler, 'processCompletedForTests', checkState);
273
+ }
274
+
275
+ function onSchedule() {
276
+ if (scheduleShouldFail) {
277
+ test.fail('Unexpected Throttler.schedule');
278
+ }
279
+ }
280
+
281
+ checkState();
282
+ };
283
+
284
+ /**
285
+ * @param {string} panelName Name of the panel to show.
286
+ */
287
+ TestSuite.prototype.showPanel = function(panelName) {
288
+ return UI.InspectorView.InspectorView.instance().showPanel(panelName);
289
+ };
290
+
291
+ // UI Tests
292
+
293
+ /**
294
+ * Tests that scripts tab can be open and populated with inspected scripts.
295
+ */
296
+ TestSuite.prototype.testShowScriptsTab = function() {
297
+ const test = this;
298
+ this.showPanel('sources').then(function() {
299
+ // There should be at least main page script.
300
+ this._waitUntilScriptsAreParsed(['debugger_test_page.html'], function() {
301
+ test.releaseControl();
302
+ });
303
+ }.bind(this));
304
+ // Wait until all scripts are added to the debugger.
305
+ this.takeControl();
306
+ };
307
+
308
+ /**
309
+ * Tests that Recorder tab can be open.
310
+ */
311
+ TestSuite.prototype.testShowRecorderTab = function() {
312
+ this.showPanel('chrome-recorder')
313
+ .then(() => {
314
+ this.releaseControl();
315
+ })
316
+ .catch(err => {
317
+ this.fail('Loading Recorder panel failed: ' + err.message);
318
+ });
319
+ this.takeControl();
320
+ };
321
+
322
+ /**
323
+ * Tests that scripts list contains content scripts.
324
+ */
325
+ TestSuite.prototype.testContentScriptIsPresent = function() {
326
+ const test = this;
327
+ this.showPanel('sources').then(function() {
328
+ test._waitUntilScriptsAreParsed(['page_with_content_script.html', 'simple_content_script.js'], function() {
329
+ test.releaseControl();
330
+ });
331
+ });
332
+
333
+ // Wait until all scripts are added to the debugger.
334
+ this.takeControl();
335
+ };
336
+
337
+ /**
338
+ * Tests that scripts are not duplicaed on Scripts tab switch.
339
+ */
340
+ TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function() {
341
+ const test = this;
342
+
343
+ function switchToElementsTab() {
344
+ test.showPanel('elements').then(function() {
345
+ setTimeout(switchToScriptsTab, 0);
346
+ });
347
+ }
348
+
349
+ function switchToScriptsTab() {
350
+ test.showPanel('sources').then(function() {
351
+ setTimeout(checkScriptsPanel, 0);
352
+ });
353
+ }
354
+
355
+ function checkScriptsPanel() {
356
+ test.assertTrue(test._scriptsAreParsed(['debugger_test_page.html']), 'Some scripts are missing.');
357
+ checkNoDuplicates();
358
+ test.releaseControl();
359
+ }
360
+
361
+ function checkNoDuplicates() {
362
+ const uiSourceCodes = test.nonAnonymousUISourceCodes_();
363
+ for (let i = 0; i < uiSourceCodes.length; i++) {
364
+ for (let j = i + 1; j < uiSourceCodes.length; j++) {
365
+ test.assertTrue(
366
+ uiSourceCodes[i].url() !== uiSourceCodes[j].url(),
367
+ 'Found script duplicates: ' + test.uiSourceCodesToString_(uiSourceCodes));
368
+ }
369
+ }
370
+ }
371
+
372
+ this.showPanel('sources').then(function() {
373
+ test._waitUntilScriptsAreParsed(['debugger_test_page.html'], function() {
374
+ checkNoDuplicates();
375
+ setTimeout(switchToElementsTab, 0);
376
+ });
377
+ });
378
+
379
+ // Wait until all scripts are added to the debugger.
380
+ this.takeControl({slownessFactor: 10});
381
+ };
382
+
383
+ // Tests that debugger works correctly if pause event occurs when DevTools
384
+ // frontend is being loaded.
385
+ TestSuite.prototype.testPauseWhenLoadingDevTools = function() {
386
+ const debuggerModel =
387
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.model(SDK.DebuggerModel.DebuggerModel);
388
+ if (debuggerModel.debuggerPausedDetails) {
389
+ return;
390
+ }
391
+
392
+ this.showPanel('sources').then(function() {
393
+ // Script execution can already be paused.
394
+
395
+ this._waitForScriptPause(this.releaseControl.bind(this));
396
+ }.bind(this));
397
+
398
+ this.takeControl();
399
+ };
400
+
401
+ /**
402
+ * Tests network size.
403
+ */
404
+ TestSuite.prototype.testNetworkSize = function() {
405
+ const test = this;
406
+
407
+ function finishRequest(request, finishTime) {
408
+ test.assertEquals(25, request.resourceSize, 'Incorrect total data length');
409
+ test.releaseControl();
410
+ }
411
+
412
+ this.addSniffer(SDK.NetworkManager.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest);
413
+
414
+ // Reload inspected page to sniff network events
415
+ test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
416
+
417
+ this.takeControl({slownessFactor: 10});
418
+ };
419
+
420
+ /**
421
+ * Tests network sync size.
422
+ */
423
+ TestSuite.prototype.testNetworkSyncSize = function() {
424
+ const test = this;
425
+
426
+ function finishRequest(request, finishTime) {
427
+ test.assertEquals(25, request.resourceSize, 'Incorrect total data length');
428
+ test.releaseControl();
429
+ }
430
+
431
+ this.addSniffer(SDK.NetworkManager.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest);
432
+
433
+ // Send synchronous XHR to sniff network events
434
+ test.evaluateInConsole_(
435
+ 'let xhr = new XMLHttpRequest(); xhr.open("GET", "chunked", false); xhr.send(null);', function() {});
436
+
437
+ this.takeControl({slownessFactor: 10});
438
+ };
439
+
440
+ /**
441
+ * Tests network raw headers text.
442
+ */
443
+ TestSuite.prototype.testNetworkRawHeadersText = function() {
444
+ const test = this;
445
+
446
+ function finishRequest(request, finishTime) {
447
+ if (!request.responseHeadersText) {
448
+ test.fail('Failure: resource does not have response headers text');
449
+ }
450
+ const index = request.responseHeadersText.indexOf('Date:');
451
+ test.assertEquals(
452
+ 112, request.responseHeadersText.substring(index).length, 'Incorrect response headers text length');
453
+ test.releaseControl();
454
+ }
455
+
456
+ this.addSniffer(SDK.NetworkManager.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest);
457
+
458
+ // Reload inspected page to sniff network events
459
+ test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
460
+
461
+ this.takeControl({slownessFactor: 10});
462
+ };
463
+
464
+ /**
465
+ * Tests network timing.
466
+ */
467
+ TestSuite.prototype.testNetworkTiming = function() {
468
+ const test = this;
469
+
470
+ function finishRequest(request, finishTime) {
471
+ // Setting relaxed expectations to reduce flakiness.
472
+ // Server sends headers after 100ms, then sends data during another 100ms.
473
+ // We expect these times to be measured at least as 70ms.
474
+ test.assertTrue(
475
+ request.timing.receiveHeadersEnd - request.timing.connectStart >= 70,
476
+ 'Time between receiveHeadersEnd and connectStart should be >=70ms, but was ' +
477
+ 'receiveHeadersEnd=' + request.timing.receiveHeadersEnd +
478
+ ', connectStart=' + request.timing.connectStart + '.');
479
+ test.assertTrue(
480
+ request.responseReceivedTime - request.startTime >= 0.07,
481
+ 'Time between responseReceivedTime and startTime should be >=0.07s, but was ' +
482
+ 'responseReceivedTime=' + request.responseReceivedTime + ', startTime=' + request.startTime + '.');
483
+ test.assertTrue(
484
+ request.endTime - request.startTime >= 0.14,
485
+ 'Time between endTime and startTime should be >=0.14s, but was ' +
486
+ 'endtime=' + request.endTime + ', startTime=' + request.startTime + '.');
487
+
488
+ test.releaseControl();
489
+ }
490
+
491
+ this.addSniffer(SDK.NetworkManager.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest);
492
+
493
+ // Reload inspected page to sniff network events
494
+ test.evaluateInConsole_('window.location.reload(true);', function(resultText) {});
495
+
496
+ this.takeControl({slownessFactor: 10});
497
+ };
498
+
499
+ TestSuite.prototype.testPushTimes = function(url) {
500
+ const test = this;
501
+ let pendingRequestCount = 2;
502
+
503
+ function finishRequest(request, finishTime) {
504
+ test.assertTrue(
505
+ typeof request.timing.pushStart === 'number' && request.timing.pushStart > 0,
506
+ `pushStart is invalid: ${request.timing.pushStart}`);
507
+ test.assertTrue(typeof request.timing.pushEnd === 'number', `pushEnd is invalid: ${request.timing.pushEnd}`);
508
+ test.assertTrue(request.timing.pushStart < request.startTime, 'pushStart should be before startTime');
509
+ if (request.url().endsWith('?pushUseNullEndTime')) {
510
+ test.assertTrue(request.timing.pushEnd === 0, `pushEnd should be 0 but is ${request.timing.pushEnd}`);
511
+ } else {
512
+ test.assertTrue(
513
+ request.timing.pushStart < request.timing.pushEnd,
514
+ `pushStart should be before pushEnd (${request.timing.pushStart} >= ${request.timing.pushEnd})`);
515
+ // The below assertion is just due to the way we generate times in the moch URLRequestJob and is not generally an invariant.
516
+ test.assertTrue(request.timing.pushEnd < request.endTime, 'pushEnd should be before endTime');
517
+ test.assertTrue(request.startTime < request.timing.pushEnd, 'pushEnd should be after startTime');
518
+ }
519
+ if (!--pendingRequestCount) {
520
+ test.releaseControl();
521
+ }
522
+ }
523
+
524
+ this.addSniffer(SDK.NetworkManager.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest, true);
525
+
526
+ test.evaluateInConsole_('addImage(\'' + url + '\')', function(resultText) {});
527
+ test.evaluateInConsole_('addImage(\'' + url + '?pushUseNullEndTime\')', function(resultText) {});
528
+ this.takeControl();
529
+ };
530
+
531
+ TestSuite.prototype.testConsoleOnNavigateBack = function() {
532
+ function filteredMessages() {
533
+ return SDK.ConsoleModel.ConsoleModel.allMessagesUnordered().filter(
534
+ a => a.source !== Protocol.Log.LogEntrySource.Violation);
535
+ }
536
+
537
+ if (filteredMessages().length === 1) {
538
+ firstConsoleMessageReceived.call(this, null);
539
+ } else {
540
+ SDK.TargetManager.TargetManager.instance().addModelListener(
541
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this);
542
+ }
543
+
544
+ function firstConsoleMessageReceived(event) {
545
+ if (event && event.data.source === Protocol.Log.LogEntrySource.Violation) {
546
+ return;
547
+ }
548
+ SDK.TargetManager.TargetManager.instance().removeModelListener(
549
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this);
550
+ this.evaluateInConsole_('clickLink();', didClickLink.bind(this));
551
+ }
552
+
553
+ function didClickLink() {
554
+ // Check that there are no new messages(command is not a message).
555
+ this.assertEquals(3, filteredMessages().length);
556
+ this.evaluateInConsole_('history.back();', didNavigateBack.bind(this));
557
+ }
558
+
559
+ function didNavigateBack() {
560
+ // Make sure navigation completed and possible console messages were pushed.
561
+ this.evaluateInConsole_('void 0;', didCompleteNavigation.bind(this));
562
+ }
563
+
564
+ function didCompleteNavigation() {
565
+ this.assertEquals(7, filteredMessages().length);
566
+ this.releaseControl();
567
+ }
568
+
569
+ this.takeControl();
570
+ };
571
+
572
+ TestSuite.prototype.testSharedWorker = function() {
573
+ function didEvaluateInConsole(resultText) {
574
+ this.assertEquals('2011', resultText);
575
+ this.releaseControl();
576
+ }
577
+ this.evaluateInConsole_('globalVar', didEvaluateInConsole.bind(this));
578
+ this.takeControl();
579
+ };
580
+
581
+ TestSuite.prototype.testPauseInSharedWorkerInitialization1 = function() {
582
+ // Make sure the worker is loaded.
583
+ this.takeControl();
584
+ this._waitForTargets(1, callback.bind(this));
585
+
586
+ function callback() {
587
+ ProtocolClient.test.deprecatedRunAfterPendingDispatches(this.releaseControl.bind(this));
588
+ }
589
+ };
590
+
591
+ TestSuite.prototype.testPauseInSharedWorkerInitialization2 = function() {
592
+ this.takeControl();
593
+ this._waitForTargets(1, callback.bind(this));
594
+
595
+ function callback() {
596
+ const debuggerModel = SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)[0];
597
+ if (debuggerModel.isPaused()) {
598
+ SDK.TargetManager.TargetManager.instance().addModelListener(
599
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
600
+ debuggerModel.resume();
601
+ return;
602
+ }
603
+ this._waitForScriptPause(callback.bind(this));
604
+ }
605
+
606
+ function onConsoleMessage(event) {
607
+ const message = event.data.messageText;
608
+ if (message !== 'connected') {
609
+ this.fail('Unexpected message: ' + message);
610
+ }
611
+ this.releaseControl();
612
+ }
613
+ };
614
+
615
+ TestSuite.prototype.testSharedWorkerNetworkPanel = function() {
616
+ this.takeControl();
617
+ this.showPanel('network').then(() => {
618
+ if (!document.querySelector('#network-container')) {
619
+ this.fail('unable to find #network-container');
620
+ }
621
+ this.releaseControl();
622
+ });
623
+ };
624
+
625
+ TestSuite.prototype.enableTouchEmulation = function() {
626
+ const deviceModeModel = new Emulation.DeviceModeModel(function() {});
627
+ deviceModeModel._target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
628
+ deviceModeModel._applyTouch(true, true);
629
+ };
630
+
631
+ TestSuite.prototype.waitForDebuggerPaused = function() {
632
+ const debuggerModel =
633
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.model(SDK.DebuggerModel.DebuggerModel);
634
+ if (debuggerModel.debuggerPausedDetails) {
635
+ return;
636
+ }
637
+
638
+ this.takeControl();
639
+ this._waitForScriptPause(this.releaseControl.bind(this));
640
+ };
641
+
642
+ TestSuite.prototype.switchToPanel = function(panelName) {
643
+ this.showPanel(panelName).then(this.releaseControl.bind(this));
644
+ this.takeControl();
645
+ };
646
+
647
+ // Regression test for crbug.com/370035.
648
+ TestSuite.prototype.testDeviceMetricsOverrides = function() {
649
+ function dumpPageMetrics() {
650
+ return JSON.stringify(
651
+ {width: window.innerWidth, height: window.innerHeight, deviceScaleFactor: window.devicePixelRatio});
652
+ }
653
+
654
+ const test = this;
655
+
656
+ async function testOverrides(params, metrics, callback) {
657
+ await SDK.TargetManager.TargetManager.instance()
658
+ .primaryPageTarget()
659
+ ?.emulationAgent()
660
+ .invoke_setDeviceMetricsOverride(params);
661
+ test.evaluateInConsole_('(' + dumpPageMetrics.toString() + ')()', checkMetrics);
662
+
663
+ function checkMetrics(consoleResult) {
664
+ test.assertEquals(
665
+ `'${JSON.stringify(metrics)}'`, consoleResult, 'Wrong metrics for params: ' + JSON.stringify(params));
666
+ callback();
667
+ }
668
+ }
669
+
670
+ function step1() {
671
+ testOverrides(
672
+ {width: 1200, height: 1000, deviceScaleFactor: 1, mobile: false, fitWindow: true},
673
+ {width: 1200, height: 1000, deviceScaleFactor: 1}, step2);
674
+ }
675
+
676
+ function step2() {
677
+ testOverrides(
678
+ {width: 1200, height: 1000, deviceScaleFactor: 1, mobile: false, fitWindow: false},
679
+ {width: 1200, height: 1000, deviceScaleFactor: 1}, step3);
680
+ }
681
+
682
+ function step3() {
683
+ testOverrides(
684
+ {width: 1200, height: 1000, deviceScaleFactor: 3, mobile: false, fitWindow: true},
685
+ {width: 1200, height: 1000, deviceScaleFactor: 3}, step4);
686
+ }
687
+
688
+ function step4() {
689
+ testOverrides(
690
+ {width: 1200, height: 1000, deviceScaleFactor: 3, mobile: false, fitWindow: false},
691
+ {width: 1200, height: 1000, deviceScaleFactor: 3}, finish);
692
+ }
693
+
694
+ function finish() {
695
+ test.releaseControl();
696
+ }
697
+
698
+ test.takeControl();
699
+ step1();
700
+ };
701
+
702
+ TestSuite.prototype.testDispatchKeyEventShowsAutoFill = function() {
703
+ const test = this;
704
+ let receivedReady = false;
705
+
706
+ function signalToShowAutofill() {
707
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
708
+ {type: 'rawKeyDown', key: 'Down', windowsVirtualKeyCode: 40, nativeVirtualKeyCode: 40});
709
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
710
+ {type: 'keyUp', key: 'Down', windowsVirtualKeyCode: 40, nativeVirtualKeyCode: 40});
711
+ }
712
+
713
+ function selectTopAutoFill() {
714
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
715
+ {type: 'rawKeyDown', key: 'Enter', windowsVirtualKeyCode: 13, nativeVirtualKeyCode: 13});
716
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
717
+ {type: 'keyUp', key: 'Enter', windowsVirtualKeyCode: 13, nativeVirtualKeyCode: 13});
718
+
719
+ test.evaluateInConsole_('document.getElementById("name").value', onResultOfInput);
720
+ }
721
+
722
+ function onResultOfInput(value) {
723
+ // Console adds '' around the response.
724
+ test.assertEquals('\'Abbf\'', value);
725
+ test.releaseControl();
726
+ }
727
+
728
+ function onConsoleMessage(event) {
729
+ const message = event.data.messageText;
730
+ if (message === 'ready' && !receivedReady) {
731
+ receivedReady = true;
732
+ signalToShowAutofill();
733
+ }
734
+ // This log comes from the browser unittest code.
735
+ if (message === 'didShowSuggestions') {
736
+ selectTopAutoFill();
737
+ }
738
+ }
739
+
740
+ this.takeControl({slownessFactor: 10});
741
+
742
+ // It is possible for the ready console messagage to be already received but not handled
743
+ // or received later. This ensures we can catch both cases.
744
+ SDK.TargetManager.TargetManager.instance().addModelListener(
745
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
746
+
747
+ const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
748
+ if (messages.length) {
749
+ const text = messages[0].messageText;
750
+ this.assertEquals('ready', text);
751
+ signalToShowAutofill();
752
+ }
753
+ };
754
+
755
+ TestSuite.prototype.testKeyEventUnhandled = function() {
756
+ function onKeyEventUnhandledKeyDown(event) {
757
+ this.assertEquals('keydown', event.data.type);
758
+ this.assertEquals('F8', event.data.key);
759
+ this.assertEquals(119, event.data.keyCode);
760
+ this.assertEquals(0, event.data.modifiers);
761
+ this.assertEquals('', event.data.code);
762
+ Host.InspectorFrontendHost.events.removeEventListener(
763
+ Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyDown, this);
764
+ Host.InspectorFrontendHost.events.addEventListener(
765
+ Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyUp, this);
766
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
767
+ {type: 'keyUp', key: 'F8', code: 'F8', windowsVirtualKeyCode: 119, nativeVirtualKeyCode: 119});
768
+ }
769
+ function onKeyEventUnhandledKeyUp(event) {
770
+ this.assertEquals('keyup', event.data.type);
771
+ this.assertEquals('F8', event.data.key);
772
+ this.assertEquals(119, event.data.keyCode);
773
+ this.assertEquals(0, event.data.modifiers);
774
+ this.assertEquals('F8', event.data.code);
775
+ this.releaseControl();
776
+ }
777
+ this.takeControl();
778
+ Host.InspectorFrontendHost.events.addEventListener(
779
+ Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, onKeyEventUnhandledKeyDown, this);
780
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
781
+ {type: 'rawKeyDown', key: 'F8', windowsVirtualKeyCode: 119, nativeVirtualKeyCode: 119});
782
+ };
783
+
784
+ // Tests that the keys that are forwarded from the browser update
785
+ // when their shortcuts change
786
+ TestSuite.prototype.testForwardedKeysChanged = function() {
787
+ this.takeControl();
788
+
789
+ this.addSniffer(UI.ShortcutRegistry.ShortcutRegistry.instance(), 'registerBindings', () => {
790
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
791
+ {type: 'rawKeyDown', key: 'F1', windowsVirtualKeyCode: 112, nativeVirtualKeyCode: 112});
792
+ });
793
+ this.addSniffer(UI.ShortcutRegistry.ShortcutRegistry.instance(), 'handleKey', key => {
794
+ this.assertEquals(112, key);
795
+ this.releaseControl();
796
+ });
797
+
798
+ Common.Settings.moduleSetting('active-keybind-set').set('vsCode');
799
+ };
800
+
801
+ TestSuite.prototype.testDispatchKeyEventDoesNotCrash = function() {
802
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
803
+ {type: 'rawKeyDown', windowsVirtualKeyCode: 0x23, key: 'End'});
804
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent().invoke_dispatchKeyEvent(
805
+ {type: 'keyUp', windowsVirtualKeyCode: 0x23, key: 'End'});
806
+ };
807
+
808
+ // Check that showing the certificate viewer does not crash, crbug.com/954874
809
+ TestSuite.prototype.testShowCertificate = function() {
810
+ Host.InspectorFrontendHost.showCertificateViewer([
811
+ 'MIIFIDCCBAigAwIBAgIQE0TsEu6R8FUHQv+9fE7j8TANBgkqhkiG9w0BAQsF' +
812
+ 'ADBUMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVR29vZ2xlIFRydXN0IFNlcnZp' +
813
+ 'Y2VzMSUwIwYDVQQDExxHb29nbGUgSW50ZXJuZXQgQXV0aG9yaXR5IEczMB4X' +
814
+ 'DTE5MDMyNjEzNDEwMVoXDTE5MDYxODEzMjQwMFowZzELMAkGA1UEBhMCVVMx' +
815
+ 'EzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcx' +
816
+ 'EzARBgNVBAoMCkdvb2dsZSBMTEMxFjAUBgNVBAMMDSouYXBwc3BvdC5jb20w' +
817
+ 'ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwca7hj0kyoJVxcvyA' +
818
+ 'a8zNKMIXcoPM3aU1KVe7mxZITtwC6/D/D/q4Oe8fBQLeZ3c6qR5Sr3M+611k' +
819
+ 'Ab15AcGUgh1Xi0jZqERvd/5+P0aVCFJYeoLrPBzwSMZBStkoiO2CwtV8x06e' +
820
+ 'X7qUz7Hvr3oeG+Ma9OUMmIebl//zHtC82mE0mCRBQAW0MWEgT5nOWey74tJR' +
821
+ 'GRqUEI8ftV9grAshD5gY8kxxUoMfqrreaXVqcRF58ZPiwUJ0+SbtC5q9cJ+K' +
822
+ 'MuYM4TCetEuk/WQsa+1EnSa40dhGRtZjxbwEwQAJ1vLOcIA7AVR/Ck22Uj8X' +
823
+ 'UOECercjUrKdDyaAPcLp2TThAgMBAAGjggHZMIIB1TATBgNVHSUEDDAKBggr' +
824
+ 'BgEFBQcDATCBrwYDVR0RBIGnMIGkgg0qLmFwcHNwb3QuY29tggsqLmEucnVu' +
825
+ 'LmFwcIIVKi50aGlua3dpdGhnb29nbGUuY29tghAqLndpdGhnb29nbGUuY29t' +
826
+ 'ghEqLndpdGh5b3V0dWJlLmNvbYILYXBwc3BvdC5jb22CB3J1bi5hcHCCE3Ro' +
827
+ 'aW5rd2l0aGdvb2dsZS5jb22CDndpdGhnb29nbGUuY29tgg93aXRoeW91dHVi' +
828
+ 'ZS5jb20waAYIKwYBBQUHAQEEXDBaMC0GCCsGAQUFBzAChiFodHRwOi8vcGtp' +
829
+ 'Lmdvb2cvZ3NyMi9HVFNHSUFHMy5jcnQwKQYIKwYBBQUHMAGGHWh0dHA6Ly9v' +
830
+ 'Y3NwLnBraS5nb29nL0dUU0dJQUczMB0GA1UdDgQWBBTGkpE5o0H9+Wjc05rF' +
831
+ 'hNQiYDjBFjAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFHfCuFCaZ3Z2sS3C' +
832
+ 'htCDoH6mfrpLMCEGA1UdIAQaMBgwDAYKKwYBBAHWeQIFAzAIBgZngQwBAgIw' +
833
+ 'MQYDVR0fBCowKDAmoCSgIoYgaHR0cDovL2NybC5wa2kuZ29vZy9HVFNHSUFH' +
834
+ 'My5jcmwwDQYJKoZIhvcNAQELBQADggEBALqoYGqWtJW/6obEzY+ehsgfyXb+' +
835
+ 'qNIuV09wt95cRF93HlLbBlSZ/Iz8HXX44ZT1/tGAkwKnW0gDKSSab3I8U+e9' +
836
+ 'LHbC9VXrgAFENzu89MNKNmK5prwv+MPA2HUQPu4Pad3qXmd4+nKc/EUjtg1d' +
837
+ '/xKGK1Vn6JX3i5ly/rduowez3LxpSAJuIwseum331aQaKC2z2ri++96B8MPU' +
838
+ 'KFXzvV2gVGOe3ZYqmwPaG8y38Tba+OzEh59ygl8ydJJhoI6+R3itPSy0aXUU' +
839
+ 'lMvvAbfCobXD5kBRQ28ysgbDSDOPs3fraXpAKL92QUjsABs58XBz5vka4swu' +
840
+ 'gg/u+ZxaKOqfIm8=',
841
+ 'MIIEXDCCA0SgAwIBAgINAeOpMBz8cgY4P5pTHTANBgkqhkiG9w0BAQsFADBM' +
842
+ 'MSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMK' +
843
+ 'R2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAw' +
844
+ 'NDJaFw0yMTEyMTUwMDAwNDJaMFQxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVH' +
845
+ 'b29nbGUgVHJ1c3QgU2VydmljZXMxJTAjBgNVBAMTHEdvb2dsZSBJbnRlcm5l' +
846
+ 'dCBBdXRob3JpdHkgRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB' +
847
+ 'AQDKUkvqHv/OJGuo2nIYaNVWXQ5IWi01CXZaz6TIHLGp/lOJ+600/4hbn7vn' +
848
+ '6AAB3DVzdQOts7G5pH0rJnnOFUAK71G4nzKMfHCGUksW/mona+Y2emJQ2N+a' +
849
+ 'icwJKetPKRSIgAuPOB6Aahh8Hb2XO3h9RUk2T0HNouB2VzxoMXlkyW7XUR5m' +
850
+ 'w6JkLHnA52XDVoRTWkNty5oCINLvGmnRsJ1zouAqYGVQMc/7sy+/EYhALrVJ' +
851
+ 'EA8KbtyX+r8snwU5C1hUrwaW6MWOARa8qBpNQcWTkaIeoYvy/sGIJEmjR0vF' +
852
+ 'EwHdp1cSaWIr6/4g72n7OqXwfinu7ZYW97EfoOSQJeAzAgMBAAGjggEzMIIB' +
853
+ 'LzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUF' +
854
+ 'BwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFHfCuFCaZ3Z2sS3C' +
855
+ 'htCDoH6mfrpLMB8GA1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYuMDUG' +
856
+ 'CCsGAQUFBwEBBCkwJzAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdv' +
857
+ 'b2cvZ3NyMjAyBgNVHR8EKzApMCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29n' +
858
+ 'L2dzcjIvZ3NyMi5jcmwwPwYDVR0gBDgwNjA0BgZngQwBAgIwKjAoBggrBgEF' +
859
+ 'BQcCARYcaHR0cHM6Ly9wa2kuZ29vZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0B' +
860
+ 'AQsFAAOCAQEAHLeJluRT7bvs26gyAZ8so81trUISd7O45skDUmAge1cnxhG1' +
861
+ 'P2cNmSxbWsoiCt2eux9LSD+PAj2LIYRFHW31/6xoic1k4tbWXkDCjir37xTT' +
862
+ 'NqRAMPUyFRWSdvt+nlPqwnb8Oa2I/maSJukcxDjNSfpDh/Bd1lZNgdd/8cLd' +
863
+ 'sE3+wypufJ9uXO1iQpnh9zbuFIwsIONGl1p3A8CgxkqI/UAih3JaGOqcpcda' +
864
+ 'CIzkBaR9uYQ1X4k2Vg5APRLouzVy7a8IVk6wuy6pm+T7HT4LY8ibS5FEZlfA' +
865
+ 'FLSW8NwsVz9SBK2Vqn1N0PIMn5xA6NZVc7o835DLAFshEWfC7TIe3g==',
866
+ 'MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEg' +
867
+ 'MB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkds' +
868
+ 'b2JhbFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAw' +
869
+ 'WhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3Qg' +
870
+ 'Q0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs' +
871
+ 'U2lnbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8o' +
872
+ 'mUVCxKs+IVSbC9N/hHD6ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe' +
873
+ '+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1' +
874
+ 'AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjNS7SgfQx5' +
875
+ 'TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo' +
876
+ '4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99y' +
877
+ 'qWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8E' +
878
+ 'BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IHV2ccHsBqBt5Z' +
879
+ 'tJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9iYWxz' +
880
+ 'aWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0' +
881
+ 'mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs' +
882
+ 'J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4' +
883
+ 'h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRD' +
884
+ 'LenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7' +
885
+ '9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmg' +
886
+ 'QWpzU/qlULRuJQ/7TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq' +
887
+ '/H5COEBkEveegeGTLg=='
888
+ ]);
889
+ };
890
+
891
+ // Simple check to make sure network throttling is wired up
892
+ // See crbug.com/747724
893
+ TestSuite.prototype.testOfflineNetworkConditions = async function() {
894
+ const test = this;
895
+ SDK.NetworkManager.MultitargetNetworkManager.instance().setNetworkConditions(SDK.NetworkManager.OfflineConditions);
896
+
897
+ function finishRequest(request) {
898
+ test.assertEquals(
899
+ 'net::ERR_INTERNET_DISCONNECTED', request.localizedFailDescription, 'Request should have failed');
900
+ test.releaseControl();
901
+ }
902
+
903
+ this.addSniffer(SDK.NetworkManager.NetworkDispatcher.prototype, 'finishNetworkRequest', finishRequest);
904
+
905
+ test.takeControl();
906
+ test.evaluateInConsole_('await fetch("/");', function(resultText) {});
907
+ };
908
+
909
+ TestSuite.prototype.testEmulateNetworkConditions = function() {
910
+ const test = this;
911
+
912
+ function testPreset(preset, messages, next) {
913
+ function onConsoleMessage(event) {
914
+ const index = messages.indexOf(event.data.messageText);
915
+ if (index === -1) {
916
+ test.fail('Unexpected message: ' + event.data.messageText);
917
+ return;
918
+ }
919
+
920
+ messages.splice(index, 1);
921
+ if (!messages.length) {
922
+ SDK.TargetManager.TargetManager.instance().removeModelListener(
923
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
924
+ next();
925
+ }
926
+ }
927
+
928
+ SDK.TargetManager.TargetManager.instance().addModelListener(
929
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
930
+ SDK.NetworkManager.MultitargetNetworkManager.instance().setNetworkConditions(preset);
931
+ }
932
+
933
+ test.takeControl();
934
+ step1();
935
+
936
+ function step1() {
937
+ testPreset(
938
+ MobileThrottling.networkPresets[3],
939
+ [
940
+ 'offline event: online = false', 'connection change event: type = none; downlinkMax = 0; effectiveType = 4g'
941
+ ],
942
+ step2);
943
+ }
944
+
945
+ function step2() {
946
+ testPreset(
947
+ MobileThrottling.networkPresets[2],
948
+ [
949
+ 'online event: online = true',
950
+ 'connection change event: type = cellular; downlinkMax = 0.3814697265625; effectiveType = 2g'
951
+ ],
952
+ step3);
953
+ }
954
+
955
+ function step3() {
956
+ testPreset(
957
+ MobileThrottling.networkPresets[1],
958
+ ['connection change event: type = cellular; downlinkMax = 1.373291015625; effectiveType = 3g'], step4);
959
+ }
960
+
961
+ function step4() {
962
+ testPreset(
963
+ MobileThrottling.networkPresets[0],
964
+ ['connection change event: type = cellular; downlinkMax = 7.724761962890625; effectiveType = 4g'],
965
+ test.releaseControl.bind(test));
966
+ }
967
+ };
968
+
969
+ TestSuite.prototype.testScreenshotRecording = function() {
970
+ const test = this;
971
+
972
+ function performActionsInPage(callback) {
973
+ let count = 0;
974
+ const div = document.createElement('div');
975
+ div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100px; position: absolute;');
976
+ document.body.appendChild(div);
977
+ requestAnimationFrame(frame);
978
+ function frame() {
979
+ const color = [0, 0, 0];
980
+ color[count % 3] = 255;
981
+ div.style.backgroundColor = 'rgb(' + color.join(',') + ')';
982
+ if (++count > 10) {
983
+ requestAnimationFrame(callback);
984
+ } else {
985
+ requestAnimationFrame(frame);
986
+ }
987
+ }
988
+ }
989
+
990
+ const captureFilmStripSetting =
991
+ Common.Settings.Settings.instance().createSetting('timeline-capture-film-strip', false);
992
+ captureFilmStripSetting.set(true);
993
+ test.evaluateInConsole_(performActionsInPage.toString(), function() {});
994
+ test.invokeAsyncWithTimeline_('performActionsInPage', onTimelineDone);
995
+
996
+ function onTimelineDone() {
997
+ captureFilmStripSetting.set(false);
998
+ const filmStripModel = Timeline.TimelinePanel.TimelinePanel.instance().performanceModel?.filmStripModel();
999
+ const frames = filmStripModel.frames();
1000
+ test.assertTrue(frames.length > 4 && typeof frames.length === 'number');
1001
+ loadFrameImages(frames);
1002
+ }
1003
+
1004
+ function loadFrameImages(frames) {
1005
+ const readyImages = [];
1006
+ for (const frame of frames) {
1007
+ frame.imageDataPromise().then(onGotImageData);
1008
+ }
1009
+
1010
+ function onGotImageData(dataUri) {
1011
+ const image = new Image();
1012
+ test.assertTrue(Boolean(dataUri), 'No image data for frame');
1013
+ image.addEventListener('load', onLoad);
1014
+ image.src = dataUri;
1015
+ }
1016
+
1017
+ function onLoad(event) {
1018
+ readyImages.push(event.target);
1019
+ if (readyImages.length === frames.length) {
1020
+ validateImagesAndCompleteTest(readyImages);
1021
+ }
1022
+ }
1023
+ }
1024
+
1025
+ function validateImagesAndCompleteTest(images) {
1026
+ let redCount = 0;
1027
+ let greenCount = 0;
1028
+ let blueCount = 0;
1029
+
1030
+ const canvas = document.createElement('canvas');
1031
+ const ctx = canvas.getContext('2d');
1032
+ for (const image of images) {
1033
+ test.assertTrue(image.naturalWidth > 10);
1034
+ test.assertTrue(image.naturalHeight > 10);
1035
+ canvas.width = image.naturalWidth;
1036
+ canvas.height = image.naturalHeight;
1037
+ ctx.drawImage(image, 0, 0);
1038
+ const data = ctx.getImageData(0, 0, 1, 1);
1039
+ const color = Array.prototype.join.call(data.data, ',');
1040
+ if (data.data[0] > 200) {
1041
+ redCount++;
1042
+ } else if (data.data[1] > 200) {
1043
+ greenCount++;
1044
+ } else if (data.data[2] > 200) {
1045
+ blueCount++;
1046
+ } else {
1047
+ test.fail('Unexpected color: ' + color);
1048
+ }
1049
+ }
1050
+ test.assertTrue(redCount && greenCount && blueCount, 'Color check failed');
1051
+ test.releaseControl();
1052
+ }
1053
+
1054
+ test.takeControl();
1055
+ };
1056
+
1057
+ TestSuite.prototype.testSettings = function() {
1058
+ const test = this;
1059
+
1060
+ createSettings();
1061
+ test.takeControl();
1062
+ setTimeout(reset, 0);
1063
+
1064
+ function createSettings() {
1065
+ const localSetting = Common.Settings.Settings.instance().createLocalSetting('local', undefined);
1066
+ localSetting.set({s: 'local', n: 1});
1067
+ const globalSetting = Common.Settings.Settings.instance().createSetting('global', undefined);
1068
+ globalSetting.set({s: 'global', n: 2});
1069
+ }
1070
+
1071
+ function reset() {
1072
+ Root.Runtime.experiments.clearForTest();
1073
+ Host.InspectorFrontendHost.getPreferences(gotPreferences);
1074
+ }
1075
+
1076
+ function gotPreferences(prefs) {
1077
+ Main.Main.instanceForTest.createSettings(prefs);
1078
+
1079
+ const localSetting = Common.Settings.Settings.instance().createLocalSetting('local', undefined);
1080
+ test.assertEquals('object', typeof localSetting.get());
1081
+ test.assertEquals('local', localSetting.get().s);
1082
+ test.assertEquals(1, localSetting.get().n);
1083
+ const globalSetting = Common.Settings.Settings.instance().createSetting('global', undefined);
1084
+ test.assertEquals('object', typeof globalSetting.get());
1085
+ test.assertEquals('global', globalSetting.get().s);
1086
+ test.assertEquals(2, globalSetting.get().n);
1087
+ test.releaseControl();
1088
+ }
1089
+ };
1090
+
1091
+ TestSuite.prototype.testWindowInitializedOnNavigateBack = function() {
1092
+ const test = this;
1093
+ test.takeControl();
1094
+ const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
1095
+ if (messages.length === 1) {
1096
+ checkMessages();
1097
+ } else {
1098
+ SDK.TargetManager.TargetManager.instance().addModelListener(
1099
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, checkMessages.bind(this), this);
1100
+ }
1101
+
1102
+ function checkMessages() {
1103
+ const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
1104
+ test.assertEquals(1, messages.length);
1105
+ test.assertTrue(messages[0].messageText.indexOf('Uncaught') === -1);
1106
+ test.releaseControl();
1107
+ }
1108
+ };
1109
+
1110
+ TestSuite.prototype.testConsoleContextNames = function() {
1111
+ const test = this;
1112
+ test.takeControl();
1113
+ this.showPanel('console').then(() => this._waitForExecutionContexts(2, onExecutionContexts.bind(this)));
1114
+
1115
+ function onExecutionContexts() {
1116
+ const consoleView = Console.ConsoleView.instance();
1117
+ const selector = consoleView.consoleContextSelector;
1118
+ const values = [];
1119
+ for (const item of selector.items) {
1120
+ values.push(selector.titleFor(item));
1121
+ }
1122
+ test.assertEquals('top', values[0]);
1123
+ test.assertEquals('Simple content script', values[1]);
1124
+ test.releaseControl();
1125
+ }
1126
+ };
1127
+
1128
+ TestSuite.prototype.testRawHeadersWithHSTS = function(url) {
1129
+ const test = this;
1130
+ test.takeControl({slownessFactor: 10});
1131
+ SDK.TargetManager.TargetManager.instance().addModelListener(
1132
+ SDK.NetworkManager.NetworkManager, SDK.NetworkManager.Events.ResponseReceived, onResponseReceived);
1133
+
1134
+ this.evaluateInConsole_(`location.href= "${url}";`, () => {});
1135
+
1136
+ let count = 0;
1137
+ function onResponseReceived(event) {
1138
+ const networkRequest = event.data.request;
1139
+ if (!networkRequest.url().startsWith('http')) {
1140
+ return;
1141
+ }
1142
+ switch (++count) {
1143
+ case 1: // Original redirect
1144
+ test.assertEquals(301, networkRequest.statusCode);
1145
+ test.assertEquals('Moved Permanently', networkRequest.statusText);
1146
+ test.assertTrue(url.endsWith(networkRequest.responseHeaderValue('Location')));
1147
+ break;
1148
+
1149
+ case 2: // HSTS internal redirect
1150
+ test.assertTrue(networkRequest.url().startsWith('http://'));
1151
+ test.assertEquals(307, networkRequest.statusCode);
1152
+ test.assertEquals('Internal Redirect', networkRequest.statusText);
1153
+ test.assertEquals('HSTS', networkRequest.responseHeaderValue('Non-Authoritative-Reason'));
1154
+ test.assertTrue(networkRequest.responseHeaderValue('Location').startsWith('https://'));
1155
+ break;
1156
+
1157
+ case 3: // Final response
1158
+ test.assertTrue(networkRequest.url().startsWith('https://'));
1159
+ test.assertTrue(networkRequest.requestHeaderValue('Referer').startsWith('http://127.0.0.1'));
1160
+ test.assertEquals(200, networkRequest.statusCode);
1161
+ test.assertEquals('OK', networkRequest.statusText);
1162
+ test.assertEquals('132', networkRequest.responseHeaderValue('Content-Length'));
1163
+ test.releaseControl();
1164
+ }
1165
+ }
1166
+ };
1167
+
1168
+ TestSuite.prototype.testDOMWarnings = function() {
1169
+ const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
1170
+ this.assertEquals(1, messages.length);
1171
+ const expectedPrefix = '[DOM] Found 2 elements with non-unique id #dup:';
1172
+ this.assertTrue(messages[0].messageText.startsWith(expectedPrefix));
1173
+ };
1174
+
1175
+ TestSuite.prototype.waitForTestResultsInConsole = function() {
1176
+ const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
1177
+ for (let i = 0; i < messages.length; ++i) {
1178
+ const text = messages[i].messageText;
1179
+ if (text === 'PASS') {
1180
+ return;
1181
+ }
1182
+ if (/^FAIL/.test(text)) {
1183
+ this.fail(text);
1184
+ } // This will throw.
1185
+ }
1186
+ // Neither PASS nor FAIL, so wait for more messages.
1187
+ function onConsoleMessage(event) {
1188
+ const text = event.data.messageText;
1189
+ if (text === 'PASS') {
1190
+ this.releaseControl();
1191
+ } else if (/^FAIL/.test(text)) {
1192
+ this.fail(text);
1193
+ }
1194
+ }
1195
+
1196
+ SDK.TargetManager.TargetManager.instance().addModelListener(
1197
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
1198
+ this.takeControl({slownessFactor: 10});
1199
+ };
1200
+
1201
+ TestSuite.prototype.waitForTestResultsAsMessage = function() {
1202
+ const onMessage = event => {
1203
+ if (!event.data.testOutput) {
1204
+ return;
1205
+ }
1206
+ top.removeEventListener('message', onMessage);
1207
+ const text = event.data.testOutput;
1208
+ if (text === 'PASS') {
1209
+ this.releaseControl();
1210
+ } else {
1211
+ this.fail(text);
1212
+ }
1213
+ };
1214
+ top.addEventListener('message', onMessage);
1215
+ this.takeControl();
1216
+ };
1217
+
1218
+ TestSuite.prototype._overrideMethod = function(receiver, methodName, override) {
1219
+ const original = receiver[methodName];
1220
+ if (typeof original !== 'function') {
1221
+ this.fail(`TestSuite._overrideMethod: ${methodName} is not a function`);
1222
+ return;
1223
+ }
1224
+ receiver[methodName] = function() {
1225
+ let value;
1226
+ try {
1227
+ value = original.apply(receiver, arguments);
1228
+ } finally {
1229
+ receiver[methodName] = original;
1230
+ }
1231
+ override.apply(original, arguments);
1232
+ return value;
1233
+ };
1234
+ };
1235
+
1236
+ TestSuite.prototype.startTimeline = function(callback) {
1237
+ const test = this;
1238
+ this.showPanel('timeline').then(function() {
1239
+ const timeline = Timeline.TimelinePanel.TimelinePanel.instance();
1240
+ test._overrideMethod(timeline, 'recordingStarted', callback);
1241
+ timeline._toggleRecording();
1242
+ });
1243
+ };
1244
+
1245
+ TestSuite.prototype.stopTimeline = function(callback) {
1246
+ const timeline = Timeline.TimelinePanel.TimelinePanel.instance();
1247
+ this._overrideMethod(timeline, 'loadingComplete', callback);
1248
+ timeline._toggleRecording();
1249
+ };
1250
+
1251
+ TestSuite.prototype.invokePageFunctionAsync = function(functionName, opt_args, callback_is_always_last) {
1252
+ const callback = arguments[arguments.length - 1];
1253
+ const doneMessage = `DONE: ${functionName}.${++this._asyncInvocationId}`;
1254
+ const argsString = arguments.length < 3 ?
1255
+ '' :
1256
+ Array.prototype.slice.call(arguments, 1, -1).map(arg => JSON.stringify(arg)).join(',') + ',';
1257
+ this.evaluateInConsole_(
1258
+ `${functionName}(${argsString} function() { console.log('${doneMessage}'); });`, function() {});
1259
+ SDK.TargetManager.TargetManager.instance().addModelListener(
1260
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage);
1261
+
1262
+ function onConsoleMessage(event) {
1263
+ const text = event.data.messageText;
1264
+ if (text === doneMessage) {
1265
+ SDK.TargetManager.TargetManager.instance().removeModelListener(
1266
+ SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage);
1267
+ callback();
1268
+ }
1269
+ }
1270
+ };
1271
+
1272
+ TestSuite.prototype.invokeAsyncWithTimeline_ = function(functionName, callback) {
1273
+ const test = this;
1274
+
1275
+ this.startTimeline(onRecordingStarted);
1276
+
1277
+ function onRecordingStarted() {
1278
+ test.invokePageFunctionAsync(functionName, pageActionsDone);
1279
+ }
1280
+
1281
+ function pageActionsDone() {
1282
+ test.stopTimeline(callback);
1283
+ }
1284
+ };
1285
+
1286
+ TestSuite.prototype.enableExperiment = function(name) {
1287
+ Root.Runtime.experiments.enableForTest(name);
1288
+ };
1289
+
1290
+ TestSuite.prototype.testInspectedElementIs = async function(nodeName) {
1291
+ this.takeControl();
1292
+ /** @type {import('./panels/elements/elements.js')} */
1293
+ const Elements = await self.runtime.loadLegacyModule('panels/elements/elements.js');
1294
+ if (!Elements.ElementsPanel.ElementsPanel.firstInspectElementNodeNameForTest) {
1295
+ await new Promise(
1296
+ f => this.addSniffer(Elements.ElementsPanel.ElementsPanel, 'firstInspectElementCompletedForTest', f));
1297
+ }
1298
+ this.assertEquals(nodeName, Elements.ElementsPanel.ElementsPanel.firstInspectElementNodeNameForTest);
1299
+ this.releaseControl();
1300
+ };
1301
+
1302
+ TestSuite.prototype.testDisposeEmptyBrowserContext = async function(url) {
1303
+ this.takeControl();
1304
+ const targetAgent = SDK.TargetManager.TargetManager.instance().rootTarget()?.targetAgent();
1305
+ const {browserContextId} = await targetAgent.invoke_createBrowserContext();
1306
+ const response1 = await targetAgent.invoke_getBrowserContexts();
1307
+ this.assertEquals(response1.browserContextIds.length, 1);
1308
+ await targetAgent.invoke_disposeBrowserContext({browserContextId});
1309
+ const response2 = await targetAgent.invoke_getBrowserContexts();
1310
+ this.assertEquals(response2.browserContextIds.length, 0);
1311
+ this.releaseControl();
1312
+ };
1313
+
1314
+ TestSuite.prototype.testNewWindowFromBrowserContext = async function(url) {
1315
+ this.takeControl();
1316
+ // Create a BrowserContext.
1317
+ const targetAgent = SDK.TargetManager.TargetManager.instance().rootTarget()?.targetAgent();
1318
+ const {browserContextId} = await targetAgent.invoke_createBrowserContext();
1319
+
1320
+ // Cause a Browser to be created with the temp profile.
1321
+ const {targetId} = await targetAgent.invoke_createTarget(
1322
+ {url: 'data:text/html,<!DOCTYPE html>', browserContextId, newWindow: true});
1323
+ await targetAgent.invoke_attachToTarget({targetId, flatten: true});
1324
+
1325
+ // Destroy the temp profile.
1326
+ await targetAgent.invoke_disposeBrowserContext({browserContextId});
1327
+
1328
+ this.releaseControl();
1329
+ };
1330
+
1331
+ TestSuite.prototype.testCreateBrowserContext = async function(url) {
1332
+ this.takeControl();
1333
+ const browserContextIds = [];
1334
+ const targetAgent = SDK.TargetManager.TargetManager.instance().rootTarget()?.targetAgent();
1335
+
1336
+ const target1 = await createIsolatedTarget(url, browserContextIds);
1337
+ const target2 = await createIsolatedTarget(url, browserContextIds);
1338
+
1339
+ const response = await targetAgent.invoke_getBrowserContexts();
1340
+ this.assertEquals(response.browserContextIds.length, 2);
1341
+ this.assertTrue(response.browserContextIds.includes(browserContextIds[0]));
1342
+ this.assertTrue(response.browserContextIds.includes(browserContextIds[1]));
1343
+
1344
+ await evalCode(target1, 'localStorage.setItem("page1", "page1")');
1345
+ await evalCode(target2, 'localStorage.setItem("page2", "page2")');
1346
+
1347
+ this.assertEquals(await evalCode(target1, 'localStorage.getItem("page1")'), 'page1');
1348
+ this.assertEquals(await evalCode(target1, 'localStorage.getItem("page2")'), null);
1349
+ this.assertEquals(await evalCode(target2, 'localStorage.getItem("page1")'), null);
1350
+ this.assertEquals(await evalCode(target2, 'localStorage.getItem("page2")'), 'page2');
1351
+
1352
+ const removedTargets = [];
1353
+ SDK.TargetManager.TargetManager.instance().observeTargets(
1354
+ {targetAdded: () => {}, targetRemoved: target => removedTargets.push(target)});
1355
+ await Promise.all([disposeBrowserContext(browserContextIds[0]), disposeBrowserContext(browserContextIds[1])]);
1356
+ this.assertEquals(removedTargets.length, 2);
1357
+ this.assertEquals(removedTargets.indexOf(target1) !== -1, true);
1358
+ this.assertEquals(removedTargets.indexOf(target2) !== -1, true);
1359
+
1360
+ this.releaseControl();
1361
+ };
1362
+
1363
+ /**
1364
+ * @param {string} url
1365
+ * @return {!Promise<!SDK.Target.Target>}
1366
+ */
1367
+ async function createIsolatedTarget(url, opt_browserContextIds) {
1368
+ const targetAgent = SDK.TargetManager.TargetManager.instance().rootTarget()?.targetAgent();
1369
+ const {browserContextId} = await targetAgent.invoke_createBrowserContext();
1370
+ if (opt_browserContextIds) {
1371
+ opt_browserContextIds.push(browserContextId);
1372
+ }
1373
+
1374
+ const {targetId} = await targetAgent.invoke_createTarget({url: 'about:blank', browserContextId});
1375
+ await targetAgent.invoke_attachToTarget({targetId, flatten: true});
1376
+
1377
+ const target = SDK.TargetManager.TargetManager.instance().targets().find(target => target.id() === targetId);
1378
+ const pageAgent = target.pageAgent();
1379
+ await pageAgent.invoke_enable();
1380
+ await pageAgent.invoke_navigate({url});
1381
+ return target;
1382
+ }
1383
+
1384
+ async function disposeBrowserContext(browserContextId) {
1385
+ const targetAgent = SDK.TargetManager.TargetManager.instance().rootTarget()?.targetAgent();
1386
+ await targetAgent.invoke_disposeBrowserContext({browserContextId});
1387
+ }
1388
+
1389
+ async function evalCode(target, code) {
1390
+ return (await target.runtimeAgent().invoke_evaluate({expression: code})).result.value;
1391
+ }
1392
+
1393
+ TestSuite.prototype.testInputDispatchEventsToOOPIF = async function() {
1394
+ this.takeControl();
1395
+
1396
+ await new Promise(callback => this._waitForTargets(2, callback));
1397
+
1398
+ async function takeLogs(target) {
1399
+ return await evalCode(target, `
1400
+ (function() {
1401
+ var result = window.logs.join(' ');
1402
+ window.logs = [];
1403
+ return result;
1404
+ })()`);
1405
+ }
1406
+
1407
+ let parentFrameOutput;
1408
+ let childFrameOutput;
1409
+
1410
+ const inputAgent = SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.inputAgent();
1411
+ const runtimeAgent = SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.runtimeAgent();
1412
+ await inputAgent.invoke_dispatchMouseEvent({type: 'mousePressed', button: 'left', clickCount: 1, x: 10, y: 10});
1413
+ await inputAgent.invoke_dispatchMouseEvent({type: 'mouseMoved', button: 'left', clickCount: 1, x: 10, y: 20});
1414
+ await inputAgent.invoke_dispatchMouseEvent({type: 'mouseReleased', button: 'left', clickCount: 1, x: 10, y: 20});
1415
+ await inputAgent.invoke_dispatchMouseEvent({type: 'mousePressed', button: 'left', clickCount: 1, x: 230, y: 140});
1416
+ await inputAgent.invoke_dispatchMouseEvent({type: 'mouseMoved', button: 'left', clickCount: 1, x: 230, y: 150});
1417
+ await inputAgent.invoke_dispatchMouseEvent({type: 'mouseReleased', button: 'left', clickCount: 1, x: 230, y: 150});
1418
+ parentFrameOutput = 'Event type: mousedown button: 0 x: 10 y: 10 Event type: mouseup button: 0 x: 10 y: 20';
1419
+ this.assertEquals(parentFrameOutput, await takeLogs(SDK.TargetManager.TargetManager.instance().targets()[0]));
1420
+ childFrameOutput = 'Event type: mousedown button: 0 x: 30 y: 40 Event type: mouseup button: 0 x: 30 y: 50';
1421
+ this.assertEquals(childFrameOutput, await takeLogs(SDK.TargetManager.TargetManager.instance().targets()[1]));
1422
+
1423
+ await inputAgent.invoke_dispatchKeyEvent({type: 'keyDown', key: 'a'});
1424
+ await runtimeAgent.invoke_evaluate({expression: 'document.querySelector(\'iframe\').focus()'});
1425
+ await inputAgent.invoke_dispatchKeyEvent({type: 'keyDown', key: 'a'});
1426
+ parentFrameOutput = 'Event type: keydown';
1427
+ this.assertEquals(parentFrameOutput, await takeLogs(SDK.TargetManager.TargetManager.instance().targets()[0]));
1428
+ childFrameOutput = 'Event type: keydown';
1429
+ this.assertEquals(childFrameOutput, await takeLogs(SDK.TargetManager.TargetManager.instance().targets()[1]));
1430
+
1431
+ await inputAgent.invoke_dispatchTouchEvent({type: 'touchStart', touchPoints: [{x: 10, y: 10}]});
1432
+ await inputAgent.invoke_dispatchTouchEvent({type: 'touchEnd', touchPoints: []});
1433
+ await inputAgent.invoke_dispatchTouchEvent({type: 'touchStart', touchPoints: [{x: 230, y: 140}]});
1434
+ await inputAgent.invoke_dispatchTouchEvent({type: 'touchEnd', touchPoints: []});
1435
+ parentFrameOutput = 'Event type: touchstart touch x: 10 touch y: 10';
1436
+ this.assertEquals(parentFrameOutput, await takeLogs(SDK.TargetManager.TargetManager.instance().targets()[0]));
1437
+ childFrameOutput = 'Event type: touchstart touch x: 30 touch y: 40';
1438
+ this.assertEquals(childFrameOutput, await takeLogs(SDK.TargetManager.TargetManager.instance().targets()[1]));
1439
+
1440
+ this.releaseControl();
1441
+ };
1442
+
1443
+ TestSuite.prototype.testLoadResourceForFrontend = async function(baseURL, fileURL) {
1444
+ const test = this;
1445
+ const loggedHeaders = new Set(['cache-control', 'pragma']);
1446
+ function testCase(url, headers, expectedStatus, expectedHeaders, expectedContent) {
1447
+ return new Promise(fulfill => {
1448
+ HostModule.ResourceLoader.load(url, headers, callback);
1449
+
1450
+ function callback(success, headers, content, errorDescription) {
1451
+ test.assertEquals(expectedStatus, errorDescription.statusCode);
1452
+
1453
+ const headersArray = [];
1454
+ for (const name in headers) {
1455
+ const nameLower = name.toLowerCase();
1456
+ if (loggedHeaders.has(nameLower)) {
1457
+ headersArray.push(nameLower);
1458
+ }
1459
+ }
1460
+ headersArray.sort();
1461
+ test.assertEquals(expectedHeaders.join(', '), headersArray.join(', '));
1462
+ test.assertEquals(expectedContent, content);
1463
+ fulfill();
1464
+ }
1465
+ });
1466
+ }
1467
+
1468
+ this.takeControl({slownessFactor: 10});
1469
+ await testCase(baseURL + 'non-existent.html', undefined, 404, [], '');
1470
+ await testCase(baseURL + 'hello.html', undefined, 200, [], '<!doctype html>\n<p>hello</p>\n');
1471
+ await testCase(baseURL + 'echoheader?x-devtools-test', {'x-devtools-test': 'Foo'}, 200, ['cache-control'], 'Foo');
1472
+ await testCase(baseURL + 'set-header?pragma:%20no-cache', undefined, 200, ['pragma'], 'pragma: no-cache');
1473
+
1474
+ await SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.runtimeAgent().invoke_evaluate({
1475
+ expression: `fetch("/set-cookie?devtools-test-cookie=Bar",
1476
+ {credentials: 'include'})`,
1477
+ awaitPromise: true
1478
+ });
1479
+ await testCase(baseURL + 'echoheader?Cookie', undefined, 200, ['cache-control'], 'devtools-test-cookie=Bar');
1480
+
1481
+ await SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.runtimeAgent().invoke_evaluate({
1482
+ expression: `fetch("/set-cookie?devtools-test-cookie=same-site-cookie;SameSite=Lax",
1483
+ {credentials: 'include'})`,
1484
+ awaitPromise: true
1485
+ });
1486
+ await testCase(
1487
+ baseURL + 'echoheader?Cookie', undefined, 200, ['cache-control'], 'devtools-test-cookie=same-site-cookie');
1488
+ await testCase('data:text/html,<body>hello</body>', undefined, 200, [], '<body>hello</body>');
1489
+ await testCase(fileURL, undefined, 200, [], '<!DOCTYPE html>\n<html>\n<body>\nDummy page.\n</body>\n</html>\n');
1490
+ await testCase(fileURL + 'thisfileshouldnotbefound', undefined, 404, [], '');
1491
+
1492
+ this.releaseControl();
1493
+ };
1494
+
1495
+ TestSuite.prototype.testExtensionWebSocketUserAgentOverride = async function(websocketPort) {
1496
+ this.takeControl();
1497
+
1498
+ const testUserAgent = 'test user agent';
1499
+ SDK.NetworkManager.MultitargetNetworkManager.instance().setUserAgentOverride(testUserAgent, null);
1500
+
1501
+ function onRequestUpdated(event) {
1502
+ const request = event.data;
1503
+ if (request.resourceType() !== Common.ResourceType.resourceTypes.WebSocket) {
1504
+ return;
1505
+ }
1506
+ if (!request.requestHeadersText()) {
1507
+ return;
1508
+ }
1509
+
1510
+ let actualUserAgent = 'no user-agent header';
1511
+ for (const {name, value} of request.requestHeaders()) {
1512
+ if (name.toLowerCase() === 'user-agent') {
1513
+ actualUserAgent = value;
1514
+ }
1515
+ }
1516
+ this.assertEquals(testUserAgent, actualUserAgent);
1517
+ this.releaseControl();
1518
+ }
1519
+ SDK.TargetManager.TargetManager.instance().addModelListener(
1520
+ SDK.NetworkManager.NetworkManager, SDK.NetworkManager.Events.RequestUpdated, onRequestUpdated.bind(this));
1521
+
1522
+ this.evaluateInConsole_(`new WebSocket('ws://127.0.0.1:${websocketPort}')`, () => {});
1523
+ };
1524
+
1525
+ TestSuite.prototype.testExtensionWebSocketOfflineNetworkConditions = async function(websocketPort) {
1526
+ SDK.NetworkManager.MultitargetNetworkManager.instance().setNetworkConditions(SDK.NetworkManager.OfflineConditions);
1527
+
1528
+ // TODO(crbug.com/1263900): Currently we don't send loadingFailed for web sockets.
1529
+ // Update this once we do.
1530
+ this.addSniffer(SDK.NetworkManager.NetworkDispatcher.prototype, 'webSocketClosed', () => {
1531
+ this.releaseControl();
1532
+ });
1533
+
1534
+ this.takeControl();
1535
+ this.evaluateInConsole_(`new WebSocket('ws://127.0.0.1:${websocketPort}/echo-with-no-extension')`, () => {});
1536
+ };
1537
+
1538
+ /**
1539
+ * Serializes array of uiSourceCodes to string.
1540
+ * @param {!Array.<!Workspace.UISourceCode>} uiSourceCodes
1541
+ * @return {string}
1542
+ */
1543
+ TestSuite.prototype.uiSourceCodesToString_ = function(uiSourceCodes) {
1544
+ const names = [];
1545
+ for (let i = 0; i < uiSourceCodes.length; i++) {
1546
+ names.push('"' + uiSourceCodes[i].url() + '"');
1547
+ }
1548
+ return names.join(',');
1549
+ };
1550
+
1551
+ TestSuite.prototype.testSourceMapsFromExtension = function(extensionId) {
1552
+ this.takeControl();
1553
+ const debuggerModel =
1554
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.model(SDK.DebuggerModel.DebuggerModel);
1555
+ debuggerModel.sourceMapManager().addEventListener(
1556
+ SDK.SourceMapManager.Events.SourceMapAttached, this.releaseControl.bind(this));
1557
+
1558
+ this.evaluateInConsole_(
1559
+ `console.log(1) //# sourceMappingURL=chrome-extension://${extensionId}/source.map`, () => {});
1560
+ };
1561
+
1562
+ TestSuite.prototype.testSourceMapsFromDevtools = function() {
1563
+ this.takeControl();
1564
+ const debuggerModel =
1565
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.model(SDK.DebuggerModel.DebuggerModel);
1566
+ debuggerModel.sourceMapManager().addEventListener(
1567
+ SDK.SourceMapManager.Events.SourceMapWillAttach, this.releaseControl.bind(this));
1568
+
1569
+ this.evaluateInConsole_(
1570
+ 'console.log(1) //# sourceMappingURL=devtools://devtools/bundled/devtools_compatibility.js', () => {});
1571
+ };
1572
+
1573
+ TestSuite.prototype.testDoesNotCrashOnSourceMapsFromUnknownScheme = function() {
1574
+ this.evaluateInConsole_('console.log(1) //# sourceMappingURL=invalid-scheme://source.map', () => {});
1575
+ };
1576
+
1577
+ /**
1578
+ * Returns all loaded non anonymous uiSourceCodes.
1579
+ * @return {!Array.<!Workspace.UISourceCode>}
1580
+ */
1581
+ TestSuite.prototype.nonAnonymousUISourceCodes_ = function() {
1582
+ /**
1583
+ * @param {!Workspace.UISourceCode} uiSourceCode
1584
+ */
1585
+ function filterOutService(uiSourceCode) {
1586
+ return !uiSourceCode.project().isServiceProject();
1587
+ }
1588
+
1589
+ const uiSourceCodes = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodes();
1590
+ return uiSourceCodes.filter(filterOutService);
1591
+ };
1592
+
1593
+ /*
1594
+ * Evaluates the code in the console as if user typed it manually and invokes
1595
+ * the callback when the result message is received and added to the console.
1596
+ * @param {string} code
1597
+ * @param {function(string)} callback
1598
+ */
1599
+ TestSuite.prototype.evaluateInConsole_ = function(code, callback) {
1600
+ function innerEvaluate() {
1601
+ UI.Context.Context.instance().removeFlavorChangeListener(
1602
+ SDK.RuntimeModel.ExecutionContext, showConsoleAndEvaluate, this);
1603
+ const consoleView = Console.ConsoleView.instance();
1604
+ consoleView.prompt.appendCommand(code);
1605
+
1606
+ this.addSniffer(Console.ConsoleView.prototype, 'consoleMessageAddedForTest', function(viewMessage) {
1607
+ callback(viewMessage.toMessageElement().deepTextContent());
1608
+ }.bind(this));
1609
+ }
1610
+
1611
+ function showConsoleAndEvaluate() {
1612
+ Common.Console.Console.instance().showPromise().then(innerEvaluate.bind(this));
1613
+ }
1614
+
1615
+ if (!UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext)) {
1616
+ UI.Context.Context.instance().addFlavorChangeListener(
1617
+ SDK.RuntimeModel.ExecutionContext, showConsoleAndEvaluate, this);
1618
+ return;
1619
+ }
1620
+ showConsoleAndEvaluate.call(this);
1621
+ };
1622
+
1623
+ /**
1624
+ * Checks that all expected scripts are present in the scripts list
1625
+ * in the Scripts panel.
1626
+ * @param {!Array.<string>} expected Regular expressions describing
1627
+ * expected script names.
1628
+ * @return {boolean} Whether all the scripts are in "scripts-files" select
1629
+ * box
1630
+ */
1631
+ TestSuite.prototype._scriptsAreParsed = function(expected) {
1632
+ const uiSourceCodes = this.nonAnonymousUISourceCodes_();
1633
+ // Check that at least all the expected scripts are present.
1634
+ const missing = expected.slice(0);
1635
+ for (let i = 0; i < uiSourceCodes.length; ++i) {
1636
+ for (let j = 0; j < missing.length; ++j) {
1637
+ if (uiSourceCodes[i].name().search(missing[j]) !== -1) {
1638
+ missing.splice(j, 1);
1639
+ break;
1640
+ }
1641
+ }
1642
+ }
1643
+ return missing.length === 0;
1644
+ };
1645
+
1646
+ /**
1647
+ * Waits for script pause, checks expectations, and invokes the callback.
1648
+ * @param {function():void} callback
1649
+ */
1650
+ TestSuite.prototype._waitForScriptPause = function(callback) {
1651
+ this.addSniffer(SDK.DebuggerModel.DebuggerModel.prototype, 'pausedScript', callback);
1652
+ };
1653
+
1654
+ /**
1655
+ * Waits until all the scripts are parsed and invokes the callback.
1656
+ */
1657
+ TestSuite.prototype._waitUntilScriptsAreParsed = function(expectedScripts, callback) {
1658
+ const test = this;
1659
+
1660
+ function waitForAllScripts() {
1661
+ if (test._scriptsAreParsed(expectedScripts)) {
1662
+ callback();
1663
+ } else {
1664
+ test.addSniffer(
1665
+ Sources.SourcesPanel.SourcesPanel.instance().sourcesView(), 'addUISourceCode', waitForAllScripts);
1666
+ }
1667
+ }
1668
+
1669
+ waitForAllScripts();
1670
+ };
1671
+
1672
+ TestSuite.prototype._waitForTargets = function(n, callback) {
1673
+ checkTargets.call(this);
1674
+
1675
+ function checkTargets() {
1676
+ if (SDK.TargetManager.TargetManager.instance().targets().length >= n) {
1677
+ callback.call(null);
1678
+ } else {
1679
+ this.addSniffer(SDK.TargetManager.TargetManager.prototype, 'createTarget', checkTargets.bind(this));
1680
+ }
1681
+ }
1682
+ };
1683
+
1684
+ TestSuite.prototype._waitForExecutionContexts = function(n, callback) {
1685
+ const runtimeModel =
1686
+ SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.model(SDK.RuntimeModel.RuntimeModel);
1687
+ checkForExecutionContexts.call(this);
1688
+
1689
+ function checkForExecutionContexts() {
1690
+ if (runtimeModel.executionContexts().length >= n) {
1691
+ callback.call(null);
1692
+ } else {
1693
+ this.addSniffer(
1694
+ SDK.RuntimeModel.RuntimeModel.prototype, 'executionContextCreated', checkForExecutionContexts.bind(this));
1695
+ }
1696
+ }
1697
+ };
1698
+
1699
+ window.uiTests = new TestSuite(window.domAutomationController);
1700
+ })(window);