DevTools: re-use sources_test_runner in debugger-test.js

debugger-test.js becomes a simple script to load sources_test_runner
module in order to reuse code between the legacy and new test frameworks.

Note: Some of the UI source code counts incremented by 2 because they are 
two new anonymous scripts from sources_test_runner initAsync calls.

Bug: 667560
Change-Id: I5232ad1a8e8aa2eafd9b0666793195c4d5742bc4
Reviewed-on: https://chromium-review.googlesource.com/716537
Commit-Queue: Will Chen <chenwilliam@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508617}
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/search/sources-search-scope-in-files-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/search/sources-search-scope-in-files-expected.txt
index 42c26de6..60833ba 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/search/sources-search-scope-in-files-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/search/sources-search-scope-in-files-expected.txt
@@ -1,7 +1,7 @@
 Tests that ScriptSearchScope performs search across all sources correctly.
 
 See bug 41350.
-Total uiSourceCodes: 14
+Total uiSourceCodes: 16
 
 Running: testIgnoreCase
 Search result #1: uiSourceCode.url = file:///var/www/search.css
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-async/async-callstack-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-async/async-callstack-expected.txt
index 93b4fae..6389f65 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-async/async-callstack-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-async/async-callstack-expected.txt
@@ -10,7 +10,7 @@
     [setTimeout]
     0) testFunction (async-callstack.html:13)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Call stack:
@@ -23,7 +23,7 @@
     [setTimeout]
     0) testFunction (async-callstack.html:13)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Call stack:
@@ -35,7 +35,7 @@
     [setTimeout]
     0) testFunction (async-callstack.html:13)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Call stack:
@@ -44,7 +44,7 @@
     [setTimeout]
     0) testFunction (async-callstack.html:13)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Call stack:
@@ -57,7 +57,7 @@
     [setTimeout]
     0) testFunction (async-callstack.html:13)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Call stack:
@@ -114,7 +114,7 @@
     [setTimeout]
     0) testFunction (async-callstack.html:13)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-async/async-callstack-scripted-scroll-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-async/async-callstack-scripted-scroll-expected.txt
index f6dd552..4ccd019 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-async/async-callstack-scripted-scroll-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-async/async-callstack-scripted-scroll-expected.txt
@@ -9,7 +9,7 @@
     [setTimeout]
     0) testFunction (async-callstack-scripted-scroll.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Call stack:
@@ -19,7 +19,7 @@
     [setTimeout]
     0) testFunction (async-callstack-scripted-scroll.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-blackbox-by-source-code-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-blackbox-by-source-code-expected.txt
index 4de5790..f80a8c5c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-blackbox-by-source-code-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-blackbox-by-source-code-expected.txt
@@ -4,7 +4,7 @@
 Call stack:
     0) testFunction (frameworks-blackbox-by-source-code.html:8)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -12,7 +12,7 @@
 Call stack:
     0) testFunction (frameworks-blackbox-by-source-code.html:10)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-sourcemap-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-sourcemap-expected.txt
index 8ab04c2..f4b7fd1 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-sourcemap-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-sourcemap-expected.txt
@@ -4,7 +4,7 @@
 Call stack:
     0) testFunction (frameworks-sourcemap.html:10)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -14,14 +14,14 @@
   * 1) foo (framework.js:4)
     2) testFunction (frameworks-sourcemap.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOut...
 Call stack:
     0) testFunction (frameworks-sourcemap.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-step-into-skips-setTimeout-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-step-into-skips-setTimeout-expected.txt
index 0bfaed1..e7f9186 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-step-into-skips-setTimeout-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-step-into-skips-setTimeout-expected.txt
@@ -11,7 +11,7 @@
   * 1) Framework.scheduleUntilDone (framework.js:138)
     2) testFunction (frameworks-step-into-skips-setTimeout.html:12)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOut...
@@ -23,7 +23,7 @@
   * 1) Framework.scheduleUntilDone (framework.js:138)
     2) testFunction (frameworks-step-into-skips-setTimeout.html:12)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -35,7 +35,7 @@
   * 1) Framework.scheduleUntilDone (framework.js:138)
     2) testFunction (frameworks-step-into-skips-setTimeout.html:12)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -50,7 +50,7 @@
   * 1) Framework.scheduleUntilDone (framework.js:138)
     2) testFunction (frameworks-step-into-skips-setTimeout.html:12)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-steppings-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-steppings-expected.txt
index 0709484..916f03a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-steppings-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-steppings-expected.txt
@@ -5,7 +5,7 @@
 Call stack:
     0) testFunction (frameworks-steppings.html:10)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -15,7 +15,7 @@
   * 1) Framework.safeRun (framework.js:8)
     2) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -27,7 +27,7 @@
   * 4) Framework.safeRun (framework.js:8)
     5) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -39,7 +39,7 @@
   * 4) Framework.safeRun (framework.js:8)
     5) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -55,7 +55,7 @@
   * 8) Framework.safeRun (framework.js:8)
     9) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -79,7 +79,7 @@
   * 13) Framework.safeRun (framework.js:8)
     14) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -103,7 +103,7 @@
   * 16) Framework.safeRun (framework.js:8)
     17) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -125,7 +125,7 @@
   * 13) Framework.safeRun (framework.js:8)
     14) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -146,7 +146,7 @@
   * 13) Framework.safeRun (framework.js:8)
     14) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOut...
