Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: LayoutTests/dart/inspector/debugger-eval-on-call-frame.html

Issue 1689873002: Enable inspector tests disabled when dart:html was switched to JS interop. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/dart/inspector/debugger-eval-on-call-frame.html
diff --git a/LayoutTests/dart/inspector/debugger-eval-on-call-frame.html b/LayoutTests/dart/inspector/debugger-eval-on-call-frame.html
index fe7c1b66efd649979327e3174c726bef8c4eca33..feeef363f572e2d87b7756cd5df703cdffdf30d1 100644
--- a/LayoutTests/dart/inspector/debugger-eval-on-call-frame.html
+++ b/LayoutTests/dart/inspector/debugger-eval-on-call-frame.html
@@ -1,6 +1,7 @@
<html>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/debugger-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
<script type="application/dart" src="debugger-eval-on-call-frame.DART"></script>
@@ -17,6 +18,20 @@ function testFunction() {
function test()
{
+ // Inject name mangling for Dart more deeply in the existing JS test
+ // framework to reduce the amount of code that we need to duplicate from
+ // the JS side.
+ realAddResult = InspectorTest.addResult;
+ InspectorTest.addResult = function(text) {
+ text = text.replace(/(file:\/\/\/\w):/g, "$1");
+ text = text.replace(/file:\/\/\/?[^: )]*([.]dart|[$]script|[$]trampoline)/g, "(SOURCE_LOCATION)");
+ text = text.replace(/\(file:\/\/\/?[^)]*\)/g, "(SOURCE_LOCATION)");
+ text = text.replace(/@\d+/g, "(VM_PRIVATE_MANGLING)");
+ text = text.replace(/\$main\-[0-9]*/g, "(DEFAULT_ISOLATE_NAME_SUFFIX)");
+ text = text.replace(/:\d\d\d+/g, ":xxxx");
+ return realAddResult.call(this, text);
+ };
+
var panel = WebInspector.inspectorView.showPanel("sources");
InspectorTest.runDebuggerTestSuite([
function testScopeChain(next)
@@ -29,8 +44,9 @@ function test()
function didShowScriptSource(sourceFrame)
{
// Break within the body of the closure method.
- setBreakpointAndWaitUntilPaused('debugger-eval-on-call-frame.[dD][aA][rR][tT]', 36, didPauseInDart);
- InspectorTest.runTestFunction();
+ setBreakpointAndWaitUntilPaused('debugger-eval-on-call-frame.DART', 36, didPauseInDart);
+
+ //setBreakpointAndWaitUntilPaused('debugger-eval-on-call-frame.[dD][aA][rR][tT]', 36, didPauseInDart);
}
function didPauseInDart(callFrames)
@@ -72,11 +88,12 @@ function test()
'inspect(document.documentElement).tagName',
'inspect(document.body).tagName',
'inspect(document.body.children.first).tagName',
+ '$4', // should fail as $4 is not defined yet
'$0.toString()',
'$1.toString()',
'$2.toString()',
- '$1 == document.body',
- '$1 == document.body',
+ '$0 == document.body.children.first',
+ '$1 != document.body',
'$2 == document.documentElement',
// FIXME(jacobr): we had to remove this as it logs a
// message to the console with a line number in the
@@ -90,27 +107,17 @@ function test()
function setBreakpointAndWaitUntilPaused(urlRegex, lineNumber, pausedCallback)
{
- var expectedBreakpointId;
- WebInspector.debuggerModel._agent.setBreakpointByUrl(lineNumber, undefined, urlRegex, 0, "", undefined, "dart", didSetBreakpointInDebugger);
-
- function didSetBreakpointInDebugger(callback, breakpointId)
- {
- expectedBreakpointId = breakpointId;
- InspectorTest.waitUntilPaused(didPause);
- }
+ InspectorTest.DebuggerAgent.invoke_setBreakpointByUrl({urlRegex: urlRegex, lineNumber:lineNumber}, step2);
- function didPause(callFrames, reason, breakpointIds)
+ function step2(result)
{
- InspectorTest.assertEquals(breakpointIds.length, 1);
- InspectorTest.assertEquals(breakpointIds[0], expectedBreakpointId);
- InspectorTest.assertEquals(reason, "other");
-
- pausedCallback(callFrames);
+ InspectorTest.runTestFunctionAndWaitUntilPaused(pausedCallback);
}
}
};
</script>
<body onload="runTest()">
+ <div></div>
</body>
</html>
« no previous file with comments | « LayoutTests/dart/dom/Console-expected.txt ('k') | LayoutTests/dart/inspector/debugger-eval-on-call-frame-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698