Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js |
| index 7fe44929c70d94e4401a8c62f982929a0c26b0f6..d2a226a4692c96fcb8e9e89d2454fb96353479f9 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js |
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js |
| @@ -52,6 +52,14 @@ InspectorTest.evaluateInPage = function(code, callback) |
| InspectorTest.RuntimeAgent.evaluate(code, "console", false, mycallback); |
| } |
| +InspectorTest.addScriptUISourceCode = async function(url, content, isContentScript, worldId) { |
|
dgozman
2017/03/16 00:17:09
I'm worried this whether this forces everyone usin
lushnikov
2017/03/16 06:30:49
Done. The async is actually not needed here.
|
| + content += '\n//# sourceURL=' + url; |
| + if (isContentScript) |
| + content = `testRunner.evaluateScriptInIsolatedWorld(${worldId}, \`${content}\`)`; |
|
dgozman
2017/03/16 00:17:09
Nice one!
lushnikov
2017/03/16 06:30:49
Thanks!
|
| + InspectorTest.evaluateInPagePromise(content) |
|
dgozman
2017/03/16 00:17:09
nit: missing semicolon
lushnikov
2017/03/16 06:30:49
Done.
|
| + return InspectorTest.waitForUISourceCode(url); |
| +} |
| + |
| InspectorTest.evaluateInPagePromise = function(code) |
| { |
| return new Promise(succ => InspectorTest.evaluateInPage(code, succ)); |
| @@ -451,12 +459,6 @@ InspectorTest.waitForUISourceCodeRemoved = function(callback) |
| } |
| } |
| -InspectorTest._mockTargetId = 1; |
| -InspectorTest.createMockTarget = function(name, capabilities, dontAttachToMain) |
| -{ |
| - return SDK.targetManager.createTarget('mock-target-' + InspectorTest._mockTargetId++, name, capabilities || SDK.Target.Capability.AllForTests, params => new SDK.StubConnection(params), dontAttachToMain ? null : InspectorTest.mainTarget); |
| -} |
| - |
| InspectorTest.assertGreaterOrEqual = function(a, b, message) |
| { |
| if (a < b) |