@@ -162,7 +162,7 @@
   * 8) Framework.safeRun (framework.js:8)
     9) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOver...
@@ -174,7 +174,7 @@
   * 4) Framework.safeRun (framework.js:8)
     5) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -183,7 +183,7 @@
   * 1) Framework.safeRun (framework.js:8)
     2) testFunction (frameworks-steppings.html:11)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-with-async-callstack-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-with-async-callstack-expected.txt
index 5980b95..f47e262 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-with-async-callstack-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-frameworks/frameworks-with-async-callstack-expected.txt
@@ -23,7 +23,7 @@
     [setTimeout]
     0) testFunction (frameworks-with-async-callstack.html:15)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Printing visible call stack:
@@ -37,6 +37,6 @@
     [setTimeout]
     0) testFunction (frameworks-with-async-callstack.html:15)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-eval-on-call-frame-inside-iframe-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-eval-on-call-frame-inside-iframe-expected.txt
index c3806044..a13bcb35 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-eval-on-call-frame-inside-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-eval-on-call-frame-inside-iframe-expected.txt
@@ -17,7 +17,7 @@
 pauseInsideIframe @ VM:6
 testFunction @ debugger-eval-on-cal…side-iframe.html:35
 setTimeout (async)
-scheduleTestFunction @ debugger-test.js:3
+scheduleTestFunction @ VM:3
 (anonymous) @ VM:1
 
 === Evaluating on top frame ===
@@ -31,6 +31,6 @@
 pauseInsideIframe @ VM:6
 testFunction @ debugger-eval-on-cal…side-iframe.html:35
 setTimeout (async)
-scheduleTestFunction @ debugger-test.js:3
+scheduleTestFunction @ VM:3
 (anonymous) @ VM:1
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-eval-while-paused-throws-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-eval-while-paused-throws-expected.txt
index 1f879fb..6ee6ba5 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-eval-while-paused-throws-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-eval-while-paused-throws-expected.txt
@@ -14,7 +14,7 @@
 (anonymous) @ VM:1
 testFunction @ test.js:18
 setTimeout (async)
-scheduleTestFunction @ debugger-test.js:3
+scheduleTestFunction @ VM:3
 (anonymous) @ VM:1
 localObj.func()
 test.js:15 Uncaught Error: localObj.func
@@ -25,7 +25,7 @@
 (anonymous) @ VM:1
 testFunction @ test.js:18
 setTimeout (async)
-scheduleTestFunction @ debugger-test.js:3
+scheduleTestFunction @ VM:3
 (anonymous) @ VM:1
 globalObj.func()
 test.js:6 Uncaught Error: globalObj.func
@@ -36,6 +36,6 @@
 (anonymous) @ VM:1
 testFunction @ test.js:18
 setTimeout (async)
-scheduleTestFunction @ debugger-test.js:3
+scheduleTestFunction @ VM:3
 (anonymous) @ VM:1
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-pause-on-promise-rejection-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-pause-on-promise-rejection-expected.txt
index f349628..ddc0fe2 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-pause-on-promise-rejection-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-pause/debugger-pause-on-promise-rejection-expected.txt
@@ -7,7 +7,7 @@
 Call stack:
     0) testFunction (debugger-pause-on-promise-rejection.html:35)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 Paused on promise rejectionError: uncaught
 
@@ -16,13 +16,13 @@
 Call stack:
     0) testFunction (debugger-pause-on-promise-rejection.html:34)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 Paused on promise rejectionError: caught
 Call stack:
     0) testFunction (debugger-pause-on-promise-rejection.html:35)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 Paused on promise rejectionError: uncaught
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-into-across-timeouts-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-into-across-timeouts-expected.txt
index a4942da..4b33df4 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-into-across-timeouts-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-into-across-timeouts-expected.txt
@@ -6,7 +6,7 @@
     [setTimeout]
     0) testFunction (debugger-step-into-across-timeouts.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -18,7 +18,7 @@
     [setTimeout]
     0) testFunction (debugger-step-into-across-timeouts.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-out-across-timeouts-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-out-across-timeouts-expected.txt
index fd99257..7609cd2 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-out-across-timeouts-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-out-across-timeouts-expected.txt
@@ -6,7 +6,7 @@
     [setTimeout]
     0) testFunction (debugger-step-out-across-timeouts.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOut...
@@ -17,7 +17,7 @@
     [setTimeout]
     0) testFunction (debugger-step-out-across-timeouts.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-out-event-listener-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-out-event-listener-expected.txt
index 5ae61e7..93f2d1f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-out-event-listener-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-out-event-listener-expected.txt
@@ -6,7 +6,7 @@
     0) inner (debugger-step-out-event-listener.html:26)
     1) testFunction (debugger-step-out-event-listener.html:32)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -17,7 +17,7 @@
     1) inner (debugger-step-out-event-listener.html:27)
     2) testFunction (debugger-step-out-event-listener.html:32)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOut...
@@ -26,7 +26,7 @@
     1) inner (debugger-step-out-event-listener.html:27)
     2) testFunction (debugger-step-out-event-listener.html:32)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOut...
@@ -34,7 +34,7 @@
     0) inner (debugger-step-out-event-listener.html:29)
     1) testFunction (debugger-step-out-event-listener.html:32)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Set timer for test function.
@@ -42,14 +42,14 @@
     0) inner (debugger-step-out-event-listener.html:26)
     1) testFunction (debugger-step-out-event-listener.html:32)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOut...
 Call stack:
     0) testFunction (debugger-step-out-event-listener.html:33)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-over-across-timeouts-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-over-across-timeouts-expected.txt
