@react-native/debugger-frontend 0.73.0-nightly-20230922-52104c6ee

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