index 157f2ed..dec9a45f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-over-across-timeouts-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-over-across-timeouts-expected.txt
@@ -6,7 +6,7 @@
     [setTimeout]
     0) testFunction (debugger-step-over-across-timeouts.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOver...
@@ -18,7 +18,7 @@
     [setTimeout]
     0) testFunction (debugger-step-over-across-timeouts.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-through-promises-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-through-promises-expected.txt
index 5fa68e0..7da23eb 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-through-promises-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-step/debugger-step-through-promises-expected.txt
@@ -7,7 +7,7 @@
     [Promise.resolve]
     0) testFunction (debugger-step-through-promises.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -16,7 +16,7 @@
     [Promise.resolve]
     0) testFunction (debugger-step-through-promises.html:9)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepInto...
@@ -25,7 +25,7 @@
     [Promise.resolve]
     0) testFunction (debugger-step-through-promises.html:14)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOver...
@@ -34,7 +34,7 @@
     [Promise.resolve]
     0) testFunction (debugger-step-through-promises.html:14)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOver...
@@ -43,7 +43,7 @@
     [Promise.resolve]
     0) testFunction (debugger-step-through-promises.html:19)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 Executing StepOver...
@@ -52,7 +52,7 @@
     [Promise.resolve]
     0) testFunction (debugger-step-through-promises.html:19)
     [setTimeout]
-    0) scheduleTestFunction (debugger-test.js:3)
+    0) scheduleTestFunction <omitted>
     <... skipped remaining frames ...>
 
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/async-call-stack-async-function-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/async-call-stack-async-function-expected.txt
index 30cdb94..9b1d2b2 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/async-call-stack-async-function-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/async-call-stack-async-function-expected.txt
@@ -7,6 +7,6 @@
 await in boo (async)
 testFunctiontest.js:18
 setTimeout (async)
-scheduleTestFunctiondebugger-test.js:3
+scheduleTestFunctionVM:3
 (anonymous)VM:1
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/async-call-stack-url-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/async-call-stack-url-expected.txt
index 47611f8..24f27e2 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/async-call-stack-url-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/async-call-stack-url-expected.txt
@@ -8,7 +8,7 @@
 setTimeout (async)
 testFunctionasync-call-stack-url.html:10
 setTimeout (async)
-scheduleTestFunctiondebugger-test.js:3
+scheduleTestFunctionVM:3
 (anonymous)VM:1
 Script execution resumed.
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/copy-stack-trace-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/copy-stack-trace-expected.txt
index ee2a1ca..485e1fc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/copy-stack-trace-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/copy-stack-trace-expected.txt
@@ -6,7 +6,7 @@
 functionBar (copy-stack-trace.html:14)
 testFunction (copy-stack-trace.html:9)
 setTimeout (async)
-scheduleTestFunction (debugger-test.js:3)
+scheduleTestFunction (VM:3)
 (anonymous) (VM:1)
 Script execution resumed.
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/script-collected-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/script-collected-expected.txt
index 96b5bf0..8edc4e6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/script-collected-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/script-collected-expected.txt
@@ -1,5 +1,5 @@
 Tests that DiscardedAnonymousScriptSource event is fired and workspace is cleared.
 
 Discarded: 1100
-Remaining UISourceCodes: 900
+Remaining UISourceCodes: 902
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
index 7542c935..aafdeab 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
@@ -1,720 +1,5 @@
-function scheduleTestFunction()
-{
-    setTimeout(testFunction, 0);
-}
-
 var initialize_DebuggerTest = function() {
+    InspectorTest.preloadModule('sources_test_runner');
 
-InspectorTest.preloadPanel("sources");
-
-InspectorTest.startDebuggerTest = function(callback, quiet)
-{
-    console.assert(InspectorTest.debuggerModel.debuggerEnabled(), "Debugger has to be enabled");
-    if (quiet !== undefined)
-        InspectorTest._quiet = quiet;
-    UI.viewManager.showView("sources");
-
-    InspectorTest.addSniffer(SDK.DebuggerModel.prototype, "_pausedScript", InspectorTest._pausedScript, true);
-    InspectorTest.addSniffer(SDK.DebuggerModel.prototype, "_resumedScript", InspectorTest._resumedScript, true);
-    InspectorTest.safeWrap(callback)();
-};
-
-InspectorTest.startDebuggerTestPromise = function(quiet)
-{
-    var cb;
-    var p = new Promise(fullfill => cb = fullfill);
-    InspectorTest.startDebuggerTest(cb, quiet);
-    return p;
-}
-
-InspectorTest.completeDebuggerTest = function()
-{
-    Bindings.breakpointManager.setBreakpointsActive(true);
-    InspectorTest.resumeExecution(InspectorTest.completeTest.bind(InspectorTest));
-};
-
-(function() {
-    // FIXME: Until there is no window.onerror() for uncaught exceptions in promises
-    // we use this hack to print the exceptions instead of just timing out.
-
-    var origThen = Promise.prototype.then;
-    var origCatch = Promise.prototype.catch;
-
-    Promise.prototype.then = function()
-    {
-        var result = origThen.apply(this, arguments);
-        origThen.call(result, undefined, onUncaughtPromiseReject.bind(null, new Error().stack));
-        return result;
-    }
-
-    Promise.prototype.catch = function()
-    {
-        var result = origCatch.apply(this, arguments);
-        origThen.call(result, undefined, onUncaughtPromiseReject.bind(null, new Error().stack));
-        return result;
-    }
-
-    function onUncaughtPromiseReject(stack, e)
-    {
-        var message = (typeof e === "object" && e.stack) || e;
-        InspectorTest.addResult("FAIL: Uncaught exception in promise: " + message + " " + stack);
-        InspectorTest.completeDebuggerTest();
-    }
-})();
-
-InspectorTest.runDebuggerTestSuite = function(testSuite)
-{
-    var testSuiteTests = testSuite.slice();
-
-    function runner()
-    {
-        if (!testSuiteTests.length) {
-            InspectorTest.completeDebuggerTest();
-            return;
-        }
-
-        var nextTest = testSuiteTests.shift();
-        InspectorTest.addResult("");
-        InspectorTest.addResult("Running: " + /function\s([^(]*)/.exec(nextTest)[1]);
-        InspectorTest.safeWrap(nextTest)(runner, runner);
-    }
-
-    InspectorTest.startDebuggerTest(runner);
-};
-
-InspectorTest.runTestFunction = function()
-{
-    InspectorTest.evaluateInPage("scheduleTestFunction()");
-    InspectorTest.addResult("Set timer for test function.");
-};
-
-InspectorTest.runTestFunctionAndWaitUntilPaused = function(callback)
-{
-    InspectorTest.runTestFunction();
-    InspectorTest.waitUntilPaused(callback);
-};
-
-InspectorTest.runTestFunctionAndWaitUntilPausedPromise = function()
-{
-    return new Promise(InspectorTest.runTestFunctionAndWaitUntilPaused);
-}
-
-InspectorTest.runAsyncCallStacksTest = function(totalDebuggerStatements, maxAsyncCallStackDepth)
-{
-    var defaultMaxAsyncCallStackDepth = 32;
-
-    InspectorTest.setQuiet(true);
-    InspectorTest.startDebuggerTest(step1);
-
-    async function step1()
-    {
-        await InspectorTest.DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth || defaultMaxAsyncCallStackDepth);
-        InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
-    }
-
-    var step = 0;
-    var callStacksOutput = [];
-    function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
-    {
-        ++step;
-        callStacksOutput.push(InspectorTest.captureStackTraceIntoString(callFrames, asyncStackTrace) + "\n");
-        if (step < totalDebuggerStatements) {
-            InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, didPause));
-        } else {
-            InspectorTest.addResult("Captured call stacks in no particular order:");
-            callStacksOutput.sort();
-            InspectorTest.addResults(callStacksOutput);
-            InspectorTest.completeDebuggerTest();
-        }
-    }
-};
-
-InspectorTest.dumpSourceFrameMessages = function(sourceFrame, dumpFullURL)
-{
-    var messages = [];
-    for (var bucket of sourceFrame._rowMessageBuckets.values()) {
-        for (var rowMessage of bucket._messages) {
-            var message = rowMessage.message();
-            messages.push(String.sprintf("  %d:%d [%s] %s", message.lineNumber(), message.columnNumber(), message.level(), message.text()));
-        }
-    }
-    var name = dumpFullURL ? sourceFrame.uiSourceCode().url() : sourceFrame.uiSourceCode().displayName();
-    InspectorTest.addResult("SourceFrame " + name + ": " + messages.length + " message(s)");
-    InspectorTest.addResult(messages.join("\n"));
-}
-
-InspectorTest.waitUntilPausedNextTime = function(callback)
-{
-    InspectorTest._waitUntilPausedCallback = InspectorTest.safeWrap(callback);
-};
-
-InspectorTest.waitUntilPaused = function(callback)
-{
-    callback = InspectorTest.safeWrap(callback);
-
-    if (InspectorTest._pausedScriptArguments)
-        callback.apply(callback, InspectorTest._pausedScriptArguments);
-    else
-        InspectorTest._waitUntilPausedCallback = callback;
-};
-
-InspectorTest.waitUntilPausedPromise = function()
-{
-    return new Promise(resolve => InspectorTest.waitUntilPaused(resolve));
-}
-
-InspectorTest.waitUntilResumedNextTime = function(callback)
-{
-    InspectorTest._waitUntilResumedCallback = InspectorTest.safeWrap(callback);
-};
-
-InspectorTest.waitUntilResumed = function(callback)
-{
-    callback = InspectorTest.safeWrap(callback);
-
-    if (!InspectorTest._pausedScriptArguments)
-        callback();
-    else
-        InspectorTest._waitUntilResumedCallback = callback;
-};
-
-InspectorTest.resumeExecution = function(callback)
-{
-    if (UI.panels.sources.paused())
-        UI.panels.sources._togglePause();
-    InspectorTest.waitUntilResumed(callback);
-};
-
-InspectorTest.waitUntilPausedAndDumpStackAndResume = function(callback, options)
-{
-    InspectorTest.waitUntilPaused(paused);
-    InspectorTest.addSniffer(Sources.SourcesPanel.prototype, "_updateDebuggerButtonsAndStatus", setStatus);
-
-    var caption;
-    var callFrames;
-    var asyncStackTrace;
-
-    function setStatus()
-    {
-        var statusElement = this.element.querySelector(".paused-message");
-        caption = statusElement.deepTextContent();
-        if (callFrames)
-            step1();
-    }
-
-    function paused(frames, reason, breakpointIds, async)
-    {
-        callFrames = frames;
-        asyncStackTrace = async;
-        if (typeof caption === "string")
-            step1();
-    }
-
-    function step1()
-    {
-        InspectorTest.captureStackTrace(callFrames, asyncStackTrace, options);
-        InspectorTest.addResult(InspectorTest.clearSpecificInfoFromStackFrames(caption));
-        InspectorTest.deprecatedRunAfterPendingDispatches(step2);
-    }
-
-    function step2()
-    {
-        InspectorTest.resumeExecution(InspectorTest.safeWrap(callback));
-    }
-};
-
-InspectorTest.stepOver = function()
-{
-    Promise.resolve().then(function(){UI.panels.sources._stepOver()});
-};
-
-InspectorTest.stepInto = function()
-{
-    Promise.resolve().then(function(){UI.panels.sources._stepInto()});
-};
-
-InspectorTest.stepOut = function()
-{
-    Promise.resolve().then(function(){UI.panels.sources._stepOut()});
-};
-
-InspectorTest.togglePause = function()
-{
-    Promise.resolve().then(function(){UI.panels.sources._togglePause()});
-};
-
-InspectorTest.waitUntilPausedAndPerformSteppingActions = function(actions, callback)
-{
-    callback = InspectorTest.safeWrap(callback);
-    InspectorTest.waitUntilPaused(didPause);
-
-    function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
-    {
-        var action = actions.shift();
-        if (action === "Print") {
-            InspectorTest.captureStackTrace(callFrames, asyncStackTrace);
-            InspectorTest.addResult("");
-            while (action === "Print")
-                action = actions.shift();
-        }
-
-        if (!action) {
-            callback();
-            return;
-        }
-
-        InspectorTest.addResult("Executing " + action + "...");
-
-        switch (action) {
-        case "StepInto":
-            InspectorTest.stepInto();
-            break;
-        case "StepOver":
-            InspectorTest.stepOver();
-            break;
-        case "StepOut":
-            InspectorTest.stepOut();
-            break;
-        case "Resume":
-            InspectorTest.togglePause();
-            break;
-        default:
-            InspectorTest.addResult("FAIL: Unknown action: " + action);
-            callback();
-            return;
-        }
-
-        InspectorTest.waitUntilResumed(actions.length ? InspectorTest.waitUntilPaused.bind(InspectorTest, didPause) : callback);
-    }
-};
-
-InspectorTest.captureStackTrace = function(callFrames, asyncStackTrace, options)
-{
-    InspectorTest.addResult(InspectorTest.captureStackTraceIntoString(callFrames, asyncStackTrace, options));
-};
-
-InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace, options)
-{
-    var results = [];
-    options = options || {};
-    function printCallFrames(callFrames, locationFunction, returnValueFunction)
-    {
-        var printed = 0;
-        for (var i = 0; i < callFrames.length; i++) {
-            var frame = callFrames[i];
-            var location = locationFunction.call(frame);
-            var script = location.script();
-            var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(location);
-            var isFramework = Bindings.blackboxManager.isBlackboxedRawLocation(location);
-            if (options.dropFrameworkCallFrames && isFramework)
-                continue;
-            var url;
-            var lineNumber;
-            if (uiLocation && uiLocation.uiSourceCode.project().type() !== Workspace.projectTypes.Debugger) {
-                url = uiLocation.uiSourceCode.name();
-                lineNumber = uiLocation.lineNumber + 1;
-            } else {
-                url = Bindings.displayNameForURL(script.sourceURL);
-                lineNumber = location.lineNumber + 1;
-            }
-            var s = (isFramework ? "  * " : "    ") + (printed++) + ") " + frame.functionName + " (" + url + (options.dropLineNumbers ? "" : ":" + lineNumber) + ")";
-            results.push(s);
-            if (options.printReturnValue && returnValueFunction && returnValueFunction.call(frame))
-                results.push("       <return>: " + returnValueFunction.call(frame).description);
-            if (frame.functionName === "scheduleTestFunction") {
-                var remainingFrames = callFrames.length - 1 - i;
-                if (remainingFrames)
-                    results.push("    <... skipped remaining frames ...>");
-                break;
-            }
-        }
-        return printed;
-    }
-
-    function runtimeCallFramePosition()
-    {
-        return new SDK.DebuggerModel.Location(debuggerModel, this.scriptId, this.lineNumber, this.columnNumber);
-    }
-
-    results.push("Call stack:");
-    printCallFrames(callFrames, SDK.DebuggerModel.CallFrame.prototype.location, SDK.DebuggerModel.CallFrame.prototype.returnValue);
-    while (asyncStackTrace) {
-        results.push("    [" + (asyncStackTrace.description || "Async Call") + "]");
-        var debuggerModel = InspectorTest.debuggerModel;
-        var printed = printCallFrames(asyncStackTrace.callFrames, runtimeCallFramePosition);
-        if (!printed)
-            results.pop();
-        asyncStackTrace = asyncStackTrace.parent;
-    }
-    return results.join("\n");
-};
-
-InspectorTest.dumpSourceFrameContents = function(sourceFrame)
-{
-    InspectorTest.addResult("==Source frame contents start==");
-    var textEditor = sourceFrame._textEditor;
-    for (var i = 0; i < textEditor.linesCount; ++i)
-        InspectorTest.addResult(textEditor.line(i));
-    InspectorTest.addResult("==Source frame contents end==");
-};
-
-InspectorTest._pausedScript = function(callFrames, reason, auxData, breakpointIds, asyncStackTrace)
-{
-    if (!InspectorTest._quiet)
-        InspectorTest.addResult("Script execution paused.");
-    var debuggerModel = this.target().model(SDK.DebuggerModel);
-    InspectorTest._pausedScriptArguments = [SDK.DebuggerModel.CallFrame.fromPayloadArray(debuggerModel, callFrames), reason, breakpointIds, asyncStackTrace, auxData];
-    if (InspectorTest._waitUntilPausedCallback) {
-        var callback = InspectorTest._waitUntilPausedCallback;
-        delete InspectorTest._waitUntilPausedCallback;
-        setTimeout(() => callback.apply(callback, InspectorTest._pausedScriptArguments));
-    }
-};
-
-InspectorTest._resumedScript = function()
-{
-    if (!InspectorTest._quiet)
-        InspectorTest.addResult("Script execution resumed.");
-    delete InspectorTest._pausedScriptArguments;
-    if (InspectorTest._waitUntilResumedCallback) {
-        var callback = InspectorTest._waitUntilResumedCallback;
-        delete InspectorTest._waitUntilResumedCallback;
-        callback();
-    }
-};
-
-InspectorTest.showUISourceCode = function(uiSourceCode, callback)
-{
-    var panel = UI.panels.sources;
-    panel.showUISourceCode(uiSourceCode);
-    var sourceFrame = panel.visibleView;
-    if (sourceFrame.loaded)
-        callback(sourceFrame);
-    else
-        InspectorTest.addSniffer(sourceFrame, "onTextEditorContentSet", callback && callback.bind(null, sourceFrame));
-};
-
-InspectorTest.showUISourceCodePromise = function(uiSourceCode)
-{
-    var fulfill;
-    var promise = new Promise(x => fulfill = x);
-    InspectorTest.showUISourceCode(uiSourceCode, fulfill);
-    return promise;
-}
-
-InspectorTest.showScriptSource = function(scriptName, callback)
-{
-    InspectorTest.waitForScriptSource(scriptName, onScriptSource);
-
-    function onScriptSource(uiSourceCode)
-    {
-        InspectorTest.showUISourceCode(uiSourceCode, callback);
-    }
-};
-
-InspectorTest.waitForScriptSource = function(scriptName, callback)
-{
-    var panel = UI.panels.sources;
-    var uiSourceCodes = panel._workspace.uiSourceCodes();
-    for (var i = 0; i < uiSourceCodes.length; ++i) {
-        if (uiSourceCodes[i].project().type() === Workspace.projectTypes.Service)
-            continue;
-        if (uiSourceCodes[i].name() === scriptName) {
-            callback(uiSourceCodes[i]);
-            return;
-        }
-    }
-
-    InspectorTest.addSniffer(Sources.SourcesView.prototype, "_addUISourceCode", InspectorTest.waitForScriptSource.bind(InspectorTest, scriptName, callback));
-};
-
-InspectorTest.setBreakpoint = function(sourceFrame, lineNumber, condition, enabled)
-{
-    if (!sourceFrame._muted)
-        sourceFrame._setBreakpoint(lineNumber, 0, condition, enabled);
-};
-
-InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber)
-{
-    sourceFrame._breakpointManager.findBreakpoints(sourceFrame._uiSourceCode, lineNumber)[0].remove();
-};
-
-InspectorTest.createNewBreakpoint = function(sourceFrame, lineNumber, condition, enabled)
-{
-    var promise = new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__proto__, "_breakpointWasSetForTest", resolve));
-    sourceFrame._createNewBreakpoint(lineNumber, condition, enabled);
-    return promise;
-}
-
-InspectorTest.toggleBreakpoint = function(sourceFrame, lineNumber, disableOnly)
-{
-    if (!sourceFrame._muted)
-        sourceFrame._toggleBreakpoint(lineNumber, disableOnly);
-};
-
-InspectorTest.waitBreakpointSidebarPane = function(waitUntilResolved)
-{
-    return new Promise(resolve => InspectorTest.addSniffer(Sources.JavaScriptBreakpointsSidebarPane.prototype, "_didUpdateForTest", resolve)).then(checkIfReady);
-    function checkIfReady()
-    {
-        if (!waitUntilResolved)
-            return;
-        for (var breakpoint of Bindings.breakpointManager._allBreakpoints()) {
-            if (breakpoint._fakePrimaryLocation && breakpoint.enabled())
-                return InspectorTest.waitBreakpointSidebarPane();
-        }
-    }
-}
-
-InspectorTest.breakpointsSidebarPaneContent = function()
-{
-    var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane).contentElement;
-    var empty = paneElement.querySelector('.gray-info-message');
-    if (empty)
-        return InspectorTest.textContentWithLineBreaks(empty);
-    var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry'));
-    return entries.map(InspectorTest.textContentWithLineBreaks).join('\n');
-}
-
-InspectorTest.dumpBreakpointSidebarPane = function(title)
-{
-    InspectorTest.addResult("Breakpoint sidebar pane " + (title || ""));
-    InspectorTest.addResult(InspectorTest.breakpointsSidebarPaneContent());
-};
-
-InspectorTest.dumpScopeVariablesSidebarPane = function()
-{
-    InspectorTest.addResult("Scope variables sidebar pane:");
-    var sections = InspectorTest.scopeChainSections();
-    for (var i = 0; i < sections.length; ++i) {
-        var textContent = InspectorTest.textContentWithLineBreaks(sections[i].element);
-        var text = InspectorTest.clearSpecificInfoFromStackFrames(textContent);
-        if (text.length > 0)
-            InspectorTest.addResult(text);
-        if (!sections[i].objectTreeElement().expanded)
-            InspectorTest.addResult("    <section collapsed>");
-    }
-};
-
-InspectorTest.scopeChainSections = function()
-{
-    var children = self.runtime.sharedInstance(Sources.ScopeChainSidebarPane).contentElement.children;
-    var sections = [];
-    for (var i = 0; i < children.length; ++i)
-        sections.push(children[i]._section);
-
-    return sections;
-}
-
-InspectorTest.expandScopeVariablesSidebarPane = function(callback)
-{
-    // Expand all but the global scope. Expanding global scope takes for too long so we keep it collapsed.
-    var sections = InspectorTest.scopeChainSections();
-    for (var i = 0; i < sections.length - 1; ++i)
-        sections[i].expand();
-    InspectorTest.deprecatedRunAfterPendingDispatches(callback);
-};
-
-InspectorTest.expandProperties = function(properties, callback)
-{
-    var index = 0;
-    function expandNextPath()
-    {
-        if (index === properties.length) {
-            InspectorTest.safeWrap(callback)();
-            return;
-        }
-        var parentTreeElement = properties[index++];
-        var path = properties[index++];
-        InspectorTest._expandProperty(parentTreeElement, path, 0, expandNextPath);
-    }
-    InspectorTest.deprecatedRunAfterPendingDispatches(expandNextPath);
-};
-
-InspectorTest._expandProperty = function(parentTreeElement, path, pathIndex, callback)
-{
-    if (pathIndex === path.length) {
-        InspectorTest.addResult("Expanded property: " + path.join("."));
-        callback();
-        return;
-    }
-    var name = path[pathIndex++];
-    var propertyTreeElement = InspectorTest._findChildPropertyTreeElement(parentTreeElement, name);
-    if (!propertyTreeElement) {
-       InspectorTest.addResult("Failed to expand property: " + path.slice(0, pathIndex).join("."));
-       InspectorTest.completeDebuggerTest();
-       return;
-    }
-    propertyTreeElement.expand();
-    InspectorTest.deprecatedRunAfterPendingDispatches(InspectorTest._expandProperty.bind(InspectorTest, propertyTreeElement, path, pathIndex, callback));
-};
-
-InspectorTest._findChildPropertyTreeElement = function(parent, childName)
-{
-    var children = parent.children();
-    for (var i = 0; i < children.length; i++) {
-        var treeElement = children[i];
-        var property = treeElement.property;
-        if (property.name === childName)
-            return treeElement;
-    }
-};
-
-InspectorTest.setQuiet = function(quiet)
-{
-    InspectorTest._quiet = quiet;
-};
-
-InspectorTest.queryScripts = function(filter)
-{
-    var scripts = InspectorTest.debuggerModel.scripts();
-    return filter ? scripts.filter(filter) : scripts;
-};
-
-InspectorTest.createScriptMock = function(url, startLine, startColumn, isContentScript, source, target, preRegisterCallback)
-{
-    target = target || SDK.targetManager.mainTarget();
-    var debuggerModel = target.model(SDK.DebuggerModel);
-    var scriptId = ++InspectorTest._lastScriptId + "";
-    var lineCount = source.computeLineEndings().length;
-    var endLine = startLine + lineCount - 1;
-    var endColumn = lineCount === 1 ? startColumn + source.length : source.length - source.computeLineEndings()[lineCount - 2];
-    var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!source.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m);
-    var script = new SDK.Script(debuggerModel, scriptId, url, startLine, startColumn, endLine, endColumn, 0, "", isContentScript, false, undefined, hasSourceURL, source.length);
-    script.requestContent = function()
-    {
-        var trimmedSource = SDK.Script._trimSourceURLComment(source);
-        return Promise.resolve(trimmedSource);
-    };
-    if (preRegisterCallback)
-        preRegisterCallback(script);
-    debuggerModel._registerScript(script);
-    return script;
-};
-
-InspectorTest._lastScriptId = 0;
-
-InspectorTest.checkRawLocation = function(script, lineNumber, columnNumber, location)
-{
-    InspectorTest.assertEquals(script.scriptId, location.scriptId, "Incorrect scriptId");
-    InspectorTest.assertEquals(lineNumber, location.lineNumber, "Incorrect lineNumber");
-    InspectorTest.assertEquals(columnNumber, location.columnNumber, "Incorrect columnNumber");
-};
-
-InspectorTest.checkUILocation = function(uiSourceCode, lineNumber, columnNumber, location)
-{
-    InspectorTest.assertEquals(uiSourceCode, location.uiSourceCode, "Incorrect uiSourceCode, expected '" + (uiSourceCode ? uiSourceCode.url() : null) + "'," +
-                                                                    " but got '" + (location.uiSourceCode ? location.uiSourceCode.url() : null) + "'");
-    InspectorTest.assertEquals(lineNumber, location.lineNumber, "Incorrect lineNumber, expected '" + lineNumber + "', but got '" + location.lineNumber + "'");
-    InspectorTest.assertEquals(columnNumber, location.columnNumber, "Incorrect columnNumber, expected '" + columnNumber + "', but got '" + location.columnNumber + "'");
-};
-
-InspectorTest.scriptFormatter = function()
-{
-    return self.runtime.allInstances(Sources.SourcesView.EditorAction).then(function(editorActions) {
-        for (var i = 0; i < editorActions.length; ++i) {
-            if (editorActions[i] instanceof Sources.ScriptFormatterEditorAction)
-                return editorActions[i];
-        }
-        return null;
-    });
-};
-
-InspectorTest.waitForExecutionContextInTarget = function(target, callback)
-{
-    var runtimeModel = target.model(SDK.RuntimeModel);
-    if (runtimeModel.executionContexts().length) {
-        callback(runtimeModel.executionContexts()[0]);
-        return;
-    }
-    runtimeModel.addEventListener(SDK.RuntimeModel.Events.ExecutionContextCreated, contextCreated);
-
-    function contextCreated()
-    {
-        runtimeModel.removeEventListener(SDK.RuntimeModel.Events.ExecutionContextCreated, contextCreated);
-        callback(runtimeModel.executionContexts()[0]);
-    }
-}
-
-InspectorTest.selectThread = function(target)
-{
-    var threadsPane = self.runtime.sharedInstance(Sources.ThreadsSidebarPane);
-    threadsPane._list.selectItem(target.model(SDK.DebuggerModel));
-}
-
-InspectorTest.evaluateOnCurrentCallFrame = function(code)
-{
-    return InspectorTest.debuggerModel.evaluateOnSelectedCallFrame({expression: code, objectGroup: "console"});
-}
-
-InspectorTest.waitJavaScriptSourceFrameBreakpoints = function(sourceFrame, inline)
-{
-    return waitUpdate().then(checkIfReady);
-    function waitUpdate()
-    {
-        return new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__proto__, "_breakpointDecorationsUpdatedForTest", resolve));
-    }
-    function checkIfReady()
-    {
-        for (var breakpoint of Bindings.breakpointManager._allBreakpoints()) {
-            if (breakpoint._fakePrimaryLocation && breakpoint.enabled())
-                return waitUpdate().then(checkIfReady);
-        }
-        return Promise.resolve();
-    }
-}
-
-InspectorTest.dumpJavaScriptSourceFrameBreakpoints = function(sourceFrame)
-{
-    var textEditor = sourceFrame._textEditor;
-    for (var lineNumber = 0; lineNumber < textEditor.linesCount; ++lineNumber) {
-        if (!textEditor.hasLineClass(lineNumber, "cm-breakpoint"))
-            continue;
-        var disabled = textEditor.hasLineClass(lineNumber, "cm-breakpoint-disabled");
-        var conditional = textEditor.hasLineClass(lineNumber, "cm-breakpoint-conditional")
-        InspectorTest.addResult("breakpoint at " + lineNumber + (disabled ? " disabled" : "") + (conditional ? " conditional" : ""));
-
-        var range = new TextUtils.TextRange(lineNumber, 0, lineNumber, textEditor.line(lineNumber).length);
-        var bookmarks = textEditor.bookmarks(range, Sources.JavaScriptSourceFrame.BreakpointDecoration._bookmarkSymbol);
-        bookmarks = bookmarks.filter(bookmark => !!bookmark.position());
-        bookmarks.sort((bookmark1, bookmark2) => bookmark1.position().startColumn - bookmark2.position().startColumn);
-        for (var bookmark of bookmarks) {
-            var position = bookmark.position();
-            var element = bookmark[Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest];
-            var disabled = element.classList.contains("cm-inline-disabled");
-            var conditional = element.classList.contains("cm-inline-conditional");
-            InspectorTest.addResult("  inline breakpoint at (" + position.startLine + ", " + position.startColumn + ")" + (disabled ? " disabled" : "") + (conditional ? " conditional" : ""));
-        }
-    }
-}
-
-InspectorTest.clickJavaScriptSourceFrameBreakpoint = function(sourceFrame, lineNumber, index, next)
-{
-    var textEditor = sourceFrame._textEditor;
-    var lineLength = textEditor.line(lineNumber).length;
-    var lineRange = new TextUtils.TextRange(lineNumber, 0, lineNumber, lineLength);
-    var bookmarks = textEditor.bookmarks(lineRange, Sources.JavaScriptSourceFrame.BreakpointDecoration._bookmarkSymbol);
-    bookmarks.sort((bookmark1, bookmark2) => bookmark1.position().startColumn - bookmark2.position().startColumn);
-    var bookmark = bookmarks[index];
-    if (bookmark) {
-        bookmark[Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest].click();
-    } else {
-        InspectorTest.addResult(`Could not click on Javascript breakpoint - lineNumber: ${lineNumber}, index: ${index}`);
-        next();
-    }
-}
-
-InspectorTest.setEventListenerBreakpoint = function(id, enabled, targetName)
-{
-    var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpointsSidebarPane);
-    var auxData = {'eventName': id};
-    if (targetName)
-        auxData.targetName = targetName;
-    var breakpoint = SDK.domDebuggerManager.resolveEventListenerBreakpoint(auxData);
-    if (breakpoint.enabled() !== enabled) {
-        pane._breakpoints.get(breakpoint).checkbox.checked = enabled;
-        pane._breakpointCheckboxClicked(breakpoint);
-    }
-}
-
+    InspectorTest.preloadPanel("sources");
 };