<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[188142] trunk/LayoutTests</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/188142">188142</a></dd>
<dt>Author</dt> <dd>burg@cs.washington.edu</dd>
<dt>Date</dt> <dd>2015-08-07 11:33:16 -0700 (Fri, 07 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: move LayoutTests/inspector-protocol/ tests to LayoutTests/inspector/
https://bugs.webkit.org/show_bug.cgi?id=147729
Reviewed by Timothy Hatcher.
Merge inspector-protocol tests into the inspector directory. Rename a few helper
resources whose names clashed. Put top-level tests into unit-tests/ and protocol/.
Update TestExpectations to not reference inspector-protocol paths.
* TestExpectations:
* http/tests/inspector/resources/console-test.js: Renamed from LayoutTests/inspector-protocol/resources/console-test.js.
* http/tests/inspector/resources/probe-test.js: Renamed from LayoutTests/inspector-protocol/resources/probe-helper.js.
* inspector-protocol/debugger/resources/breakpoint.js: Removed.
* inspector/console/console-message-expected.txt: Renamed from LayoutTests/inspector-protocol/console/console-message-expected.txt.
* inspector/console/console-message.html: Renamed from LayoutTests/inspector-protocol/console/console-message.html.
* inspector/console/css-source-locations-expected.txt: Renamed from LayoutTests/inspector-protocol/console/css-source-locations-expected.txt.
* inspector/console/css-source-locations.html: Renamed from LayoutTests/inspector-protocol/console/css-source-locations.html.
* inspector/console/js-source-locations-expected.txt: Renamed from LayoutTests/inspector-protocol/console/js-source-locations-expected.txt.
* inspector/console/js-source-locations.html: Renamed from LayoutTests/inspector-protocol/console/js-source-locations.html.
* inspector/console/resources/errors.css: Renamed from LayoutTests/inspector-protocol/resources/errors.css.
(div):
* inspector/console/resources/errors.js: Renamed from LayoutTests/inspector-protocol/resources/errors.js.
(foo):
* inspector/console/x-frame-options-message-expected.txt: Renamed from LayoutTests/inspector-protocol/console/x-frame-options-message-expected.txt.
* inspector/console/x-frame-options-message.html: Renamed from LayoutTests/inspector-protocol/console/x-frame-options-message.html.
* inspector/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css/getSupportedCSSProperties-expected.txt.
* inspector/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css/getSupportedCSSProperties.html.
* inspector/debugger/breakpoint-action-detach-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-action-detach-expected.txt.
* inspector/debugger/breakpoint-action-detach.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-action-detach.html.
* inspector/debugger/breakpoint-action-eval.html:
* inspector/debugger/breakpoint-action-with-exception-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt.
* inspector/debugger/breakpoint-action-with-exception.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-action-with-exception.html.
* inspector/debugger/breakpoint-condition-detach-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-detach-expected.txt.
* inspector/debugger/breakpoint-condition-detach.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-detach.html.
* inspector/debugger/breakpoint-condition-with-bad-script-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-bad-script-expected.txt.
* inspector/debugger/breakpoint-condition-with-bad-script.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-bad-script.html.
* inspector/debugger/breakpoint-condition-with-exception-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt.
* inspector/debugger/breakpoint-condition-with-exception.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-exception.html.
* inspector/debugger/breakpoint-eval-with-exception-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt.
* inspector/debugger/breakpoint-eval-with-exception.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-eval-with-exception.html.
* inspector/debugger/breakpoint-inside-conditons-and-actions-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt.
* inspector/debugger/breakpoint-inside-conditons-and-actions.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html.
* inspector/debugger/call-frame-function-name-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-function-name-expected.txt.
* inspector/debugger/call-frame-function-name.html: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-function-name.html.
* inspector/debugger/call-frame-this-host-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-host-expected.txt.
* inspector/debugger/call-frame-this-host.html: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-host.html.
* inspector/debugger/call-frame-this-nonstrict-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt.
* inspector/debugger/call-frame-this-nonstrict.html: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-nonstrict.html.
* inspector/debugger/call-frame-this-strict-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-strict-expected.txt.
* inspector/debugger/call-frame-this-strict.html: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-strict.html.
* inspector/debugger/debugger-statement-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/debugger-statement-expected.txt.
* inspector/debugger/debugger-statement.html: Renamed from LayoutTests/inspector-protocol/debugger/debugger-statement.html.
* inspector/debugger/didSampleProbe-multiple-probes-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt.
* inspector/debugger/didSampleProbe-multiple-probes.html: Renamed from LayoutTests/inspector-protocol/debugger/didSampleProbe-multiple-probes.html.
* inspector/debugger/hit-breakpoint-from-console-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/hit-breakpoint-from-console-expected.txt.
* inspector/debugger/hit-breakpoint-from-console.html: Renamed from LayoutTests/inspector-protocol/debugger/hit-breakpoint-from-console.html.
* inspector/debugger/nested-inspectors-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/nested-inspectors-expected.txt.
* inspector/debugger/nested-inspectors.html: Renamed from LayoutTests/inspector-protocol/debugger/nested-inspectors.html.
* inspector/debugger/pause-dedicated-worker-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/pause-dedicated-worker-expected.txt.
* inspector/debugger/pause-dedicated-worker.html: Renamed from LayoutTests/inspector-protocol/debugger/pause-dedicated-worker.html.
* inspector/debugger/pause-on-assert-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/pause-on-assert-expected.txt.
* inspector/debugger/pause-on-assert.html: Renamed from LayoutTests/inspector-protocol/debugger/pause-on-assert.html.
* inspector/debugger/probe-manager-add-remove-actions.html:
* inspector/debugger/regress-133182-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/regress-133182-expected.txt.
* inspector/debugger/regress-133182.html: Renamed from LayoutTests/inspector-protocol/debugger/regress-133182.html.
* inspector/debugger/removeBreakpoint-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/removeBreakpoint-expected.txt.
* inspector/debugger/removeBreakpoint.html: Renamed from LayoutTests/inspector-protocol/debugger/removeBreakpoint.html.
* inspector/debugger/resources/assert.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/assert.js.
* inspector/debugger/resources/dedicated-worker.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/dedicated-worker.js.
* inspector/debugger/resources/exception.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/exception.js.
* inspector/debugger/resources/mac-linebreaks.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/mac-linebreaks.js.
* inspector/debugger/resources/mixed-linebreaks.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/mixed-linebreaks.js.
* inspector/debugger/resources/script-for-breakpoint-actions.js: Copied from LayoutTests/inspector/debugger/resources/breakpoint.js.
* inspector/debugger/resources/unix-linebreaks.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/unix-linebreaks.js.
* inspector/debugger/resources/windows-linebreaks.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/windows-linebreaks.js.
* inspector/debugger/searchInContent-linebreaks-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/searchInContent-linebreaks-expected.txt.
* inspector/debugger/searchInContent-linebreaks.html: Renamed from LayoutTests/inspector-protocol/debugger/searchInContent-linebreaks.html.
* inspector/debugger/setBreakpoint-actions-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-actions-expected.txt.
* inspector/debugger/setBreakpoint-actions.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-actions.html.
* inspector/debugger/setBreakpoint-autoContinue-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt.
* inspector/debugger/setBreakpoint-autoContinue.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-autoContinue.html.
* inspector/debugger/setBreakpoint-column-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-column-expected.txt.
* inspector/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-column.html.
* inspector/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-column.txt.
* inspector/debugger/setBreakpoint-condition-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-condition-expected.txt.
* inspector/debugger/setBreakpoint-condition.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-condition.html.
* inspector/debugger/setBreakpoint-dfg-and-modify-local-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local-expected.txt.
* inspector/debugger/setBreakpoint-dfg-and-modify-local.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local.html.
* inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt.
* inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html.
* inspector/debugger/setBreakpoint-dfg-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-expected.txt.
* inspector/debugger/setBreakpoint-dfg.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg.html.
* inspector/debugger/setBreakpoint-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-expected.txt.
* inspector/debugger/setBreakpoint-options-exception-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt.
* inspector/debugger/setBreakpoint-options-exception.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-options-exception.html.
* inspector/debugger/setBreakpoint.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint.html.
* inspector/debugger/setBreakpointByUrl-sourceURL-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt.
* inspector/debugger/setBreakpointByUrl-sourceURL.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html.
* inspector/debugger/setPauseOnExceptions-all-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt.
* inspector/debugger/setPauseOnExceptions-all.html: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all.html.
* inspector/debugger/setPauseOnExceptions-none-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt.
* inspector/debugger/setPauseOnExceptions-none.html: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none.html.
* inspector/debugger/setPauseOnExceptions-uncaught-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt.
* inspector/debugger/setPauseOnExceptions-uncaught.html: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught.html.
* inspector/debugger/setVariableValue-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setVariableValue-expected.txt.
* inspector/debugger/setVariableValue.html: Renamed from LayoutTests/inspector-protocol/debugger/setVariableValue.html.
* inspector/debugger/terminate-dedicated-worker-while-paused-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/terminate-dedicated-worker-while-paused-expected.txt.
* inspector/debugger/terminate-dedicated-worker-while-paused.html: Renamed from LayoutTests/inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html.
* inspector/dom-debugger/node-removed-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-debugger/node-removed-expected.txt.
* inspector/dom-debugger/node-removed.html: Renamed from LayoutTests/inspector-protocol/dom-debugger/node-removed.html.
* inspector/dom/dom-remove-events-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/dom-remove-events-expected.txt.
* inspector/dom/dom-remove-events.html: Renamed from LayoutTests/inspector-protocol/dom/dom-remove-events.html.
* inspector/dom/dom-search-crash-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/dom-search-crash-expected.txt.
* inspector/dom/dom-search-crash.html: Renamed from LayoutTests/inspector-protocol/dom/dom-search-crash.html.
* inspector/dom/dom-search-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/dom-search-expected.txt.
* inspector/dom/dom-search-with-context-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/dom-search-with-context-expected.txt.
* inspector/dom/dom-search-with-context.html: Renamed from LayoutTests/inspector-protocol/dom/dom-search-with-context.html.
* inspector/dom/dom-search.html: Renamed from LayoutTests/inspector-protocol/dom/dom-search.html.
* inspector/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/focus-expected.txt.
* inspector/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom/focus.html.
* inspector/dom/getAccessibilityPropertiesForNode-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt.
* inspector/dom/getAccessibilityPropertiesForNode.html: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode.html.
* inspector/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt.
* inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html.
* inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt.
* inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html.
* inspector/dom/highlight-flow-with-no-region-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/highlight-flow-with-no-region-expected.txt.
* inspector/dom/highlight-flow-with-no-region.html: Renamed from LayoutTests/inspector-protocol/dom/highlight-flow-with-no-region.html.
* inspector/dom/remove-multiple-nodes-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/remove-multiple-nodes-expected.txt.
* inspector/dom/remove-multiple-nodes.html: Renamed from LayoutTests/inspector-protocol/dom/remove-multiple-nodes.html.
* inspector/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/request-child-nodes-depth-expected.txt.
* inspector/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom/request-child-nodes-depth.html.
* inspector/dom/resources/dom-search-crash-iframe.html: Renamed from LayoutTests/inspector-protocol/dom/resources/dom-search-crash-iframe.html.
* inspector/dom/resources/dom-search-iframe.html: Renamed from LayoutTests/inspector-protocol/dom/resources/dom-search-iframe.html.
* inspector/dom/resources/dom-search-queries.js: Renamed from LayoutTests/inspector-protocol/dom/resources/dom-search-queries.js.
* inspector/layers/layers-anonymous-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-anonymous-expected.txt.
* inspector/layers/layers-anonymous.html: Renamed from LayoutTests/inspector-protocol/layers/layers-anonymous.html.
* inspector/layers/layers-blending-compositing-reasons-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt.
* inspector/layers/layers-blending-compositing-reasons.html: Renamed from LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons.html.
* inspector/layers/layers-compositing-reasons-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-compositing-reasons-expected.txt.
* inspector/layers/layers-compositing-reasons.html: Renamed from LayoutTests/inspector-protocol/layers/layers-compositing-reasons.html.
* inspector/layers/layers-for-node-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-for-node-expected.txt.
* inspector/layers/layers-for-node.html: Renamed from LayoutTests/inspector-protocol/layers/layers-for-node.html.
* inspector/layers/layers-generated-content-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-generated-content-expected.txt.
* inspector/layers/layers-generated-content.html: Renamed from LayoutTests/inspector-protocol/layers/layers-generated-content.html.
* inspector/layers/layers-reflected-content-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-reflected-content-expected.txt.
* inspector/layers/layers-reflected-content.html: Renamed from LayoutTests/inspector-protocol/layers/layers-reflected-content.html.
* inspector/page/archive-expected.txt: Renamed from LayoutTests/inspector-protocol/page/archive-expected.txt.
* inspector/page/archive.html: Renamed from LayoutTests/inspector-protocol/page/archive.html.
* inspector/page/frameScheduledNavigation-expected.txt: Renamed from LayoutTests/inspector-protocol/page/frameScheduledNavigation-expected.txt.
* inspector/page/frameScheduledNavigation.html: Renamed from LayoutTests/inspector-protocol/page/frameScheduledNavigation.html.
* inspector/page/frameStartedLoading-expected.txt: Renamed from LayoutTests/inspector-protocol/page/frameStartedLoading-expected.txt.
* inspector/page/frameStartedLoading.html: Renamed from LayoutTests/inspector-protocol/page/frameStartedLoading.html.
* inspector/page/javascriptDialogEvents-expected.txt: Renamed from LayoutTests/inspector-protocol/page/javascriptDialogEvents-expected.txt.
* inspector/page/javascriptDialogEvents.html: Renamed from LayoutTests/inspector-protocol/page/javascriptDialogEvents.html.
* inspector/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/page/resources/blank.html.
* inspector/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/page/setEmulatedMedia-expected.txt.
* inspector/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/page/setEmulatedMedia.html.
* inspector/protocol/protocol-promise-result-expected.txt: Renamed from LayoutTests/inspector/protocol-promise-result-expected.txt.
* inspector/protocol/protocol-promise-result.html: Renamed from LayoutTests/inspector/protocol-promise-result.html.
* inspector/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime/getProperties-expected.txt.
* inspector/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime/getProperties.html.
* inspector/unit-tests/async-test-suite-expected.txt: Renamed from LayoutTests/inspector-protocol/async-test-suite-expected.txt.
* inspector/unit-tests/async-test-suite.html: Renamed from LayoutTests/inspector-protocol/async-test-suite.html.
* inspector/unit-tests/event-listener-expected.txt: Renamed from LayoutTests/inspector/event-listener-expected.txt.
* inspector/unit-tests/event-listener-set-expected.txt: Renamed from LayoutTests/inspector/event-listener-set-expected.txt.
* inspector/unit-tests/event-listener-set.html: Renamed from LayoutTests/inspector/event-listener-set.html.
* inspector/unit-tests/event-listener.html: Renamed from LayoutTests/inspector/event-listener.html.
* inspector/unit-tests/sync-test-suite-expected.txt: Renamed from LayoutTests/inspector-protocol/sync-test-suite-expected.txt.
* inspector/unit-tests/sync-test-suite.html: Renamed from LayoutTests/inspector-protocol/sync-test-suite.html.
* inspector/unit-tests/test-harness-trivially-works-expected.txt: Renamed from LayoutTests/inspector/test-harness-trivially-works-expected.txt.
* inspector/unit-tests/test-harness-trivially-works.html: Renamed from LayoutTests/inspector/test-harness-trivially-works.html.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointactionevalhtml">trunk/LayoutTests/inspector/debugger/breakpoint-action-eval.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerprobemanageraddremoveactionshtml">trunk/LayoutTests/inspector/debugger/probe-manager-add-remove-actions.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesbreakpointjs">trunk/LayoutTests/inspector/debugger/resources/breakpoint.js</a></li>
<li><a href="#trunkLayoutTestsplatformeflTestExpectations">trunk/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk1TestExpectations">trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk2TestExpectations">trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2TestExpectations">trunk/LayoutTests/platform/mac-wk2/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsinspectorresourcesconsoletestjs">trunk/LayoutTests/http/tests/inspector/resources/console-test.js</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectorresourcesprobetestjs">trunk/LayoutTests/http/tests/inspector/resources/probe-test.js</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleconsolemessageexpectedtxt">trunk/LayoutTests/inspector/console/console-message-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleconsolemessagehtml">trunk/LayoutTests/inspector/console/console-message.html</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolecsssourcelocationsexpectedtxt">trunk/LayoutTests/inspector/console/css-source-locations-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolecsssourcelocationshtml">trunk/LayoutTests/inspector/console/css-source-locations.html</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolejssourcelocationsexpectedtxt">trunk/LayoutTests/inspector/console/js-source-locations-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolejssourcelocationshtml">trunk/LayoutTests/inspector/console/js-source-locations.html</a></li>
<li>trunk/LayoutTests/inspector/console/resources/</li>
<li><a href="#trunkLayoutTestsinspectorconsoleresourceserrorscss">trunk/LayoutTests/inspector/console/resources/errors.css</a></li>
<li><a href="#trunkLayoutTestsinspectorconsoleresourceserrorsjs">trunk/LayoutTests/inspector/console/resources/errors.js</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolexframeoptionsmessageexpectedtxt">trunk/LayoutTests/inspector/console/x-frame-options-message-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorconsolexframeoptionsmessagehtml">trunk/LayoutTests/inspector/console/x-frame-options-message.html</a></li>
<li><a href="#trunkLayoutTestsinspectorcssgetSupportedCSSPropertiesexpectedtxt">trunk/LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorcssgetSupportedCSSPropertieshtml">trunk/LayoutTests/inspector/css/getSupportedCSSProperties.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointactiondetachexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoint-action-detach-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointactiondetachhtml">trunk/LayoutTests/inspector/debugger/breakpoint-action-detach.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointactionwithexceptionexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoint-action-with-exception-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointactionwithexceptionhtml">trunk/LayoutTests/inspector/debugger/breakpoint-action-with-exception.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointconditiondetachexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoint-condition-detach-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointconditiondetachhtml">trunk/LayoutTests/inspector/debugger/breakpoint-condition-detach.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointconditionwithbadscriptexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-bad-script-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointconditionwithbadscripthtml">trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-bad-script.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointconditionwithexceptionexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-exception-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointconditionwithexceptionhtml">trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-exception.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointevalwithexceptionexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoint-eval-with-exception-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointevalwithexceptionhtml">trunk/LayoutTests/inspector/debugger/breakpoint-eval-with-exception.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointinsideconditonsandactionsexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoint-inside-conditons-and-actions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointinsideconditonsandactionshtml">trunk/LayoutTests/inspector/debugger/breakpoint-inside-conditons-and-actions.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercallframefunctionnameexpectedtxt">trunk/LayoutTests/inspector/debugger/call-frame-function-name-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercallframefunctionnamehtml">trunk/LayoutTests/inspector/debugger/call-frame-function-name.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercallframethishostexpectedtxt">trunk/LayoutTests/inspector/debugger/call-frame-this-host-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercallframethishosthtml">trunk/LayoutTests/inspector/debugger/call-frame-this-host.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercallframethisnonstrictexpectedtxt">trunk/LayoutTests/inspector/debugger/call-frame-this-nonstrict-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercallframethisnonstricthtml">trunk/LayoutTests/inspector/debugger/call-frame-this-nonstrict.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercallframethisstrictexpectedtxt">trunk/LayoutTests/inspector/debugger/call-frame-this-strict-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggercallframethisstricthtml">trunk/LayoutTests/inspector/debugger/call-frame-this-strict.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerdebuggerstatementexpectedtxt">trunk/LayoutTests/inspector/debugger/debugger-statement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerdebuggerstatementhtml">trunk/LayoutTests/inspector/debugger/debugger-statement.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerdidSampleProbemultipleprobesexpectedtxt">trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerdidSampleProbemultipleprobeshtml">trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerhitbreakpointfromconsoleexpectedtxt">trunk/LayoutTests/inspector/debugger/hit-breakpoint-from-console-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerhitbreakpointfromconsolehtml">trunk/LayoutTests/inspector/debugger/hit-breakpoint-from-console.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggernestedinspectorsexpectedtxt">trunk/LayoutTests/inspector/debugger/nested-inspectors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggernestedinspectorshtml">trunk/LayoutTests/inspector/debugger/nested-inspectors.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerpausededicatedworkerexpectedtxt">trunk/LayoutTests/inspector/debugger/pause-dedicated-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerpausededicatedworkerhtml">trunk/LayoutTests/inspector/debugger/pause-dedicated-worker.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerpauseonassertexpectedtxt">trunk/LayoutTests/inspector/debugger/pause-on-assert-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerpauseonasserthtml">trunk/LayoutTests/inspector/debugger/pause-on-assert.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerregress133182expectedtxt">trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerregress133182html">trunk/LayoutTests/inspector/debugger/regress-133182.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerremoveBreakpointexpectedtxt">trunk/LayoutTests/inspector/debugger/removeBreakpoint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerremoveBreakpointhtml">trunk/LayoutTests/inspector/debugger/removeBreakpoint.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesassertjs">trunk/LayoutTests/inspector/debugger/resources/assert.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesdedicatedworkerjs">trunk/LayoutTests/inspector/debugger/resources/dedicated-worker.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesexceptionjs">trunk/LayoutTests/inspector/debugger/resources/exception.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesmaclinebreaksjs">trunk/LayoutTests/inspector/debugger/resources/mac-linebreaks.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesmixedlinebreaksjs">trunk/LayoutTests/inspector/debugger/resources/mixed-linebreaks.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesscriptforbreakpointactionsjs">trunk/LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesunixlinebreaksjs">trunk/LayoutTests/inspector/debugger/resources/unix-linebreaks.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourceswindowslinebreaksjs">trunk/LayoutTests/inspector/debugger/resources/windows-linebreaks.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersearchInContentlinebreaksexpectedtxt">trunk/LayoutTests/inspector/debugger/searchInContent-linebreaks-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersearchInContentlinebreakshtml">trunk/LayoutTests/inspector/debugger/searchInContent-linebreaks.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointactionsexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-actions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointactionshtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-actions.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointautoContinueexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-autoContinue-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointautoContinuehtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-autoContinue.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointcolumnexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-column-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointcolumnhtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-column.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointcolumntxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-column.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointconditionexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-condition-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointconditionhtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-condition.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointdfgandmodifylocalexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-and-modify-local-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointdfgandmodifylocalhtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-and-modify-local.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointdfgcalleeandexaminedfglocalexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointdfgcalleeandexaminedfglocalhtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointdfgexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointdfghtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointoptionsexceptionexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointoptionsexceptionhtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointhtml">trunk/LayoutTests/inspector/debugger/setBreakpoint.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointByUrlsourceURLexpectedtxt">trunk/LayoutTests/inspector/debugger/setBreakpointByUrl-sourceURL-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointByUrlsourceURLhtml">trunk/LayoutTests/inspector/debugger/setBreakpointByUrl-sourceURL.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetPauseOnExceptionsallexpectedtxt">trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetPauseOnExceptionsallhtml">trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetPauseOnExceptionsnoneexpectedtxt">trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetPauseOnExceptionsnonehtml">trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetPauseOnExceptionsuncaughtexpectedtxt">trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetPauseOnExceptionsuncaughthtml">trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetVariableValueexpectedtxt">trunk/LayoutTests/inspector/debugger/setVariableValue-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetVariableValuehtml">trunk/LayoutTests/inspector/debugger/setVariableValue.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerterminatededicatedworkerwhilepausedexpectedtxt">trunk/LayoutTests/inspector/debugger/terminate-dedicated-worker-while-paused-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerterminatededicatedworkerwhilepausedhtml">trunk/LayoutTests/inspector/debugger/terminate-dedicated-worker-while-paused.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomremoveeventsexpectedtxt">trunk/LayoutTests/inspector/dom/dom-remove-events-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomremoveeventshtml">trunk/LayoutTests/inspector/dom/dom-remove-events.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomsearchcrashexpectedtxt">trunk/LayoutTests/inspector/dom/dom-search-crash-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomsearchcrashhtml">trunk/LayoutTests/inspector/dom/dom-search-crash.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomsearchexpectedtxt">trunk/LayoutTests/inspector/dom/dom-search-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomsearchwithcontextexpectedtxt">trunk/LayoutTests/inspector/dom/dom-search-with-context-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomsearchwithcontexthtml">trunk/LayoutTests/inspector/dom/dom-search-with-context.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomsearchhtml">trunk/LayoutTests/inspector/dom/dom-search.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomfocusexpectedtxt">trunk/LayoutTests/inspector/dom/focus-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomfocushtml">trunk/LayoutTests/inspector/dom/focus.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNodeexpectedtxt">trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNodehtml">trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNode_liveRegionexpectedtxt">trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNode_liveRegionhtml">trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNode_mouseEventNodeIdexpectedtxt">trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNode_mouseEventNodeIdhtml">trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomhighlightflowwithnoregionexpectedtxt">trunk/LayoutTests/inspector/dom/highlight-flow-with-no-region-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomhighlightflowwithnoregionhtml">trunk/LayoutTests/inspector/dom/highlight-flow-with-no-region.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomremovemultiplenodesexpectedtxt">trunk/LayoutTests/inspector/dom/remove-multiple-nodes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomremovemultiplenodeshtml">trunk/LayoutTests/inspector/dom/remove-multiple-nodes.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomrequestchildnodesdepthexpectedtxt">trunk/LayoutTests/inspector/dom/request-child-nodes-depth-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomrequestchildnodesdepthhtml">trunk/LayoutTests/inspector/dom/request-child-nodes-depth.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomresourcesdomsearchcrashiframehtml">trunk/LayoutTests/inspector/dom/resources/dom-search-crash-iframe.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomresourcesdomsearchiframehtml">trunk/LayoutTests/inspector/dom/resources/dom-search-iframe.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomresourcesdomsearchqueriesjs">trunk/LayoutTests/inspector/dom/resources/dom-search-queries.js</a></li>
<li>trunk/LayoutTests/inspector/dom-debugger/</li>
<li><a href="#trunkLayoutTestsinspectordomdebuggernoderemovedexpectedtxt">trunk/LayoutTests/inspector/dom-debugger/node-removed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomdebuggernoderemovedhtml">trunk/LayoutTests/inspector/dom-debugger/node-removed.html</a></li>
<li>trunk/LayoutTests/inspector/layers/</li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersanonymousexpectedtxt">trunk/LayoutTests/inspector/layers/layers-anonymous-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersanonymoushtml">trunk/LayoutTests/inspector/layers/layers-anonymous.html</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersblendingcompositingreasonsexpectedtxt">trunk/LayoutTests/inspector/layers/layers-blending-compositing-reasons-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersblendingcompositingreasonshtml">trunk/LayoutTests/inspector/layers/layers-blending-compositing-reasons.html</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayerscompositingreasonsexpectedtxt">trunk/LayoutTests/inspector/layers/layers-compositing-reasons-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayerscompositingreasonshtml">trunk/LayoutTests/inspector/layers/layers-compositing-reasons.html</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersfornodeexpectedtxt">trunk/LayoutTests/inspector/layers/layers-for-node-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersfornodehtml">trunk/LayoutTests/inspector/layers/layers-for-node.html</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersgeneratedcontentexpectedtxt">trunk/LayoutTests/inspector/layers/layers-generated-content-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersgeneratedcontenthtml">trunk/LayoutTests/inspector/layers/layers-generated-content.html</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersreflectedcontentexpectedtxt">trunk/LayoutTests/inspector/layers/layers-reflected-content-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorlayerslayersreflectedcontenthtml">trunk/LayoutTests/inspector/layers/layers-reflected-content.html</a></li>
<li><a href="#trunkLayoutTestsinspectorpagearchiveexpectedtxt">trunk/LayoutTests/inspector/page/archive-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorpagearchivehtml">trunk/LayoutTests/inspector/page/archive.html</a></li>
<li><a href="#trunkLayoutTestsinspectorpageframeScheduledNavigationexpectedtxt">trunk/LayoutTests/inspector/page/frameScheduledNavigation-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorpageframeScheduledNavigationhtml">trunk/LayoutTests/inspector/page/frameScheduledNavigation.html</a></li>
<li><a href="#trunkLayoutTestsinspectorpageframeStartedLoadingexpectedtxt">trunk/LayoutTests/inspector/page/frameStartedLoading-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorpageframeStartedLoadinghtml">trunk/LayoutTests/inspector/page/frameStartedLoading.html</a></li>
<li><a href="#trunkLayoutTestsinspectorpagejavascriptDialogEventsexpectedtxt">trunk/LayoutTests/inspector/page/javascriptDialogEvents-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorpagejavascriptDialogEventshtml">trunk/LayoutTests/inspector/page/javascriptDialogEvents.html</a></li>
<li>trunk/LayoutTests/inspector/page/resources/</li>
<li><a href="#trunkLayoutTestsinspectorpageresourcesblankhtml">trunk/LayoutTests/inspector/page/resources/blank.html</a></li>
<li><a href="#trunkLayoutTestsinspectorpagesetEmulatedMediaexpectedtxt">trunk/LayoutTests/inspector/page/setEmulatedMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorpagesetEmulatedMediahtml">trunk/LayoutTests/inspector/page/setEmulatedMedia.html</a></li>
<li>trunk/LayoutTests/inspector/protocol/</li>
<li><a href="#trunkLayoutTestsinspectorprotocolprotocolpromiseresultexpectedtxt">trunk/LayoutTests/inspector/protocol/protocol-promise-result-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocolprotocolpromiseresulthtml">trunk/LayoutTests/inspector/protocol/protocol-promise-result.html</a></li>
<li>trunk/LayoutTests/inspector/runtime/</li>
<li><a href="#trunkLayoutTestsinspectorruntimegetPropertiesexpectedtxt">trunk/LayoutTests/inspector/runtime/getProperties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorruntimegetPropertieshtml">trunk/LayoutTests/inspector/runtime/getProperties.html</a></li>
<li>trunk/LayoutTests/inspector/unit-tests/</li>
<li><a href="#trunkLayoutTestsinspectorunittestsasynctestsuiteexpectedtxt">trunk/LayoutTests/inspector/unit-tests/async-test-suite-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestsasynctestsuitehtml">trunk/LayoutTests/inspector/unit-tests/async-test-suite.html</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestseventlistenerexpectedtxt">trunk/LayoutTests/inspector/unit-tests/event-listener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestseventlistenersetexpectedtxt">trunk/LayoutTests/inspector/unit-tests/event-listener-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestseventlistenersethtml">trunk/LayoutTests/inspector/unit-tests/event-listener-set.html</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestseventlistenerhtml">trunk/LayoutTests/inspector/unit-tests/event-listener.html</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestssynctestsuiteexpectedtxt">trunk/LayoutTests/inspector/unit-tests/sync-test-suite-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestssynctestsuitehtml">trunk/LayoutTests/inspector/unit-tests/sync-test-suite.html</a></li>
<li><a href="#trunkLayoutTestsinspectorunitteststestharnesstriviallyworksexpectedtxt">trunk/LayoutTests/inspector/unit-tests/test-harness-trivially-works-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorunitteststestharnesstriviallyworkshtml">trunk/LayoutTests/inspector/unit-tests/test-harness-trivially-works.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsinspectoreventlistenerexpectedtxt">trunk/LayoutTests/inspector/event-listener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectoreventlistenersetexpectedtxt">trunk/LayoutTests/inspector/event-listener-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectoreventlistenersethtml">trunk/LayoutTests/inspector/event-listener-set.html</a></li>
<li><a href="#trunkLayoutTestsinspectoreventlistenerhtml">trunk/LayoutTests/inspector/event-listener.html</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocolpromiseresultexpectedtxt">trunk/LayoutTests/inspector/protocol-promise-result-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocolpromiseresulthtml">trunk/LayoutTests/inspector/protocol-promise-result.html</a></li>
<li><a href="#trunkLayoutTestsinspectortestharnesstriviallyworksexpectedtxt">trunk/LayoutTests/inspector/test-harness-trivially-works-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectortestharnesstriviallyworkshtml">trunk/LayoutTests/inspector/test-harness-trivially-works.html</a></li>
<li>trunk/LayoutTests/inspector-protocol/</li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/ChangeLog        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,3 +1,186 @@
</span><ins>+2015-08-07 Brian Burg <bburg@apple.com>
+
+ Web Inspector: move LayoutTests/inspector-protocol/ tests to LayoutTests/inspector/
+ https://bugs.webkit.org/show_bug.cgi?id=147729
+
+ Reviewed by Timothy Hatcher.
+
+ Merge inspector-protocol tests into the inspector directory. Rename a few helper
+ resources whose names clashed. Put top-level tests into unit-tests/ and protocol/.
+
+ Update TestExpectations to not reference inspector-protocol paths.
+
+ * TestExpectations:
+ * http/tests/inspector/resources/console-test.js: Renamed from LayoutTests/inspector-protocol/resources/console-test.js.
+ * http/tests/inspector/resources/probe-test.js: Renamed from LayoutTests/inspector-protocol/resources/probe-helper.js.
+ * inspector-protocol/debugger/resources/breakpoint.js: Removed.
+ * inspector/console/console-message-expected.txt: Renamed from LayoutTests/inspector-protocol/console/console-message-expected.txt.
+ * inspector/console/console-message.html: Renamed from LayoutTests/inspector-protocol/console/console-message.html.
+ * inspector/console/css-source-locations-expected.txt: Renamed from LayoutTests/inspector-protocol/console/css-source-locations-expected.txt.
+ * inspector/console/css-source-locations.html: Renamed from LayoutTests/inspector-protocol/console/css-source-locations.html.
+ * inspector/console/js-source-locations-expected.txt: Renamed from LayoutTests/inspector-protocol/console/js-source-locations-expected.txt.
+ * inspector/console/js-source-locations.html: Renamed from LayoutTests/inspector-protocol/console/js-source-locations.html.
+ * inspector/console/resources/errors.css: Renamed from LayoutTests/inspector-protocol/resources/errors.css.
+ (div):
+ * inspector/console/resources/errors.js: Renamed from LayoutTests/inspector-protocol/resources/errors.js.
+ (foo):
+ * inspector/console/x-frame-options-message-expected.txt: Renamed from LayoutTests/inspector-protocol/console/x-frame-options-message-expected.txt.
+ * inspector/console/x-frame-options-message.html: Renamed from LayoutTests/inspector-protocol/console/x-frame-options-message.html.
+ * inspector/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css/getSupportedCSSProperties-expected.txt.
+ * inspector/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css/getSupportedCSSProperties.html.
+ * inspector/debugger/breakpoint-action-detach-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-action-detach-expected.txt.
+ * inspector/debugger/breakpoint-action-detach.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-action-detach.html.
+ * inspector/debugger/breakpoint-action-eval.html:
+ * inspector/debugger/breakpoint-action-with-exception-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt.
+ * inspector/debugger/breakpoint-action-with-exception.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-action-with-exception.html.
+ * inspector/debugger/breakpoint-condition-detach-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-detach-expected.txt.
+ * inspector/debugger/breakpoint-condition-detach.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-detach.html.
+ * inspector/debugger/breakpoint-condition-with-bad-script-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-bad-script-expected.txt.
+ * inspector/debugger/breakpoint-condition-with-bad-script.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-bad-script.html.
+ * inspector/debugger/breakpoint-condition-with-exception-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt.
+ * inspector/debugger/breakpoint-condition-with-exception.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-exception.html.
+ * inspector/debugger/breakpoint-eval-with-exception-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt.
+ * inspector/debugger/breakpoint-eval-with-exception.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-eval-with-exception.html.
+ * inspector/debugger/breakpoint-inside-conditons-and-actions-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt.
+ * inspector/debugger/breakpoint-inside-conditons-and-actions.html: Renamed from LayoutTests/inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html.
+ * inspector/debugger/call-frame-function-name-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-function-name-expected.txt.
+ * inspector/debugger/call-frame-function-name.html: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-function-name.html.
+ * inspector/debugger/call-frame-this-host-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-host-expected.txt.
+ * inspector/debugger/call-frame-this-host.html: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-host.html.
+ * inspector/debugger/call-frame-this-nonstrict-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt.
+ * inspector/debugger/call-frame-this-nonstrict.html: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-nonstrict.html.
+ * inspector/debugger/call-frame-this-strict-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-strict-expected.txt.
+ * inspector/debugger/call-frame-this-strict.html: Renamed from LayoutTests/inspector-protocol/debugger/call-frame-this-strict.html.
+ * inspector/debugger/debugger-statement-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/debugger-statement-expected.txt.
+ * inspector/debugger/debugger-statement.html: Renamed from LayoutTests/inspector-protocol/debugger/debugger-statement.html.
+ * inspector/debugger/didSampleProbe-multiple-probes-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt.
+ * inspector/debugger/didSampleProbe-multiple-probes.html: Renamed from LayoutTests/inspector-protocol/debugger/didSampleProbe-multiple-probes.html.
+ * inspector/debugger/hit-breakpoint-from-console-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/hit-breakpoint-from-console-expected.txt.
+ * inspector/debugger/hit-breakpoint-from-console.html: Renamed from LayoutTests/inspector-protocol/debugger/hit-breakpoint-from-console.html.
+ * inspector/debugger/nested-inspectors-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/nested-inspectors-expected.txt.
+ * inspector/debugger/nested-inspectors.html: Renamed from LayoutTests/inspector-protocol/debugger/nested-inspectors.html.
+ * inspector/debugger/pause-dedicated-worker-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/pause-dedicated-worker-expected.txt.
+ * inspector/debugger/pause-dedicated-worker.html: Renamed from LayoutTests/inspector-protocol/debugger/pause-dedicated-worker.html.
+ * inspector/debugger/pause-on-assert-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/pause-on-assert-expected.txt.
+ * inspector/debugger/pause-on-assert.html: Renamed from LayoutTests/inspector-protocol/debugger/pause-on-assert.html.
+ * inspector/debugger/probe-manager-add-remove-actions.html:
+ * inspector/debugger/regress-133182-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/regress-133182-expected.txt.
+ * inspector/debugger/regress-133182.html: Renamed from LayoutTests/inspector-protocol/debugger/regress-133182.html.
+ * inspector/debugger/removeBreakpoint-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/removeBreakpoint-expected.txt.
+ * inspector/debugger/removeBreakpoint.html: Renamed from LayoutTests/inspector-protocol/debugger/removeBreakpoint.html.
+ * inspector/debugger/resources/assert.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/assert.js.
+ * inspector/debugger/resources/dedicated-worker.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/dedicated-worker.js.
+ * inspector/debugger/resources/exception.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/exception.js.
+ * inspector/debugger/resources/mac-linebreaks.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/mac-linebreaks.js.
+ * inspector/debugger/resources/mixed-linebreaks.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/mixed-linebreaks.js.
+ * inspector/debugger/resources/script-for-breakpoint-actions.js: Copied from LayoutTests/inspector/debugger/resources/breakpoint.js.
+ * inspector/debugger/resources/unix-linebreaks.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/unix-linebreaks.js.
+ * inspector/debugger/resources/windows-linebreaks.js: Renamed from LayoutTests/inspector-protocol/debugger/resources/windows-linebreaks.js.
+ * inspector/debugger/searchInContent-linebreaks-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/searchInContent-linebreaks-expected.txt.
+ * inspector/debugger/searchInContent-linebreaks.html: Renamed from LayoutTests/inspector-protocol/debugger/searchInContent-linebreaks.html.
+ * inspector/debugger/setBreakpoint-actions-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-actions-expected.txt.
+ * inspector/debugger/setBreakpoint-actions.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-actions.html.
+ * inspector/debugger/setBreakpoint-autoContinue-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt.
+ * inspector/debugger/setBreakpoint-autoContinue.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-autoContinue.html.
+ * inspector/debugger/setBreakpoint-column-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-column-expected.txt.
+ * inspector/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-column.html.
+ * inspector/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-column.txt.
+ * inspector/debugger/setBreakpoint-condition-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-condition-expected.txt.
+ * inspector/debugger/setBreakpoint-condition.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-condition.html.
+ * inspector/debugger/setBreakpoint-dfg-and-modify-local-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local-expected.txt.
+ * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local.html.
+ * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt.
+ * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html.
+ * inspector/debugger/setBreakpoint-dfg-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-expected.txt.
+ * inspector/debugger/setBreakpoint-dfg.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg.html.
+ * inspector/debugger/setBreakpoint-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-expected.txt.
+ * inspector/debugger/setBreakpoint-options-exception-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt.
+ * inspector/debugger/setBreakpoint-options-exception.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint-options-exception.html.
+ * inspector/debugger/setBreakpoint.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpoint.html.
+ * inspector/debugger/setBreakpointByUrl-sourceURL-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt.
+ * inspector/debugger/setBreakpointByUrl-sourceURL.html: Renamed from LayoutTests/inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html.
+ * inspector/debugger/setPauseOnExceptions-all-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt.
+ * inspector/debugger/setPauseOnExceptions-all.html: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all.html.
+ * inspector/debugger/setPauseOnExceptions-none-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt.
+ * inspector/debugger/setPauseOnExceptions-none.html: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none.html.
+ * inspector/debugger/setPauseOnExceptions-uncaught-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt.
+ * inspector/debugger/setPauseOnExceptions-uncaught.html: Renamed from LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught.html.
+ * inspector/debugger/setVariableValue-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/setVariableValue-expected.txt.
+ * inspector/debugger/setVariableValue.html: Renamed from LayoutTests/inspector-protocol/debugger/setVariableValue.html.
+ * inspector/debugger/terminate-dedicated-worker-while-paused-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger/terminate-dedicated-worker-while-paused-expected.txt.
+ * inspector/debugger/terminate-dedicated-worker-while-paused.html: Renamed from LayoutTests/inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html.
+ * inspector/dom-debugger/node-removed-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-debugger/node-removed-expected.txt.
+ * inspector/dom-debugger/node-removed.html: Renamed from LayoutTests/inspector-protocol/dom-debugger/node-removed.html.
+ * inspector/dom/dom-remove-events-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/dom-remove-events-expected.txt.
+ * inspector/dom/dom-remove-events.html: Renamed from LayoutTests/inspector-protocol/dom/dom-remove-events.html.
+ * inspector/dom/dom-search-crash-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/dom-search-crash-expected.txt.
+ * inspector/dom/dom-search-crash.html: Renamed from LayoutTests/inspector-protocol/dom/dom-search-crash.html.
+ * inspector/dom/dom-search-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/dom-search-expected.txt.
+ * inspector/dom/dom-search-with-context-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/dom-search-with-context-expected.txt.
+ * inspector/dom/dom-search-with-context.html: Renamed from LayoutTests/inspector-protocol/dom/dom-search-with-context.html.
+ * inspector/dom/dom-search.html: Renamed from LayoutTests/inspector-protocol/dom/dom-search.html.
+ * inspector/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/focus-expected.txt.
+ * inspector/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom/focus.html.
+ * inspector/dom/getAccessibilityPropertiesForNode-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt.
+ * inspector/dom/getAccessibilityPropertiesForNode.html: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode.html.
+ * inspector/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt.
+ * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html.
+ * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt.
+ * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: Renamed from LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html.
+ * inspector/dom/highlight-flow-with-no-region-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/highlight-flow-with-no-region-expected.txt.
+ * inspector/dom/highlight-flow-with-no-region.html: Renamed from LayoutTests/inspector-protocol/dom/highlight-flow-with-no-region.html.
+ * inspector/dom/remove-multiple-nodes-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/remove-multiple-nodes-expected.txt.
+ * inspector/dom/remove-multiple-nodes.html: Renamed from LayoutTests/inspector-protocol/dom/remove-multiple-nodes.html.
+ * inspector/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom/request-child-nodes-depth-expected.txt.
+ * inspector/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom/request-child-nodes-depth.html.
+ * inspector/dom/resources/dom-search-crash-iframe.html: Renamed from LayoutTests/inspector-protocol/dom/resources/dom-search-crash-iframe.html.
+ * inspector/dom/resources/dom-search-iframe.html: Renamed from LayoutTests/inspector-protocol/dom/resources/dom-search-iframe.html.
+ * inspector/dom/resources/dom-search-queries.js: Renamed from LayoutTests/inspector-protocol/dom/resources/dom-search-queries.js.
+ * inspector/layers/layers-anonymous-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-anonymous-expected.txt.
+ * inspector/layers/layers-anonymous.html: Renamed from LayoutTests/inspector-protocol/layers/layers-anonymous.html.
+ * inspector/layers/layers-blending-compositing-reasons-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt.
+ * inspector/layers/layers-blending-compositing-reasons.html: Renamed from LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons.html.
+ * inspector/layers/layers-compositing-reasons-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-compositing-reasons-expected.txt.
+ * inspector/layers/layers-compositing-reasons.html: Renamed from LayoutTests/inspector-protocol/layers/layers-compositing-reasons.html.
+ * inspector/layers/layers-for-node-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-for-node-expected.txt.
+ * inspector/layers/layers-for-node.html: Renamed from LayoutTests/inspector-protocol/layers/layers-for-node.html.
+ * inspector/layers/layers-generated-content-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-generated-content-expected.txt.
+ * inspector/layers/layers-generated-content.html: Renamed from LayoutTests/inspector-protocol/layers/layers-generated-content.html.
+ * inspector/layers/layers-reflected-content-expected.txt: Renamed from LayoutTests/inspector-protocol/layers/layers-reflected-content-expected.txt.
+ * inspector/layers/layers-reflected-content.html: Renamed from LayoutTests/inspector-protocol/layers/layers-reflected-content.html.
+ * inspector/page/archive-expected.txt: Renamed from LayoutTests/inspector-protocol/page/archive-expected.txt.
+ * inspector/page/archive.html: Renamed from LayoutTests/inspector-protocol/page/archive.html.
+ * inspector/page/frameScheduledNavigation-expected.txt: Renamed from LayoutTests/inspector-protocol/page/frameScheduledNavigation-expected.txt.
+ * inspector/page/frameScheduledNavigation.html: Renamed from LayoutTests/inspector-protocol/page/frameScheduledNavigation.html.
+ * inspector/page/frameStartedLoading-expected.txt: Renamed from LayoutTests/inspector-protocol/page/frameStartedLoading-expected.txt.
+ * inspector/page/frameStartedLoading.html: Renamed from LayoutTests/inspector-protocol/page/frameStartedLoading.html.
+ * inspector/page/javascriptDialogEvents-expected.txt: Renamed from LayoutTests/inspector-protocol/page/javascriptDialogEvents-expected.txt.
+ * inspector/page/javascriptDialogEvents.html: Renamed from LayoutTests/inspector-protocol/page/javascriptDialogEvents.html.
+ * inspector/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/page/resources/blank.html.
+ * inspector/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/page/setEmulatedMedia-expected.txt.
+ * inspector/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/page/setEmulatedMedia.html.
+ * inspector/protocol/protocol-promise-result-expected.txt: Renamed from LayoutTests/inspector/protocol-promise-result-expected.txt.
+ * inspector/protocol/protocol-promise-result.html: Renamed from LayoutTests/inspector/protocol-promise-result.html.
+ * inspector/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime/getProperties-expected.txt.
+ * inspector/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime/getProperties.html.
+ * inspector/unit-tests/async-test-suite-expected.txt: Renamed from LayoutTests/inspector-protocol/async-test-suite-expected.txt.
+ * inspector/unit-tests/async-test-suite.html: Renamed from LayoutTests/inspector-protocol/async-test-suite.html.
+ * inspector/unit-tests/event-listener-expected.txt: Renamed from LayoutTests/inspector/event-listener-expected.txt.
+ * inspector/unit-tests/event-listener-set-expected.txt: Renamed from LayoutTests/inspector/event-listener-set-expected.txt.
+ * inspector/unit-tests/event-listener-set.html: Renamed from LayoutTests/inspector/event-listener-set.html.
+ * inspector/unit-tests/event-listener.html: Renamed from LayoutTests/inspector/event-listener.html.
+ * inspector/unit-tests/sync-test-suite-expected.txt: Renamed from LayoutTests/inspector-protocol/sync-test-suite-expected.txt.
+ * inspector/unit-tests/sync-test-suite.html: Renamed from LayoutTests/inspector-protocol/sync-test-suite.html.
+ * inspector/unit-tests/test-harness-trivially-works-expected.txt: Renamed from LayoutTests/inspector/test-harness-trivially-works-expected.txt.
+ * inspector/unit-tests/test-harness-trivially-works.html: Renamed from LayoutTests/inspector/test-harness-trivially-works.html.
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/ios-simulator-wk1/TestExpectations:
+ * platform/ios-simulator-wk2/TestExpectations:
+ * platform/mac-wk2/TestExpectations:
+ * platform/mac/TestExpectations:
+ * platform/win/TestExpectations:
+
</ins><span class="cx"> 2015-08-07 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> ios-sim-deprecated/iphone/fast/events/touch/ already existed in fast/events/touch, so remove them.
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/TestExpectations        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -91,14 +91,16 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/129057 media/controls-styling-strict.html [ Pass Failure ]
</span><span class="cx">
</span><del>-webkit.org/b/133761 inspector-protocol/debugger/breakpoint-action-detach.html [ Skip ]
-webkit.org/b/129639 inspector-protocol/dom/dom-search-crash.html [ Skip ]
</del><ins>+webkit.org/b/129639 inspector/dom/dom-search-crash.html [ Skip ]
</ins><span class="cx">
</span><ins>+webkit.org/b/133761 inspector/debugger/breakpoint-action-detach.html [ Skip ]
</ins><span class="cx"> webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise-rethrow-in-catch.html [ Skip ]
</span><span class="cx"> webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise-then-with-catch.html [ Skip ]
</span><span class="cx"> webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise-then.html [ Skip ]
</span><span class="cx"> webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise-with-catch.html [ Skip ]
</span><span class="cx"> webkit.org/b/147502 inspector/debugger/break-on-uncaught-exception-throw-in-promise.html [ Skip ]
</span><ins>+webkit.org/b/128736 inspector/debugger/setBreakpoint-dfg.html [ Failure Pass ]
+webkit.org/b/134982 inspector/debugger/setBreakpoint-dfg-and-modify-local.html [ Failure Pass ]
</ins><span class="cx">
</span><span class="cx"> webkit.org/b/142208 inspector/timeline/debugger-paused-while-recording.html [ Skip ]
</span><span class="cx"> webkit.org/b/142208 inspector/timeline/exception-in-injected-script-while-recording.html [ Skip ]
</span><span class="lines">@@ -128,9 +130,6 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/142548 editing/selection/extend-by-character-007.html [ Failure ]
</span><span class="cx">
</span><del>-webkit.org/b/128736 inspector-protocol/debugger/setBreakpoint-dfg.html [ Failure Pass ]
-webkit.org/b/134982 inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local.html [ Failure Pass ]
-
</del><span class="cx"> # CSS Font Loading is not yet enabled on all platforms
</span><span class="cx"> webkit.org/b/135390 fast/css/fontloader-download-error.html [ Skip ]
</span><span class="cx"> webkit.org/b/135390 fast/css/fontloader-events.html [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorresourcesconsoletestjsfromrev188141trunkLayoutTestsinspectorprotocolresourcesconsoletestjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/inspector/resources/console-test.js (from rev 188141, trunk/LayoutTests/inspector-protocol/resources/console-test.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/resources/console-test.js         (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/resources/console-test.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+InspectorTest.Console = {};
+
+InspectorTest.Console.sanitizeConsoleMessage = function(messageObject)
+{
+ function basename(url)
+ {
+ return url.substring(url.lastIndexOf("/") + 1) || "???";
+ }
+
+ var message = messageObject.params.message;
+ var obj = {
+ source: message.source,
+ level: message.level,
+ text: message.text,
+ location: basename(message.url) + ":" + message.line + ":" + message.column
+ };
+
+ if (message.parameters) {
+ var params = [];
+ for (var i = 0; i < message.parameters.length; ++i) {
+ var param = message.parameters[i];
+ var o = {type: param.type};
+ if (param.subtype)
+ o.subtype = param.subtype;
+ params.push(o);
+ }
+ obj.parameters = params;
+ }
+
+ return obj;
+}
+
+InspectorTest.Console.addTestCase = function(suite, args)
+{
+ if (!(suite instanceof InspectorTest.AsyncTestSuite))
+ throw new Error("Console test cases must be added to an async test suite.");
+
+ var {name, description, expression, expected} = args;
+ suite.addTestCase({
+ name,
+ description,
+ test: function(resolve, reject) {
+ InspectorTest.awaitEvent({
+ event: "Console.messageAdded",
+ })
+ .then(function(messageObject) {
+ var consoleMessage = messageObject.params.message;
+ var {source, level, text, parameters} = consoleMessage;
+ InspectorTest.assert(source === expected.source, "ConsoleMessage type should be '" + expected.source + "'.");
+ InspectorTest.assert(level === expected.level, "ConsoleMessage level should be '" + expected.level + "'.");
+
+ if (expected.text)
+ InspectorTest.assert(text === expected.text, "ConsoleMessage text should be '" + expected.text + "'.");
+
+ if (expected.parameters) {
+ InspectorTest.assert(parameters.length === expected.parameters.length, "ConsoleMessage parameters.length === " + expected.parameters.length);
+ for (var i = 0; i < parameters.length; ++i) {
+ var expectedType = expected.parameters[i];
+ InspectorTest.assert(parameters[i].type === expectedType, "ConsoleMessage parameter " + i + " should have type '" + expectedType + "'.");
+ }
+ }
+
+ resolve();
+ })
+ .catch(reject);
+
+ // Cause a messageAdded event to be generated.
+ InspectorTest.log("Evaluating expression: " + expression);
+ InspectorTest.sendCommand({
+ method: "Runtime.evaluate",
+ params: {expression}
+ });
+ }
+ });
+}
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorresourcesprobetestjsfromrev188141trunkLayoutTestsinspectorprotocolresourcesprobehelperjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/inspector/resources/probe-test.js (from rev 188141, trunk/LayoutTests/inspector-protocol/resources/probe-helper.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/resources/probe-test.js         (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/resources/probe-test.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,127 @@
</span><ins>+window.ProbeHelper = {};
+
+ProbeHelper.simplifiedProbeSample = function(messageObject)
+{
+ var data = messageObject.params.sample;
+ return {
+ probeId: data.probeId,
+ batchId: data.batchId,
+ sampleId: data.sampleId,
+ payload: data.payload
+ };
+}
+
+ProbeHelper.stringifyProbeSample = function(ProbeSample)
+{
+ console.assert(ProbeSample instanceof WebInspector.ProbeSample, "Unexpected object type!");
+ return JSON.stringify({
+ "sampleId": ProbeSample.sampleId,
+ "batchId": ProbeSample.batchId,
+ });
+}
+
+ProbeHelper.installTracingListeners = function()
+{
+ if (!WebInspector.debuggerManager || !WebInspector.probeManager)
+ return;
+
+ WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.BreakpointAdded, function(event) {
+ InspectorTest.log("Breakpoint was added.");
+ });
+
+ WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.BreakpointRemoved, function(event) {
+ InspectorTest.log("Breakpoint was removed.");
+ });
+
+ WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.DisabledStateDidChange, function(event) {
+ var breakpoint = event.target;
+ console.assert(breakpoint instanceof WebInspector.Breakpoint, "Unexpected object type!");
+
+ InspectorTest.log("Breakpoint disabled state changed: " + breakpoint.disabled);
+ });
+
+ WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.ResolvedStateDidChange, function(event) {
+ var breakpoint = event.target;
+ console.assert(breakpoint instanceof WebInspector.Breakpoint, "Unexpected object type!");
+
+ InspectorTest.log("Breakpoint resolved state changed: " + breakpoint.resolved);
+ });
+
+ WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.AutoContinueDidChange, function(event) {
+ var breakpoint = event.target;
+ console.assert(breakpoint instanceof WebInspector.Breakpoint, "Unexpected object type!");
+
+ InspectorTest.log("Breakpoint autocontinue state changed: " + breakpoint.autoContinue);
+ });
+
+ WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.ConditionDidChange, function(event) {
+ var breakpoint = event.target;
+ console.assert(breakpoint instanceof WebInspector.Breakpoint, "Unexpected object type!");
+
+ InspectorTest.log("Breakpoint condition changed: " + breakpoint.condition);
+ });
+
+ WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.ActionsDidChange, function(event) {
+ var breakpoint = event.target;
+ console.assert(breakpoint instanceof WebInspector.Breakpoint, "Unexpected object type!");
+
+ InspectorTest.log("Breakpoint actions changed. New count: " + breakpoint.actions.length);
+ });
+
+ WebInspector.probeManager.addEventListener(WebInspector.ProbeManager.Event.ProbeSetAdded, function(event) {
+ var probeSet = event.data.probeSet;
+ console.assert(probeSet instanceof WebInspector.ProbeSet, "Unexpected object type!");
+
+ InspectorTest.log("Probe set was added. New count: " + WebInspector.probeManager.probeSets.length);
+ });
+
+ WebInspector.probeManager.addEventListener(WebInspector.ProbeManager.Event.ProbeSetRemoved, function(event) {
+ var probeSet = event.data.probeSet;
+ console.assert(probeSet instanceof WebInspector.ProbeSet, "Unexpected object type!");
+
+ InspectorTest.log("Probe set was removed. New count: " + WebInspector.probeManager.probeSets.length);
+ });
+
+ WebInspector.Probe.addEventListener(WebInspector.Probe.Event.ExpressionChanged, function(event) {
+ var probe = event.target;
+ console.assert(probe instanceof WebInspector.Probe, "Unexpected object type!");
+
+ InspectorTest.log("Probe with identifier " + probe.id + " changed expression: " + probe.expression);
+ });
+
+ WebInspector.Probe.addEventListener(WebInspector.Probe.Event.SampleAdded, function(event) {
+ var probe = event.target;
+ var sample = event.data;
+ console.assert(probe instanceof WebInspector.Probe, "Unexpected object type!");
+ console.assert(sample instanceof WebInspector.ProbeSample, "Unexpected object type!");
+
+ InspectorTest.log("Probe with identifier " + probe.id + " added sample: " + sample);
+ });
+
+ WebInspector.Probe.addEventListener(WebInspector.Probe.Event.SamplesCleared, function(event) {
+ var probe = event.target;
+ console.assert(probe instanceof WebInspector.Probe, "Unexpected object type!");
+
+ InspectorTest.log("Probe with identifier " + probe.id + " cleared all samples.");
+ });
+
+ WebInspector.ProbeSet.addEventListener(WebInspector.ProbeSet.Event.ProbeAdded, function(event) {
+ var probe = event.data;
+ var probeSet = event.target;
+ console.assert(probe instanceof WebInspector.Probe, "Unexpected object type!");
+ console.assert(probeSet instanceof WebInspector.ProbeSet, "Unexpected object type!");
+
+ InspectorTest.log("Probe with identifier " + probe.id + " was added to probe set.");
+ InspectorTest.log("Probe set's probe count: " + probeSet.probes.length);
+ });
+
+ WebInspector.ProbeSet.addEventListener(WebInspector.ProbeSet.Event.ProbeRemoved, function(event) {
+ var probe = event.data;
+ var probeSet = event.target;
+ console.assert(probe instanceof WebInspector.Probe, "Unexpected object type!");
+ console.assert(probeSet instanceof WebInspector.ProbeSet, "Unexpected object type!");
+
+ InspectorTest.log("Probe with identifier " + probe.id + " was removed from probe set.");
+ InspectorTest.log("Probe set's probe count: " + probeSet.probes.length);
+ });
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsolemessageexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolconsoleconsolemessageexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/console-message-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/console/console-message-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-message-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/console/console-message-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+CONSOLE MESSAGE: line 1: log
+CONSOLE MESSAGE: line 1: info
+CONSOLE MESSAGE: line 1: warn
+CONSOLE MESSAGE: line 1: error
+CONSOLE MESSAGE: line 1: debug
+Tests that console.log and related APIs cause Console.messageAdded events to be generated with correct source, type, level, and parameter types.
+
+== Running test suite: Console.MessagesFromCommandLineAPI
+-- Running test case: ConsoleLogString
+Evaluating expression: console.log("log");
+PASS: ConsoleMessage type should be 'console-api'.
+PASS: ConsoleMessage level should be 'log'.
+PASS: ConsoleMessage text should be 'log'.
+PASS: ConsoleMessage parameters.length === 1
+PASS: ConsoleMessage parameter 0 should have type 'string'.
+
+-- Running test case: ConsoleInfoString
+Evaluating expression: console.info("info");
+PASS: ConsoleMessage type should be 'console-api'.
+PASS: ConsoleMessage level should be 'info'.
+PASS: ConsoleMessage text should be 'info'.
+PASS: ConsoleMessage parameters.length === 1
+PASS: ConsoleMessage parameter 0 should have type 'string'.
+
+-- Running test case: ConsoleWarnString
+Evaluating expression: console.warn("warn");
+PASS: ConsoleMessage type should be 'console-api'.
+PASS: ConsoleMessage level should be 'warning'.
+PASS: ConsoleMessage text should be 'warn'.
+PASS: ConsoleMessage parameters.length === 1
+PASS: ConsoleMessage parameter 0 should have type 'string'.
+
+-- Running test case: ConsoleErrorString
+Evaluating expression: console.error("error");
+PASS: ConsoleMessage type should be 'console-api'.
+PASS: ConsoleMessage level should be 'error'.
+PASS: ConsoleMessage text should be 'error'.
+PASS: ConsoleMessage parameters.length === 1
+PASS: ConsoleMessage parameter 0 should have type 'string'.
+
+-- Running test case: ConsoleDebugString
+Evaluating expression: console.debug("debug");
+PASS: ConsoleMessage type should be 'console-api'.
+PASS: ConsoleMessage level should be 'debug'.
+PASS: ConsoleMessage text should be 'debug'.
+PASS: ConsoleMessage parameters.length === 1
+PASS: ConsoleMessage parameter 0 should have type 'string'.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsolemessagehtmlfromrev188141trunkLayoutTestsinspectorprotocolconsoleconsolemessagehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/console-message.html (from rev 188141, trunk/LayoutTests/inspector-protocol/console/console-message.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-message.html         (rev 0)
+++ trunk/LayoutTests/inspector/console/console-message.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,103 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function generateSimpleConsoleMessages()
+{
+ console.log("log");
+ console.info("info");
+ console.warn("warn");
+ console.error("error");
+ console.debug("debug");
+}
+
+function test()
+{
+ InspectorTest.importScript("console-test.js");
+
+ var suite = new InspectorTest.AsyncTestSuite("Console.MessagesFromCommandLineAPI");
+
+ InspectorTest.Console.addTestCase(suite, {
+ name: "ConsoleLogString",
+ description: "Test `console.log(\"log\")`",
+ expression: 'console.log("log");',
+ expected: {
+ source: 'console-api',
+ level: 'log',
+ text: 'log',
+ parameters: ['string']
+ }
+ });
+
+ InspectorTest.Console.addTestCase(suite, {
+ name: "ConsoleInfoString",
+ description: "Test `console.info(\"info\")`",
+ expression: 'console.info("info");',
+ expected: {
+ source: 'console-api',
+ level: 'info',
+ text: 'info',
+ parameters: ['string']
+ }
+ });
+
+ InspectorTest.Console.addTestCase(suite, {
+ name: "ConsoleWarnString",
+ description: "Test `console.warn(\"warn\")`",
+ expression: 'console.warn("warn");',
+ expected: {
+ source: 'console-api',
+ level: 'warning',
+ text: 'warn',
+ parameters: ['string']
+ }
+ });
+
+ InspectorTest.Console.addTestCase(suite, {
+ name: "ConsoleErrorString",
+ description: "Test `console.error(\"error\")`",
+ expression: 'console.error("error");',
+ expected: {
+ source: 'console-api',
+ level: 'error',
+ text: 'error',
+ parameters: ['string']
+ }
+ });
+
+ InspectorTest.Console.addTestCase(suite, {
+ name: "ConsoleDebugString",
+ description: "Test `console.debug(\"debug\")`",
+ expression: 'console.debug("debug");',
+ expected: {
+ source: 'console-api',
+ level: 'debug',
+ text: 'debug',
+ parameters: ['string']
+ }
+ });
+
+ InspectorTest.awaitCommand({
+ method: "Console.enable",
+ params: {}
+ })
+ .then(function() {
+ suite.runTestCasesAndFinish();
+ })
+ .catch(fatalError);
+
+ function fatalError(e) {
+ InspectorTest.log("Test failed with fatal error: " + JSON.stringify(e));
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Tests that <code>console.log</code> and related APIs cause <code>Console.messageAdded</code> events to be generated with correct source, type, level, and parameter types.
+<br>
+</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolecsssourcelocationsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolconsolecsssourcelocationsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/css-source-locations-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/console/css-source-locations-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/css-source-locations-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/console/css-source-locations-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Tests that CSS parser warnings from inline style tags and external stylesheets are sent to the console with correct line and column information.
+{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"css-source-locations.html:6:20"}
+{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"css-source-locations.html:7:14"}
+{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"css-source-locations.html:8:7"}
+{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"css-source-locations.html:10:8"}
+{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:1:7"}
+{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:1:29"}
+{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:4:5"}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolecsssourcelocationshtmlfromrev188141trunkLayoutTestsinspectorprotocolconsolecsssourcelocationshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/css-source-locations.html (from rev 188141, trunk/LayoutTests/inspector-protocol/console/css-source-locations.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/css-source-locations.html         (rev 0)
+++ trunk/LayoutTests/inspector/console/css-source-locations.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<link rel="stylesheet" href="resources/errors.css">
+ <style> div { * color: red; }</style>
+<style>div { * color: red; }
+div { * color: red; }
+ div {
+ *
+ color:
+ red;
+ }
+</style>
+<script>
+function test()
+{
+ InspectorTest.importScript("console-test.js");
+
+ var consoleMessageCount = 0;
+ const expectedConsoleMessageCount = 7;
+
+ // Due to the difficulty of testing inline style tags in a test case, this test
+ // is a reference test that contains serialized Console.messageAdded event data.
+ InspectorTest.addEventListener({
+ event: "Console.messageAdded",
+ listener: function(messageObject) {
+ var message = InspectorTest.Console.sanitizeConsoleMessage(messageObject);
+ InspectorTest.log(JSON.stringify(message));
+
+ if (++consoleMessageCount !== expectedConsoleMessageCount)
+ return;
+
+ InspectorTest.awaitCommand({
+ method: "Console.disable",
+ params: {}
+ })
+ .then(function() {
+ InspectorTest.completeTest();
+ });
+ }
+ });
+
+ // Start the test.
+ InspectorTest.sendCommand({
+ method: "Console.enable",
+ params: {}
+ });
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Tests that CSS parser warnings from inline style tags and external stylesheets are sent to the console with correct line and column information.<br>
+</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolejssourcelocationsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolconsolejssourcelocationsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/js-source-locations-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/console/js-source-locations-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/js-source-locations-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/console/js-source-locations-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+CONSOLE MESSAGE: line 1: error script
+CONSOLE MESSAGE: line 1: warn script
+CONSOLE MESSAGE: line 5: error script
+CONSOLE MESSAGE: line 6: warn script
+CONSOLE MESSAGE: line 6: TypeError: undefined is not an object (evaluating '[].x.x')
+CONSOLE MESSAGE: line 8: warn 1
+CONSOLE MESSAGE: line 8: error 1
+CONSOLE MESSAGE: line 9: error 2
+Tests that JavaScript errors and warnings from inline script tags and external files are sent to the console with correct line and column information.
+{"source":"console-api","level":"error","text":"error script","location":"errors.js:1:14","parameters":[{"type":"string"}]}
+{"source":"console-api","level":"warning","text":"warn script","location":"errors.js:1:44","parameters":[{"type":"string"}]}
+{"source":"console-api","level":"error","text":"error script","location":"errors.js:5:18","parameters":[{"type":"string"}]}
+{"source":"console-api","level":"warning","text":"warn script","location":"errors.js:6:17","parameters":[{"type":"string"}]}
+{"source":"javascript","level":"error","text":"TypeError: undefined is not an object (evaluating '[].x.x')","location":"js-source-locations.html:6:18"}
+{"source":"console-api","level":"warning","text":"warn 1","location":"js-source-locations.html:8:13","parameters":[{"type":"string"}]}
+{"source":"console-api","level":"error","text":"error 1","location":"js-source-locations.html:8:38","parameters":[{"type":"string"}]}
+{"source":"console-api","level":"error","text":"error 2","location":"js-source-locations.html:9:17","parameters":[{"type":"string"}]}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolejssourcelocationshtmlfromrev188141trunkLayoutTestsinspectorprotocolconsolejssourcelocationshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/js-source-locations.html (from rev 188141, trunk/LayoutTests/inspector-protocol/console/js-source-locations.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/js-source-locations.html         (rev 0)
+++ trunk/LayoutTests/inspector/console/js-source-locations.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/errors.js"></script>
+ <script> [].x.x </script>
+<script>
+console.warn("warn 1"); console.error("error 1");
+ console.error("error 2");
+</script>
+<script>
+function test()
+{
+ InspectorTest.importScript("console-test.js");
+
+ var consoleMessageCount = 0;
+ const expectedConsoleMessageCount = 8;
+
+ // Due to the difficulty of testing inline script tags in a test case, this test
+ // is a reference test that contains serialized Console.messageAdded event data.
+ InspectorTest.addEventListener({
+ event: "Console.messageAdded",
+ listener: function(messageObject) {
+ var message = InspectorTest.Console.sanitizeConsoleMessage(messageObject);
+ InspectorTest.log(JSON.stringify(message));
+
+ if (++consoleMessageCount === expectedConsoleMessageCount)
+ InspectorTest.completeTest();
+ }
+ });
+
+ InspectorTest.sendCommand({
+ method: "Console.enable",
+ params: {}
+ });
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Tests that JavaScript errors and warnings from inline script tags and external files are sent to the console with correct line and column information.<br>
+</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleresourceserrorscssfromrev188141trunkLayoutTestsinspectorprotocolresourceserrorscss"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/resources/errors.css (from rev 188141, trunk/LayoutTests/inspector-protocol/resources/errors.css) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/resources/errors.css         (rev 0)
+++ trunk/LayoutTests/inspector/console/resources/errors.css        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+div { * color: red; } div { * color: red; }
+
+div {
+ *
+ color:
+ red;
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleresourceserrorsjsfromrev188141trunkLayoutTestsinspectorprotocolresourceserrorsjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/resources/errors.js (from rev 188141, trunk/LayoutTests/inspector-protocol/resources/errors.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/resources/errors.js         (rev 0)
+++ trunk/LayoutTests/inspector/console/resources/errors.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+console.error("error script"); console.warn("warn script");
+
+
+function foo() {
+ console.error("error script");
+ console.warn("warn script");
+}
+
+foo();
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolexframeoptionsmessageexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolconsolexframeoptionsmessageexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/x-frame-options-message-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/console/x-frame-options-message-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/x-frame-options-message-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/console/x-frame-options-message-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+CONSOLE MESSAGE: line 42: Refused to display 'x-frame-options-message.html' in a frame because it set 'X-Frame-Options' to 'deny'.
+
+
+== Running test suite: Console.XFrameOptionsMessages
+-- Running test case: XFrameOptionsDeny
+Evaluating expression: triggerXFrameOptionDeny();
+PASS: ConsoleMessage type should be 'security'.
+PASS: ConsoleMessage level should be 'error'.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolexframeoptionsmessagehtmlfromrev188141trunkLayoutTestsinspectorprotocolconsolexframeoptionsmessagehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/console/x-frame-options-message.html (from rev 188141, trunk/LayoutTests/inspector-protocol/console/x-frame-options-message.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/x-frame-options-message.html         (rev 0)
+++ trunk/LayoutTests/inspector/console/x-frame-options-message.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ InspectorTest.importScript("console-test.js");
+
+ let suite = new InspectorTest.AsyncTestSuite("Console.XFrameOptionsMessages");
+
+ InspectorTest.Console.addTestCase(suite, {
+ name: "XFrameOptionsDeny",
+ description: "Ensure that a console message is logged when enforcing an X-Frame-Options policy. In this case, setting X-Frame-Options: 'deny' means the iframe does not want to be embedded in the test page.",
+ expression: "triggerXFrameOptionDeny();",
+ expected: {source: 'security', level: 'error'}
+ });
+
+ InspectorTest.awaitCommand({
+ method: "Console.enable",
+ params: {}
+ })
+ .then(function() {
+ suite.runTestCasesAndFinish();
+ })
+ .catch(fatalError);
+
+ function fatalError(e) {
+ InspectorTest.log("Test failed with fatal error: " + JSON.stringify(e));
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+ <iframe id="denied"></iframe>
+ <script>
+ function triggerXFrameOptionDeny()
+ {
+ let deniedFrame = document.getElementById('denied');
+ let deniedDocument = deniedFrame.contentWindow.document;
+ deniedDocument.write('<meta http-equiv="X-Frame-Options" content="deny"/>');
+ }
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorcssgetSupportedCSSPropertiesexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolcssgetSupportedCSSPropertiesexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/css/getSupportedCSSProperties-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/css/getSupportedCSSProperties-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+box-shadow is supported
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorcssgetSupportedCSSPropertieshtmlfromrev188141trunkLayoutTestsinspectorprotocolcssgetSupportedCSSPropertieshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/css/getSupportedCSSProperties.html (from rev 188141, trunk/LayoutTests/inspector-protocol/css/getSupportedCSSProperties.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/css/getSupportedCSSProperties.html         (rev 0)
+++ trunk/LayoutTests/inspector/css/getSupportedCSSProperties.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("CSS.getSupportedCSSProperties", {}, function(messageObject) {
+ if ("error" in messageObject)
+ InspectorTest.log(messageObject.error.message);
+ else {
+ var cssProperty = "box-shadow";
+ var entries = messageObject["result"]["cssProperties"];
+
+ for (var i = 0; i < entries.length; ++i) {
+ if (entries[i].name === cssProperty) {
+ InspectorTest.log(entries[i].name + " is supported");
+ break;
+ }
+ }
+
+ if (i === entries.length)
+ InspectorTest.log(cssProperty + " is NOT supported");
+ }
+
+ InspectorTest.completeTest();
+ });
+}
+</script>
+</head>
+<body onLoad="runTest()">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointactiondetachexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointactiondetachexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-action-detach-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-action-detach-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-action-detach-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-action-detach-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Closing the inspector while executing the code for a breakpoint action should continue executing code.
+
+Found breakpoint.js
+inside breakpointWithCondition a:(1) b:(2) a+b:(3)
+Closing the inspector.
+PASS: Test did not crash after debugger disconnected.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointactiondetachhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointactiondetachhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-action-detach.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-action-detach.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-action-detach.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-action-detach.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function runBreakpointWithCondition()
+{
+ // The debugger should hit a breakpoint inside the breakpointWithCondition call.
+ breakpointWithCondition(1, 2);
+ // If we get here it means that the debugger was disconnected and the execution continued as usual.
+ log("PASS: Test did not crash after debugger disconnected.");
+ testRunner.notifyDone();
+}
+
+// This function is called by the breakpoint action.
+function disconnect()
+{
+ log("Closing the inspector.");
+ window.internals.closeDummyInspectorFrontend();
+}
+
+function test()
+{
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var breakpoint = {
+ location: {
+ scriptId: messageObject.params.scriptId,
+ lineNumber: 8,
+ columnNumber: 0
+ },
+ options: {
+ actions: [
+ {type: "evaluate", data: "disconnect()"},
+ {type: "evaluate", data: "log('FAIL: This action should not be executed.')"}
+ ]
+ }
+ };
+ InspectorTest.sendCommand("Debugger.setBreakpoint", breakpoint, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "runBreakpointWithCondition()"});
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("FAIL: Paused in debugger: reason = \"" + messageObject.params.reason + "\"");
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Closing the inspector while executing the code for a breakpoint action should continue executing code.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointactionevalhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/breakpoint-action-eval.html (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-action-eval.html        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-action-eval.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'">
</span><span class="cx"> <script type="text/javascript" src="../../http/tests/inspector/resources/inspector-test.js"></script>
</span><span class="cx"> <script type="text/javascript" src="../../http/tests/inspector/debugger/debugger-test.js"></script>
</span><del>-<script type="text/javascript" src="./resources/breakpoint.js"></script>
</del><ins>+<script type="text/javascript" src="resources/script-for-breakpoint-actions.js"></script>
</ins><span class="cx"> <script>
</span><span class="cx"> function runBreakpointActions()
</span><span class="cx"> {
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.ScriptAdded, function(event) {
</span><span class="cx"> var scriptObject = event.data.script;
</span><span class="cx">
</span><del>- if (!/breakpoint\.js$/.test(scriptObject.url))
</del><ins>+ if (!/script\-for\-breakpoint\-actions\.js$/.test(scriptObject.url))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> var location = scriptObject.createSourceCodeLocation(4, 0);
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointactionwithexceptionexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointactionwithexceptionexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-action-with-exception-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-action-with-exception-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-action-with-exception-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'this.will.cause')
+The debugger should not pause on exceptions thrown while executing the breakpoint actions.
+
+Found breakpoint.js
+inside breakpointWithCondition a:(1) b:(2) a+b:(3)
+PASS: Breakpoint action executed, but the exception did not cause the debugger to pause.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointactionwithexceptionhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointactionwithexceptionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-action-with-exception.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-action-with-exception.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-action-with-exception.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-action-with-exception.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+
+ var breakpoint = {
+ location: {
+ scriptId: messageObject.params.scriptId,
+ lineNumber: 8,
+ columnNumber: 0
+ },
+ options: {
+ autoContinue: true,
+ actions: [
+ {type: "evaluate", data: "this.will.cause.exception"}
+ ]
+ }
+ };
+ InspectorTest.sendCommand("Debugger.setBreakpoint", breakpoint, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(1,2)"}, function(messageObject) {
+ InspectorTest.checkForError(messageObject);
+ InspectorTest.log("PASS: Breakpoint action executed, but the exception did not cause the debugger to pause.")
+ completeTest();
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("FAIL: Paused in debugger: reason = \"" + messageObject.params.reason + "\"");
+ completeTest();
+ }
+
+ function completeTest()
+ {
+ // Reset the pauseOnException state before ending the test.
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "none"});
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>The debugger should not pause on exceptions thrown while executing the breakpoint actions.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointconditiondetachexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointconditiondetachexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-condition-detach-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-condition-detach-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-condition-detach-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-condition-detach-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Debugger.setBreakpoint with an action that throws an exception should not pause the debugger.
+
+Found breakpoint.js
+inside breakpointWithCondition a:(1) b:(2) a+b:(3)
+Closing the inspector.
+PASS: Test did not crash after debugger disconnected.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointconditiondetachhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointconditiondetachhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-condition-detach.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-condition-detach.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-condition-detach.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-condition-detach.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function runBreakpointWithCondition()
+{
+ // The debugger should hit a breakpoint inside the breakpointWithCondition call.
+ breakpointWithCondition(1, 2);
+ // If we get here it means that the debugger was disconnected and the execution continued as usual.
+ log("PASS: Test did not crash after debugger disconnected.");
+ testRunner.notifyDone();
+}
+
+// This function is called by the breakpoint condition.
+function disconnect()
+{
+ log("Closing the inspector.");
+ window.internals.closeDummyInspectorFrontend();
+ // Throwing an exception will make the debugger execute some code using a dead context.
+ // Test passes if the debugger is not crashing.
+ throw new Error();
+}
+
+function test()
+{
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var breakpoint = {
+ location: {
+ scriptId: messageObject.params.scriptId,
+ lineNumber: 8,
+ columnNumber: 0
+ },
+ options: {
+ condition: "disconnect()"
+ }
+ };
+ InspectorTest.sendCommand("Debugger.setBreakpoint", breakpoint, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "runBreakpointWithCondition()"});
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("FAIL: Paused in debugger: reason = \"" + messageObject.params.reason + "\"");
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpoint with an action that throws an exception should not pause the debugger.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointconditionwithbadscriptexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointconditionwithbadscriptexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-bad-script-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-bad-script-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-bad-script-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-bad-script-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+CONSOLE MESSAGE: line 9: SyntaxError: Unexpected keyword 'else'
+The debugger should not crash when executing a bad script for testing a breakpoint condition.
+
+Found breakpoint.js
+inside breakpointWithCondition a:(1) b:(2) a+b:(3)
+PASS: The VM should not crash.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointconditionwithbadscripthtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointconditionwithbadscripthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-bad-script.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-bad-script.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-bad-script.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-bad-script.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var breakpoint = {
+ location: {
+ scriptId: messageObject.params.scriptId,
+ lineNumber: 8,
+ columnNumber: 0
+ },
+ options: {
+ autoContinue: true,
+ condition: "else", // a bad script that should fail to parse.
+ action: [
+ {type: "log", data: "FAIL: The breakpoint action should not be executed if the condition had an exception."}
+ ]
+ }
+ };
+ InspectorTest.sendCommand("Debugger.setBreakpoint", breakpoint, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(1,2)"}, function() {
+ InspectorTest.log("PASS: The VM should not crash.");
+ completeTest();
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("FAIL: Paused in debugger: reason = \"" + messageObject.params.reason + "\"");
+ completeTest();
+ }
+
+ function completeTest()
+ {
+ // Reset the pauseOnException state before ending the test.
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>The debugger should not crash when executing a bad script for testing a breakpoint condition.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointconditionwithexceptionexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointconditionwithexceptionexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-exception-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-exception-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-exception-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'this.will.cause')
+The debugger should not pause on exceptions thrown while executing the breakpoint conditions.
+
+Found breakpoint.js
+inside breakpointWithCondition a:(1) b:(2) a+b:(3)
+PASS: The debugger should not pause on the exception inside the condition.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointconditionwithexceptionhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointconditionwithexceptionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-exception.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-condition-with-exception.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-exception.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-condition-with-exception.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var breakpoint = {
+ location: {
+ scriptId: messageObject.params.scriptId,
+ lineNumber: 8,
+ columnNumber: 0
+ },
+ options: {
+ autoContinue: true,
+ condition: "this.will.cause.exception",
+ action: [
+ {type: "log", data: "FAIL: The breakpoint action should not be executed if the condition had an exception."}
+ ]
+ }
+ };
+ InspectorTest.sendCommand("Debugger.setBreakpoint", breakpoint, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(1,2)"}, function() {
+ InspectorTest.log("PASS: The debugger should not pause on the exception inside the condition.");
+ completeTest();
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("FAIL: Paused in debugger: reason = \"" + messageObject.params.reason + "\"");
+ completeTest();
+ }
+
+ function completeTest()
+ {
+ // Reset the pauseOnException state before ending the test.
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "none"});
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>The debugger should not pause on exceptions thrown while executing the breakpoint conditions.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointevalwithexceptionexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointevalwithexceptionexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-eval-with-exception-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-eval-with-exception-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-eval-with-exception-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+While being paused on a breakpoint the debugger should ignore the exceptions from console commands.
+
+Found breakpoint.js
+inside breakpointBasic
+PASS: Paused in debugger: reason = "Breakpoint"
+PASS: The debugger should not stop on the exception thrown by a console command while paused on a breakpoint.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointevalwithexceptionhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointevalwithexceptionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-eval-with-exception.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-eval-with-exception.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-eval-with-exception.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-eval-with-exception.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var breakpoint = {
+ location: {
+ scriptId: messageObject.params.scriptId,
+ lineNumber: 3,
+ columnNumber: 0
+ }
+ };
+ InspectorTest.sendCommand("Debugger.setBreakpoint", breakpoint, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointBasic()"}, function() {
+ completeTest();
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = onBreakpointHit;
+
+ function onBreakpointHit(messageObject)
+ {
+ InspectorTest.log("PASS: Paused in debugger: reason = \"" + messageObject.params.reason + "\"");
+
+ // Make sure we do not pause again in the debugger.
+ InspectorTest.eventHandler["Debugger.paused"] = onPausedOnException;
+
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "this.should.trigger.an.exception"}, function(messageObject) {
+ InspectorTest.checkForError(messageObject);
+ InspectorTest.log("PASS: The debugger should not stop on the exception thrown by a console command while paused on a breakpoint.");
+ InspectorTest.sendCommand("Debugger.resume");
+ });
+ }
+
+ function onPausedOnException(messageObject)
+ {
+ InspectorTest.log("FAIL: Should not break on exceptions while paused on a breakpoint.");
+ completeTest();
+ }
+
+ function completeTest()
+ {
+ // InspectorTest.sendCommand("Debugger.resume", {});
+ // Reset the pauseOnException state before ending the test.
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "none"});
+ InspectorTest.sendCommand("Debugger.disable");
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>While being paused on a breakpoint the debugger should ignore the exceptions from console commands.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointinsideconditonsandactionsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointinsideconditonsandactionsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-inside-conditons-and-actions-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-inside-conditons-and-actions-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-inside-conditons-and-actions-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+The debugger should not pause on exceptions thrown while executing the breakpoint actions.
+
+Found breakpoint.js
+inside breakpointWithCondition a:(1) b:(2) a+b:(3)
+Executing condition
+inside breakpointBasic
+Condition executed
+Executing action
+inside breakpointBasic
+Action executed
+PASS: Breakpoint condition and action executed, but the exception did not cause the debugger to pause.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointinsideconditonsandactionshtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerbreakpointinsideconditonsandactionshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/breakpoint-inside-conditons-and-actions.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-inside-conditons-and-actions.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-inside-conditons-and-actions.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+
+ var breakpoint = {
+ location: {
+ scriptId: messageObject.params.scriptId,
+ lineNumber: 8,
+ columnNumber: 0
+ },
+ options: {
+ autoContinue: true,
+ condition: "log('Executing condition'); breakpointBasic(); log('Condition executed'); true;",
+ actions: [
+ {type: "evaluate", data: "log('Executing action'); breakpointBasic(); log('Action executed');"}
+ ]
+ }
+ };
+
+ // This breakpoint should not be hit at all. The only callers are the condition and action
+ // and breakpoints should be disabled while executing their code.
+ var breakpointInsideConditonAndAction = {
+ location: {
+ scriptId: messageObject.params.scriptId,
+ lineNumber: 3,
+ columnNumber: 0
+ }
+ };
+
+ InspectorTest.sendCommand("Debugger.setBreakpoint", breakpoint, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Debugger.setBreakpoint", breakpointInsideConditonAndAction, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, InspectorTest.checkForError);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(1,2)"}, function(messageObject) {
+ InspectorTest.checkForError(messageObject);
+ InspectorTest.log("PASS: Breakpoint condition and action executed, but the exception did not cause the debugger to pause.")
+ completeTest();
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("FAIL: Paused in debugger: reason = \"" + messageObject.params.reason + "\"");
+ completeTest();
+ }
+
+ function completeTest()
+ {
+ // Reset the pauseOnException state before ending the test.
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "none"});
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>The debugger should not pause on exceptions thrown while executing the breakpoint actions.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercallframefunctionnameexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggercallframefunctionnameexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/call-frame-function-name-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/call-frame-function-name-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/call-frame-function-name-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/call-frame-function-name-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Debugger.setBreakpoint on line:column in <script>
+
+Found <script>
+Running testFunction
+Hit Breakpoint!
+PASS: frame[0] ""
+PASS: frame[1] "forEach"
+PASS: frame[2] "testFunction"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercallframefunctionnamehtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggercallframefunctionnamehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/call-frame-function-name.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/call-frame-function-name.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/call-frame-function-name.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/call-frame-function-name.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test sets a breakpoint on line:column in the <script> below.
+ // We set a breakpoint before evaluating 'sum += ...', and verify that
+ // call frame functionNames are what we expect.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/call-frame-function-name\.html$/.test(messageObject.params.url) && messageObject.params.startLine > 10) {
+ InspectorTest.log("Found <script>");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var lineNumber = messageObject.params.startLine + 6;
+ var columnNumber = 12;
+ var location = {scriptId: scriptIdentifier, lineNumber: lineNumber, columnNumber: columnNumber};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function() {
+ InspectorTest.log("Running testFunction");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "testFunction()"});
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ var functionNames = [ ];
+ var i;
+ for (i = 0; i < 3; i++)
+ functionNames[i] = messageObject.params.callFrames[i].functionName;
+
+ function assertFunctionName(index, actual, expected) {
+ if (actual == expected)
+ InspectorTest.log('PASS: frame[' + index + '] "' + actual + '"');
+ else
+ InspectorTest.log('FAIL: frame[' + index + '] expect "' + expected + '", actual "' + actual + '"');
+ }
+
+ // frame 0 should be the anonymous inner function.
+ assertFunctionName(0, functionNames[0], "");
+
+ // frame 1 should be "forEach" (an internal/host function).
+ assertFunctionName(1, functionNames[1], "forEach");
+
+ // frame 2 should be "testFunction".
+ assertFunctionName(2, functionNames[2], "testFunction");
+
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger.setBreakpoint on line:column in &lt;script&gt;</p>
+<script>// Line 0
+function testFunction() { // Line 1
+ try { // Line 2
+ var array = [2, 5, 7]; // Line 3
+ var sum = 0; // Line 4
+ array.forEach(function(value) { // Line 5
+ sum += array[value]; // Line 6
+ });
+ } catch (e) {
+ console.log("Exception: " + e);
+ }
+}
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercallframethishostexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggercallframethishostexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/call-frame-this-host-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/call-frame-this-host-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/call-frame-this-host-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/call-frame-this-host-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Debugger.setBreakpoint on line:column in <script>
+
+Found <script>
+Running testFunction
+Hit Breakpoint!
+PASS: frame[0] type "object" className "Window"
+PASS: frame[1] type "object" className "Array"
+PASS: frame[2] type "object" className "Window"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercallframethishosthtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggercallframethishosthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/call-frame-this-host.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/call-frame-this-host.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/call-frame-this-host.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/call-frame-this-host.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,93 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test sets a breakpoint on line:column in the <script> below.
+ // We set a breakpoint before evaluating 'sum += ...', and verify that
+ // call frame this values are what we expect.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/call-frame-this-host\.html$/.test(messageObject.params.url) && messageObject.params.startLine > 10) {
+ InspectorTest.log("Found <script>");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var lineNumber = messageObject.params.startLine + 6;
+ var columnNumber = 12;
+ var location = {scriptId: scriptIdentifier, lineNumber: lineNumber, columnNumber: columnNumber};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function() {
+ InspectorTest.log("Running testFunction");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "testFunction()"});
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ var thisValues = [ ];
+ var i;
+ for (i = 0; i < 3; i++)
+ thisValues[i] = messageObject.params.callFrames[i].this;
+
+ function assertThisValue(index, actual, expected) {
+ var success = true;
+ if (actual.type != expected.type) {
+ InspectorTest.log('FAIL: frame[' + index + '] expect type "' + expected.type + '", actual "' + actual.type + '"');
+ success = false;
+ }
+
+ if (actual.className != expected.className) {
+ InspectorTest.log('FAIL: frame[' + index + '] expect className "' + expected.className + '", actual "' + actual.className + '"');
+ success = false;
+ }
+
+ if (success)
+ InspectorTest.log('PASS: frame[' + index + '] type "' + actual.type + '" className "' + actual.className + '"');
+ }
+
+ // frame 0 should be the anonymous inner function.
+ assertThisValue(0, thisValues[0], {
+ "type": "object",
+ "className": "Window"
+ });
+
+ // frame 1 should be "forEach" (an internal/host function).
+ assertThisValue(1, thisValues[1], {
+ "type": "object",
+ "className": "Array"
+ });
+
+ // frame 2 should be "testFunction".
+ assertThisValue(2, thisValues[2], {
+ "type": "object",
+ "className": "Window"
+ });
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger.setBreakpoint on line:column in &lt;script&gt;</p>
+<script>// Line 0
+function testFunction() { // Line 1
+ try { // Line 2
+ var array = [2, 5, 7]; // Line 3
+ var sum = 0; // Line 4
+ array.forEach(function(value) { // Line 5
+ sum += array[value]; // Line 6
+ });
+ } catch (e) {
+ console.log("Exception: " + e);
+ }
+}
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercallframethisnonstrictexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggercallframethisnonstrictexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/call-frame-this-nonstrict-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/call-frame-this-nonstrict-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/call-frame-this-nonstrict-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Debugger.setBreakpoint on line:column in <script>
+
+Found <script>
+Running testFunction
+PASS: step 0: type "object" className "Number"
+PASS: step 1: type "object" className "String"
+PASS: step 2: type "object" className "Number"
+PASS: step 3: type "object" className "String"
+PASS: step 4: type "object" className "Window"
+PASS: step 5: type "object" className "Window"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercallframethisnonstricthtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggercallframethisnonstricthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/call-frame-this-nonstrict.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/call-frame-this-nonstrict.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/call-frame-this-nonstrict.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/call-frame-this-nonstrict.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,144 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test sets a breakpoint on line:column in the <script> below.
+ // We set a breakpoint before evaluating 'sum += ...', and verify that
+ // call frame this values are what we expect.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/call-frame-this-nonstrict\.html$/.test(messageObject.params.url) && messageObject.params.startLine > 10) {
+ InspectorTest.log("Found <script>");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var lineNumber = messageObject.params.startLine + 3;
+ var columnNumber = 4;
+ var location = {scriptId: scriptIdentifier, lineNumber: lineNumber, columnNumber: columnNumber};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function() {
+ InspectorTest.log("Running testFunction");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "testFunction()"});
+ });
+ }
+ }
+
+ var step = 0;
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ function assertThisValue(step, actual, expected) {
+ var success = true;
+ if (actual.type != expected.type) {
+ InspectorTest.log('FAIL: step ' + step + ': expect type "' + expected.type + '", actual "' + actual.type + '"');
+ success = false;
+ }
+
+ if (actual.className != expected.className) {
+ var actualResult
+ InspectorTest.log('FAIL: step ' + step + ': expect className "' + expected.className + '", actual "' + actual.className + '"');
+ success = false;
+ }
+
+ if (success)
+ InspectorTest.log('PASS: step ' + step + ': type "' + actual.type + '" className "' + actual.className + '"');
+ }
+
+ switch (step) {
+ case 0:
+ assertThisValue(0, messageObject.params.callFrames[1].this, {
+ "type": "object",
+ "className": "Number"
+ });
+ break;
+
+ case 1:
+ assertThisValue(1, messageObject.params.callFrames[1].this, {
+ "type": "object",
+ "className": "String"
+ });
+ break;
+
+ case 2:
+ assertThisValue(2, messageObject.params.callFrames[1].this, {
+ "type": "object",
+ "className": "Number"
+ });
+ break;
+
+ case 3:
+ assertThisValue(3, messageObject.params.callFrames[1].this, {
+ "type": "object",
+ "className": "String"
+ });
+ break;
+
+ case 4:
+ assertThisValue(4, messageObject.params.callFrames[1].this, {
+ "type": "object",
+ "className": "Window"
+ });
+ break;
+
+ case 5:
+ assertThisValue(5, messageObject.params.callFrames[1].this, {
+ "type": "object",
+ "className": "Window"
+ });
+ break;
+ }
+ InspectorTest.sendCommand("Debugger.resume", {});
+ if (step == 5)
+ InspectorTest.completeTest();
+ step++;
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger.setBreakpoint on line:column in &lt;script&gt;</p>
+<script>// Line 0
+// Line 1
+function breakWithMessage(message) { // Line 2
+ message; // Line 3
+}
+function accessThis() {
+ breakWithMessage("this is " + this);
+}
+function dontAccessThis() {
+ breakWithMessage("not accessing this");
+}
+function testFunction() {
+ var thisValue = 2;
+ accessThis.bind(thisValue)();
+
+ thisValue = "Hello";
+ accessThis.bind(thisValue)();
+
+ thisValue = 2;
+ dontAccessThis.bind(thisValue)();
+
+ thisValue = "Hello";
+ dontAccessThis.bind(thisValue)();
+
+ function foo() {
+ var fooStuff = 1;
+ function goo() {
+ accessThis();
+
+ dontAccessThis();
+
+ return fooStuff;
+ }
+ goo();
+ }
+ foo();
+}
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercallframethisstrictexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggercallframethisstrictexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/call-frame-this-strict-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/call-frame-this-strict-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/call-frame-this-strict-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/call-frame-this-strict-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Debugger.setBreakpoint on line:column in <script>
+
+Found <script>
+Running testFunction
+PASS: step 0: type "number" value "2"
+PASS: step 1: type "string" value "Hello"
+PASS: step 2: type "number" value "2"
+PASS: step 3: type "string" value "Hello"
+PASS: step 4: type "undefined" value "undefined"
+PASS: step 5: type "undefined" value "undefined"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggercallframethisstricthtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggercallframethisstricthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/call-frame-this-strict.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/call-frame-this-strict.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/call-frame-this-strict.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/call-frame-this-strict.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,149 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test sets a breakpoint on line:column in the <script> below.
+ // We set a breakpoint before evaluating 'sum += ...', and verify that
+ // call frame this values are what we expect.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/call-frame-this-strict\.html$/.test(messageObject.params.url) && messageObject.params.startLine > 10) {
+ InspectorTest.log("Found <script>");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var lineNumber = messageObject.params.startLine + 3;
+ var columnNumber = 4;
+ var location = {scriptId: scriptIdentifier, lineNumber: lineNumber, columnNumber: columnNumber};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function() {
+ InspectorTest.log("Running testFunction");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "testFunction()"});
+ });
+ }
+ }
+
+ var step = 0;
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ function assertThisValue(step, actual, expected) {
+ var success = true;
+ if (actual.type != expected.type) {
+ InspectorTest.log('FAIL: step ' + step + ': expect type "' + expected.type + '", actual "' + actual.type + '"');
+ success = false;
+ }
+
+ if (actual.type != "undefined") {
+ if (typeof actual.value != typeof expected.value) {
+ InspectorTest.log('FAIL: step ' + step + ': expect value type "' + typeof expected.value + '", actual "' + typeof actual.value + '"');
+ success = false;
+ }
+
+ if (actual.value != expected.value) {
+ var actualResult
+ InspectorTest.log('FAIL: step ' + step + ': expect value "' + expected.value + '", actual "' + actual.value + '"');
+ success = false;
+ }
+ }
+
+ if (success)
+ InspectorTest.log('PASS: step ' + step + ': type "' + actual.type + '" value "' + actual.value + '"');
+ }
+
+ switch (step) {
+ case 0:
+ assertThisValue(0, messageObject.params.callFrames[1].this, {
+ "type": "number",
+ "value": 2
+ });
+ break;
+
+ case 1:
+ assertThisValue(1, messageObject.params.callFrames[1].this, {
+ "type": "string",
+ "value": "Hello"
+ });
+ break;
+
+ case 2:
+ assertThisValue(2, messageObject.params.callFrames[1].this, {
+ "type": "number",
+ "value": 2
+ });
+ break;
+
+ case 3:
+ assertThisValue(3, messageObject.params.callFrames[1].this, {
+ "type": "string",
+ "value": "Hello"
+ });
+ break;
+
+ case 4:
+ assertThisValue(4, messageObject.params.callFrames[1].this, {
+ "type": "undefined"
+ });
+ break;
+
+ case 5:
+ assertThisValue(5, messageObject.params.callFrames[1].this, {
+ "type": "undefined"
+ });
+ break;
+ }
+ InspectorTest.sendCommand("Debugger.resume", {});
+ if (step == 5)
+ InspectorTest.completeTest();
+ step++;
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger.setBreakpoint on line:column in &lt;script&gt;</p>
+<script>// Line 0
+"use strict"; // Line 1
+function breakWithMessage(message) { // Line 2
+ message; // Line 3
+}
+function accessThis() {
+ breakWithMessage("this is " + this);
+}
+function dontAccessThis() {
+ breakWithMessage("not accessing this");
+}
+function testFunction() {
+ var thisValue = 2;
+ accessThis.bind(thisValue)();
+
+ thisValue = "Hello";
+ accessThis.bind(thisValue)();
+
+ thisValue = 2;
+ dontAccessThis.bind(thisValue)();
+
+ thisValue = "Hello";
+ dontAccessThis.bind(thisValue)();
+
+ function foo() {
+ var fooStuff = 1;
+ function goo() {
+ accessThis();
+
+ dontAccessThis();
+
+ return fooStuff;
+ }
+ goo();
+ }
+ foo();
+}
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerdebuggerstatementexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerdebuggerstatementexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/debugger-statement-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/debugger-statement-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/debugger-statement-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/debugger-statement-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Debugger statement should break in debugger.
+
+Found breakpoint.js
+In function with debugger statement
+Broke at debugger statement
+
+After debugger statement
+PASS
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerdebuggerstatementhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerdebuggerstatementhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/debugger-statement.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/debugger-statement.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/debugger-statement.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/debugger-statement.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test setting 2 breakpoints in DFG compiled functions: one inlined,
+ // and one not inlined.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var breakpointFound = false;
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+
+ InspectorTest.sendCommand("Runtime.evaluate", {
+ expression: "debuggerStatement();"
+ }, function(responseObject) {
+ if (breakpointFound)
+ InspectorTest.log("PASS");
+ InspectorTest.completeTest();
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Broke at debugger statement\n");
+ breakpointFound = true;
+ InspectorTest.sendCommand("Debugger.resume", {});
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger statement should break in debugger.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerdidSampleProbemultipleprobesexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerdidSampleProbemultipleprobesexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Debugger.setBreakpoint with multiple probe actions at the same breakpoint. Test Debugger.didSampleProbe events for the probe samples.
+
+Found breakpoint.js
+Running breakpointActions to trigger probe samples.
+inside breakpointActions a:(12) b:([object Object])
+inside breakpointActions a:(12) b:([object Object])
+Received probe sample payload: {"type":"number","value":12,"description":"12"}
+Received probe sample payload: {"type":"number","value":12,"description":"12"}
+Received probe sample payload: {"type":"number","value":12,"description":"12"}
+Received probe sample payload: {"type":"number","value":12,"description":"12"}
+PASS: Samples from different probe actions should have unique action identifiers.
+PASS: Samples from probe actions on the same breakpoint should have the same batch identifiers.
+PASS: SampleIds from a any probe are sequential and start counting from one.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerdidSampleProbemultipleprobeshtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerdidSampleProbemultipleprobeshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/didSampleProbe-multiple-probes.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,94 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.importScript("probe-test.js");
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var samples = [];
+ const expectedSampleCount = 4;
+
+ function receivedAllExpectedSamples() {
+ return samples.length === expectedSampleCount;
+ }
+
+ function dumpSamples() {
+ for (var i = 0; i < samples.length; i++)
+ InspectorTest.log("Sample " + (i + 1) + ": " + JSON.stringify(samples[i]));
+ }
+
+ var tests = [
+ {
+ message: "Samples from different probe actions should have unique action identifiers.",
+ predicate: function samplesHaveUniqueActionIds() {
+ return samples[0].probeId !== samples[1].probeId;
+ },
+ error: dumpSamples
+ },
+ {
+ message: "Samples from probe actions on the same breakpoint should have the same batch identifiers.",
+ predicate: function samplesHaveEqualBatchIds() {
+ return samples[0].batchId === samples[1].batchId;
+ },
+ error: dumpSamples
+ },
+ {
+ message: "SampleIds from a any probe are sequential and start counting from one.",
+ predicate: function samplesHaveSequentialIds() {
+ return samples.every(function(sample, idx) { return sample.sampleId === idx + 1; });
+ },
+ error: dumpSamples
+ },
+ ];
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var location = {scriptId: scriptIdentifier, lineNumber: 18, columnNumber: 0};
+ var options = {
+ autoContinue: true,
+ actions: [
+ {"type": "probe", "data": "a", "id": 1},
+ {"type": "probe", "data": "a", "id": 2}
+ ]
+ };
+
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+
+ InspectorTest.log("Running breakpointActions to trigger probe samples.");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(12, {x:1,y:2})"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(12, {x:1,y:2})"});
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.didSampleProbe"] = function(messageObject)
+ {
+ var sample = ProbeHelper.simplifiedProbeSample(messageObject);
+ samples.push(sample);
+ InspectorTest.log("Received probe sample payload: " + JSON.stringify(sample.payload));
+
+ if (receivedAllExpectedSamples()) {
+ tests.forEach(function(test) {
+ var result = test.predicate();
+ InspectorTest.assert(result, test.message);
+ if (!result)
+ test.error();
+ });
+ InspectorTest.completeTest();
+ }
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpoint with multiple probe actions at the same breakpoint. Test Debugger.didSampleProbe events for the probe samples.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerhitbreakpointfromconsoleexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerhitbreakpointfromconsoleexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/hit-breakpoint-from-console-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/hit-breakpoint-from-console-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/hit-breakpoint-from-console-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/hit-breakpoint-from-console-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+Debugger.setBreakpoint on line:18 in <script src="resources/breakpoint.js">
+
+Found breakpoint.js
+inside breakpointActions a:(2) b:([object Object])
+inside breakpointActions a:(12) b:([object Object])
+Hit Breakpoint!
+PASS
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerhitbreakpointfromconsolehtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerhitbreakpointfromconsolehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/hit-breakpoint-from-console.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/hit-breakpoint-from-console.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/hit-breakpoint-from-console.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/hit-breakpoint-from-console.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var location = {scriptId: scriptIdentifier, lineNumber: 18, columnNumber: 0};
+ var options = {
+ condition: "a > 10",
+ };
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ // Should NOT hit breakpoint (a < 10).
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(2, {x:1,y:2})"});
+ // Should hit breakpoint (a > 10).
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(12, {x:1,y:2})"});
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ InspectorTest.log("PASS");
+ InspectorTest.completeTest();
+ }
+
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpoint on line:18 in &lt;script src="resources/breakpoint.js"&gt;</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggernestedinspectorsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggernestedinspectorsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/nested-inspectors-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/nested-inspectors-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/nested-inspectors-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/nested-inspectors-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+CONSOLE MESSAGE: line 1: Error: PASS: Expected exception
+Checking that the inspector code can be debugged using a second inspector window.
+
+Debugger.setPauseOnExceptions - all
+PASS: Paused!
+PASS: Resumed!
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggernestedinspectorshtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggernestedinspectorshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/nested-inspectors.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/nested-inspectors.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/nested-inspectors.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/nested-inspectors.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/exception.js"></script>
+<script>
+function test()
+{
+ function testFunction() {
+ // This function runs in the second inspector window. We can use this one to debug the first inspector.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Debugger.setPauseOnExceptions - all");
+
+ // Trigger an exception in the main inspector.
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throw new Error('PASS: Expected exception') }, 0);"});
+ });
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("PASS: Paused!");
+ InspectorTest.sendCommand("Debugger.resume", {});
+ }
+
+ InspectorTest.eventHandler["Debugger.resumed"] = function(messageObject)
+ {
+ InspectorTest.log("PASS: Resumed!");
+
+ // Revert Debugger.setPauseOnExceptions as it can have an impact on the following tests.
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "none"}, function(responseObject) {
+ InspectorTest.completeTest();
+ });
+ }
+ };
+
+ window.log = InspectorTest.log.bind(InspectorTest);
+ window.closeTest = function()
+ {
+ window.internals.closeDummyInspectorFrontend();
+ InspectorTest.completeTest();
+ }
+
+ var secondInspectorFrontend = window.internals.openDummyInspectorFrontend("ProtocolTestStub.html");
+ secondInspectorFrontend.addEventListener("load", function(event) {
+ secondInspectorFrontend.postMessage("(" + testFunction.toString() +")();", "*");
+ });
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Checking that the inspector code can be debugged using a second inspector window.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerpausededicatedworkerexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerpausededicatedworkerexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/pause-dedicated-worker-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/pause-dedicated-worker-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/pause-dedicated-worker-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/pause-dedicated-worker-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Started worker
+Worker created
+didConnectToWorker
+SUCCESS: Worker paused
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerpausededicatedworkerhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerpausededicatedworkerhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/pause-dedicated-worker.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/pause-dedicated-worker.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/pause-dedicated-worker.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/pause-dedicated-worker.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+var worker;
+function startWorkerAndRunTest()
+{
+ worker = new Worker("resources/dedicated-worker.js");
+ worker.onmessage = function(event) { };
+ worker.postMessage(1);
+ log("Started worker");
+ runTest();
+}
+
+function test()
+{
+ var workerId;
+ var workerRequestId = 1;
+ function sendCommandToWorker(method, params)
+ {
+ InspectorTest.sendCommand("Worker.sendMessageToWorker", {
+ "workerId": workerId,
+ "message": {
+ "method": method,
+ "params": params,
+ "id": workerRequestId++
+ }
+ });
+ }
+
+ InspectorTest.sendCommand("Worker.enable", {}, function(messageObject) {
+ if ("error" in messageObject) {
+ InspectorTest.log("FAIL: Couldn't enable worker debugger: " + messageObject.error.message);
+ InspectorTest.completeTest();
+ }
+ });
+
+ InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject)
+ {
+ workerId = messageObject["params"]["workerId"];
+ InspectorTest.log("Worker created");
+ InspectorTest.sendCommand("Worker.connectToWorker", { "workerId": workerId }, function(messageObject) {
+ InspectorTest.log("didConnectToWorker");
+ sendCommandToWorker("Debugger.enable", {});
+ sendCommandToWorker("Debugger.pause", {});
+ });
+ }
+
+ InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = function(messageObject)
+ {
+ var message = messageObject["params"]["message"];
+ if (message["method"] === "Debugger.paused") {
+ InspectorTest.log("SUCCESS: Worker paused");
+ sendCommandToWorker("Debugger.disable", {});
+ InspectorTest.completeTest();
+ }
+ }
+}
+</script>
+</head>
+<body onLoad="startWorkerAndRunTest();">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerpauseonassertexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerpauseonassertexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/pause-on-assert-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/pause-on-assert-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/pause-on-assert-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+CONSOLE MESSAGE: line 10: Should always fail.
+CONSOLE MESSAGE: line 22: ASSERT message
+Test that a failing console.assert will pause in the debugger with an optional message.
+
+Should not pause on passing assert.
+inside assertOkay
+Should pause on failing assert.
+inside assertFalse
+PASS: Paused!
+Should not pause on passing assert.
+inside assertCondition, and condition is true
+Should pause on failing assert.
+inside assertCondition, and condition is false
+PASS: Paused!
+Should not pause on passing assert.
+inside assertConditionWithMessage, and condition is true
+Should pause on failing assert and include a message.
+inside assertConditionWithMessage, and condition is false
+PASS: Paused!
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerpauseonasserthtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerpauseonasserthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/pause-on-assert.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/pause-on-assert.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/pause-on-assert.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/assert.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, InspectorTest.checkForError);
+
+ var step = null;
+ var steps = [
+ {
+ message: "Should not pause on passing assert.",
+ evaluate: "assertTrue()",
+ pause: false,
+ },
+ {
+ message: "Should pause on failing assert.",
+ evaluate: "assertFalse()",
+ pause: true,
+ },
+ {
+ message: "Should not pause on passing assert.",
+ evaluate: "assertCondition(window)",
+ pause: false,
+ },
+ {
+ message: "Should pause on failing assert.",
+ evaluate: "assertCondition(window === null)",
+ pause: true,
+ },
+ {
+ message: "Should not pause on passing assert.",
+ evaluate: "assertConditionWithMessage(window, 'Should not happen')",
+ pause: false,
+ },
+ {
+ message: "Should pause on failing assert and include a message.",
+ evaluate: "assertConditionWithMessage(window === null, 'ASSERT message')",
+ pause: true,
+ },
+ ];
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ if (step.pause)
+ InspectorTest.log("PASS: Paused!");
+ else
+ InspectorTest.log("FAIL: Paused when unexpected");
+
+ InspectorTest.sendCommand("Debugger.resume", {}, runNextStep);
+ }
+
+ function runNextStep() {
+ step = steps.shift();
+ if (!step) {
+ InspectorTest.completeTest();
+ return;
+ }
+
+ // Evalute the command inside a setTimeout so that we can hit exceptions and break.
+ // Otherwise, evaluating through RuntimeAgent will not trigger a pause.
+ // Likewise, if no pause is expected wait for a bit before continuing.
+ InspectorTest.log(step.message);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function(){" + step.evaluate + "}, 0)"}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ if (!step.pause)
+ setTimeout(runNextStep, 20);
+ });
+ }
+
+ runNextStep();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Test that a failing console.assert will pause in the debugger with an optional message.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerprobemanageraddremoveactionshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/probe-manager-add-remove-actions.html (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/probe-manager-add-remove-actions.html        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/debugger/probe-manager-add-remove-actions.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> <head>
</span><span class="cx"> <script type="text/javascript" src="../../http/tests/inspector/resources/inspector-test.js"></script>
</span><span class="cx"> <script type="text/javascript" src="../../http/tests/inspector/debugger/debugger-test.js"></script>
</span><del>-<script type="text/javascript" src="./resources/breakpoint.js"></script>
</del><ins>+<script type="text/javascript" src="resources/script-for-breakpoint-actions.js"></script>
</ins><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">
</span><span class="cx"> var scriptObject = event.data.script;
</span><span class="cx">
</span><del>- if (!/breakpoint\.js$/.test(scriptObject.url))
</del><ins>+ if (!/script\-for\-breakpoint\-actions\.js$/.test(scriptObject.url))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> var location = scriptObject.createSourceCodeLocation(4, 0);
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerregress133182expectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerregress133182expectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/regress-133182-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+CONSOLE MESSAGE: line 47: [1] Testing statement '({}).a.b.c.d;'
+CONSOLE MESSAGE: line 48: [1] Paused and about to step
+CONSOLE MESSAGE: line 60: [1] Resumed
+CONSOLE MESSAGE: line 52: [1] Paused after stepping
+CONSOLE MESSAGE: line 60: [1] Resumed
+CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating '({}).a.b')
+CONSOLE MESSAGE: line 47: [2] Testing statement 'exceptionBasic();'
+CONSOLE MESSAGE: line 48: [2] Paused and about to step
+CONSOLE MESSAGE: line 60: [2] Resumed
+CONSOLE MESSAGE: line 52: [2] Paused after stepping
+CONSOLE MESSAGE: line 60: [2] Resumed
+CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
+CONSOLE MESSAGE: line 47: [3] Testing statement 'exceptionDOM();'
+CONSOLE MESSAGE: line 48: [3] Paused and about to step
+CONSOLE MESSAGE: line 60: [3] Resumed
+CONSOLE MESSAGE: line 52: [3] Paused after stepping
+CONSOLE MESSAGE: line 60: [3] Resumed
+CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 47: [4] Testing statement 'exceptionInHostFunction();'
+CONSOLE MESSAGE: line 48: [4] Paused and about to step
+CONSOLE MESSAGE: line 60: [4] Resumed
+CONSOLE MESSAGE: line 52: [4] Paused after stepping
+CONSOLE MESSAGE: line 60: [4] Resumed
+CONSOLE MESSAGE: line 24: exception in host function
+CONSOLE MESSAGE: line 47: [5] Testing statement 'throwString();'
+CONSOLE MESSAGE: line 48: [5] Paused and about to step
+CONSOLE MESSAGE: line 60: [5] Resumed
+CONSOLE MESSAGE: line 52: [5] Paused after stepping
+CONSOLE MESSAGE: line 60: [5] Resumed
+CONSOLE MESSAGE: line 13: exception string
+CONSOLE MESSAGE: line 47: [6] Testing statement 'throwParam({x:1});'
+CONSOLE MESSAGE: line 48: [6] Paused and about to step
+CONSOLE MESSAGE: line 60: [6] Resumed
+CONSOLE MESSAGE: line 52: [6] Paused after stepping
+CONSOLE MESSAGE: line 60: [6] Resumed
+CONSOLE MESSAGE: line 18: [object Object]
+CONSOLE MESSAGE: line 47: [7] Testing statement 'throwParam(new Error('error message'));'
+CONSOLE MESSAGE: line 48: [7] Paused and about to step
+CONSOLE MESSAGE: line 60: [7] Resumed
+CONSOLE MESSAGE: line 52: [7] Paused after stepping
+CONSOLE MESSAGE: line 60: [7] Resumed
+CONSOLE MESSAGE: line 18: Error: error message
+Regression test for https://bugs.webkit.org/show_bug.cgi?id=133182
+
+Stepping after breaking on uncaught exceptions should not crash
+
+PASS - paused for each uncaught exception
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerregress133182htmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerregress133182html"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/regress-133182.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/regress-133182.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/regress-133182.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/regress-133182.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/exception.js"></script>
+<script>
+function test()
+{
+ var expectPause = false;
+ var isStepping = false;
+
+ var testIndex = 0;
+ var statementsWithUncaughtExceptions = [
+ "({}).a.b.c.d;",
+ "exceptionBasic();",
+ "exceptionDOM();",
+ "exceptionInHostFunction();",
+ "throwString();",
+ "throwParam({x:1});",
+ "throwParam(new Error('error message'));"
+ ];
+
+ function triggerNextUncaughtException()
+ {
+ // Evaluate statement and expect to pause.
+ if (testIndex < statementsWithUncaughtExceptions.length) {
+ var statement = statementsWithUncaughtExceptions[testIndex++];
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { " + statement + " }, 0);"});
+ return;
+ }
+
+ // Done evaluating statements to pause. Evaluate some more we do not expect to pause.
+ InspectorTest.log("PASS - paused for each uncaught exception");
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "uncaught"}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ expectPause = true;
+ triggerNextUncaughtException();
+ });
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ if (!expectPause) {
+ InspectorTest.log("FAIL - debugger paused when we did not expect to");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ if (!isStepping) {
+ console.log("[" + testIndex + "] Testing statement '" + statementsWithUncaughtExceptions[testIndex - 1] + "'");
+ console.log("[" + testIndex + "] Paused and about to step");
+ isStepping = true;
+ InspectorTest.sendCommand("Debugger.stepOver", {});
+ } else {
+ console.log("[" + testIndex + "] Paused after stepping");
+ isStepping = false;
+ InspectorTest.sendCommand("Debugger.resume", {});
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.resumed"] = function(messageObject)
+ {
+ console.log("[" + testIndex + "] Resumed");
+ if (!isStepping)
+ triggerNextUncaughtException();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Regression test for https://bugs.webkit.org/show_bug.cgi?id=133182</p>
+<p>Stepping after breaking on uncaught exceptions should not crash</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerremoveBreakpointexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerremoveBreakpointexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/removeBreakpoint-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/removeBreakpoint-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/removeBreakpoint-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/removeBreakpoint-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Debugger.removeBreakpoint
+
+Found breakpoint.js
+Set Breakpoint, Triggering it
+inside breakpointBasic
+Hit Breakpoint!
+Resumed, Removing Breakpoint and trying to trigger it again
+inside breakpointBasic
+PASS: did not hit breakpoint after removing it.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerremoveBreakpointhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerremoveBreakpointhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/removeBreakpoint.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/removeBreakpoint.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/removeBreakpoint.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/removeBreakpoint.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var breakpointTriggered = 0;
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var location = {scriptId: scriptIdentifier, lineNumber: 3, columnNumber: 0};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Set Breakpoint, Triggering it");
+ breakpointIdentifier = responseObject.result.breakpointId;
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointBasic()"});
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ ++breakpointTriggered;
+
+ if (breakpointTriggered === 1)
+ InspectorTest.sendCommand("Debugger.resume", {});
+ else {
+ InspectorTest.log("FAIL: should not have hit breakpoint after it was removed.");
+ InspectorTest.completeTest();
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.resumed"] = function(messageObject)
+ {
+ InspectorTest.log("Resumed, Removing Breakpoint and trying to trigger it again");
+ InspectorTest.sendCommand("Debugger.removeBreakpoint", {"breakpointId": breakpointIdentifier}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointBasic()"}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ setTimeout(function() {
+ InspectorTest.log("PASS: did not hit breakpoint after removing it.");
+ InspectorTest.completeTest();
+ }, 50);
+ });
+ });
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.removeBreakpoint</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesassertjsfromrev188141trunkLayoutTestsinspectorprotocoldebuggerresourcesassertjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/resources/assert.js (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/resources/assert.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/assert.js         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/assert.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+function assertTrue()
+{
+ log("inside assertOkay");
+ console.assert(true, "Should never happen.");
+}
+
+function assertFalse()
+{
+ log("inside assertFalse");
+ console.assert(false, "Should always fail.");
+}
+
+function assertCondition(condition)
+{
+ log("inside assertCondition, and condition is " + !!condition);
+ console.assert(condition);
+}
+
+function assertConditionWithMessage(condition, message)
+{
+ log("inside assertConditionWithMessage, and condition is " + !!condition);
+ console.assert(condition, message);
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesbreakpointjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/resources/breakpoint.js (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/breakpoint.js        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/debugger/resources/breakpoint.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,5 +1,115 @@
</span><ins>+function breakpointBasic()
+{
+ log("inside breakpointBasic");
+}
+
+function breakpointWithCondition(a, b)
+{
+ log("inside breakpointWithCondition a:(" + a + ") b:(" + b + ") a+b:(" + (a+b) + ")");
+}
+
+function breakpointAutomaticallyContinue()
+{
+ log("inside breakpointAutomaticallyContinue");
+}
+
</ins><span class="cx"> function breakpointActions(a, b)
</span><span class="cx"> {
</span><del>- // Only preserve this message on the current test page load.
- InspectorTestProxy.addResult("inside breakpointActions a:(" + a + ") b:(" + b + ")");
</del><ins>+ log("inside breakpointActions a:(" + a + ") b:(" + b + ")");
</ins><span class="cx"> }
</span><ins>+
+function notInlineable(x)
+{
+ var func = new Function("return x + 100;");
+ return x + 3;
+}
+
+function inlineable(x)
+{
+ return x + 5;
+}
+
+function notInliningFoo(x)
+{
+ return notInlineable(x);
+}
+
+function inliningFoo(x)
+{
+ return inlineable(x);
+}
+
+function dfgWithoutInline()
+{
+ var i;
+ var result = 0;
+ for (i = 0; i < 1000; i++)
+ result += notInliningFoo(i);
+ log("dfgWithoutInline result: " + result);
+}
+
+function dfgWithInline()
+{
+ var i;
+ var result = 0;
+ for (i = 0; i < 1000; i++)
+ result += inliningFoo(i);
+ log("dfgWithInline result: " + result);
+}
+
+function notInlineable2(x, callFunctionWithBreakpoint)
+{
+ var func = new Function("return x + 100;");
+ if (callFunctionWithBreakpoint)
+ breakpointBasic();
+ return x + 3;
+}
+
+function dfgWithoutInline2()
+{
+ var i;
+ var result = 0;
+ for (i = 0; i < 1000; i++)
+ result += notInlineable2(i, false);
+ log("result: " + result);
+}
+
+function callNotInlineable2()
+{
+ var result = notInlineable2(10000, true);
+ if (result == 20003)
+ log("PASS: result is " + result);
+ else
+ log("FAIL: result is " + result + ", expecting 20003");
+}
+
+function debuggerStatement(x)
+{
+ log("In function with debugger statement");
+ debugger;
+ log("After debugger statement");
+ return x + 3;
+}
+
+function notInlineable3(x)
+{
+ var func = new Function("return x + 100;");
+ if (x == 1999)
+ breakpointBasic();
+ return x + 3;
+}
+
+var globalVal3 = 0;
+
+function dfgWithoutInline3()
+{
+ globalVal3 = 0;
+ var i;
+ var result = 0;
+ var localVal3 = 0;
+ for (i = 0; i < 2000; i++)
+ result += notInlineable3(i);
+ if (globalVal3)
+ result = globalVal3 + localVal3;
+ log("result: " + result);
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesdedicatedworkerjsfromrev188141trunkLayoutTestsinspectorprotocoldebuggerresourcesdedicatedworkerjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/resources/dedicated-worker.js (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/resources/dedicated-worker.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/dedicated-worker.js         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/dedicated-worker.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+var message_id = 1;
+onmessage = function(event) {
+ doWork();
+};
+
+function doWork() {
+ postMessage("Message #" + message_id++);
+ setTimeout(doWork, 50);
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesexceptionjsfromrev188141trunkLayoutTestsinspectorprotocoldebuggerresourcesexceptionjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/resources/exception.js (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/resources/exception.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/exception.js         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/exception.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+function exceptionBasic()
+{
+ ({}).a.b.c.d;
+}
+
+function exceptionDOM()
+{
+ document.body.appendChild(0);
+}
+
+function throwString()
+{
+ throw "exception string";
+}
+
+function throwParam(o)
+{
+ throw o;
+}
+
+function exceptionInHostFunction()
+{
+ [1].map(function(x) {
+ throw "exception in host function";
+ });
+}
+
+function catchNested(func, depth /* optionalArgsToFunc... */)
+{
+ if (depth > 1) {
+ var args = Array.prototype.slice.call(arguments, 0);
+ --args[1];
+ catchNested.apply(this, args);
+ } else {
+ try {
+ func.apply(this, Array.prototype.slice.call(arguments, 2));
+ } catch (e) {
+ console.log("catchNested caught exception: " + JSON.stringify(e));
+ }
+ }
+}
+
+function noException()
+{
+ return "no exception";
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesmaclinebreaksjsfromrev188141trunkLayoutTestsinspectorprotocoldebuggerresourcesmaclinebreaksjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/resources/mac-linebreaks.js (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/resources/mac-linebreaks.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/mac-linebreaks.js         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/mac-linebreaks.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+// test one+// +// test two++function boo()+{+ // test three test four+}++// test no newline
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesmixedlinebreaksjsfromrev188141trunkLayoutTestsinspectorprotocoldebuggerresourcesmixedlinebreaksjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/resources/mixed-linebreaks.js (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/resources/mixed-linebreaks.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/mixed-linebreaks.js         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/mixed-linebreaks.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+// test one
+
+// test two+
+function baz()
+{
+ // test three test four
+}
+
+// test no newline
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesscriptforbreakpointactionsjsfromrev188141trunkLayoutTestsinspectordebuggerresourcesbreakpointjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js (from rev 188141, trunk/LayoutTests/inspector/debugger/resources/breakpoint.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+function breakpointActions(a, b)
+{
+ // Only preserve this message on the current test page load.
+ InspectorTestProxy.addResult("inside breakpointActions a:(" + a + ") b:(" + b + ")");
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesunixlinebreaksjsfromrev188141trunkLayoutTestsinspectorprotocoldebuggerresourcesunixlinebreaksjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/resources/unix-linebreaks.js (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/resources/unix-linebreaks.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/unix-linebreaks.js         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/unix-linebreaks.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+// test one
+//
+// test two
+
+function bar()
+{
+ // test three test four
+}
+
+// test no newline
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourceswindowslinebreaksjsfromrev188141trunkLayoutTestsinspectorprotocoldebuggerresourceswindowslinebreaksjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/resources/windows-linebreaks.js (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/resources/windows-linebreaks.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/windows-linebreaks.js         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/resources/windows-linebreaks.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+// test one
+//
+// test two
+
+function foo()
+{
+ // test three test four
+}
+
+// test no newline
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersearchInContentlinebreaksexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersearchInContentlinebreaksexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/searchInContent-linebreaks-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/searchInContent-linebreaks-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/searchInContent-linebreaks-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/searchInContent-linebreaks-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+Verify that Debugger.searchInContent works with scripts that have varying line endings.
+Scripts searched: 4
+
+Script: mac-linebreaks.js
+Results found: 4
+Line 0: "// test one\r"
+Line 2: "// test two\r"
+Line 6: " // test three test four\r"
+Line 9: "// test no newline"
+
+Script: mixed-linebreaks.js
+Results found: 4
+Line 0: "// test one\n"
+Line 2: "// test two\r"
+Line 6: " // test three test four\r\n"
+Line 9: "// test no newline"
+
+Script: unix-linebreaks.js
+Results found: 4
+Line 0: "// test one\n"
+Line 2: "// test two\n"
+Line 6: " // test three test four\n"
+Line 9: "// test no newline"
+
+Script: windows-linebreaks.js
+Results found: 4
+Line 0: "// test one\r\n"
+Line 2: "// test two\r\n"
+Line 6: " // test three test four\r\n"
+Line 9: "// test no newline"
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersearchInContentlinebreakshtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersearchInContentlinebreakshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/searchInContent-linebreaks.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/searchInContent-linebreaks.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/searchInContent-linebreaks.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/searchInContent-linebreaks.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/mixed-linebreaks.js"></script>
+<script src="resources/unix-linebreaks.js"></script>
+<script src="resources/mac-linebreaks.js"></script>
+<script src="resources/windows-linebreaks.js"></script>
+<script>
+function test()
+{
+ const expectedSearchCount = 4;
+ var completedSearchCount = 0;
+
+ var testResults = [];
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/-linebreaks\.js$/.test(messageObject.params.url)) {
+ InspectorTest.sendCommand("Debugger.searchInContent", {"scriptId": messageObject.params.scriptId, "query": "test"}, function(url, messageObject) {
+ var results = messageObject.result.result;
+
+ var testResult = {url: url, count: results.length, matches: []};
+ for (var result of results)
+ testResult.matches.push(result);
+
+ testResults.push(testResult);
+
+ if (++completedSearchCount >= expectedSearchCount)
+ outputResults();
+ }.bind(null, messageObject.params.url));
+ }
+ }
+
+ function outputResults()
+ {
+ function compareResultURLs(a, b)
+ {
+ return a.url.localeCompare(b.url);
+ }
+
+ var sortedTestResults = testResults.sort(compareResultURLs);
+
+ InspectorTest.log("Scripts searched: " + sortedTestResults.length);
+ InspectorTest.log("");
+
+ for (var testResult of sortedTestResults) {
+ var fileName = /([\w-]+\.js)$/.exec(testResult.url)[1];
+ InspectorTest.log("Script: " + fileName);
+ InspectorTest.log("Results found: " + testResult.count);
+
+ for (var match of testResult.matches)
+ InspectorTest.log("Line " + match.lineNumber + ": " + JSON.stringify(match.lineContent));
+
+ InspectorTest.log("");
+ }
+
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+Verify that Debugger.searchInContent works with scripts that have varying line endings.
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointactionsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointactionsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-actions-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-actions-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-actions-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-actions-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+CONSOLE MESSAGE: line 19: log-action-before
+CONSOLE MESSAGE: line 1: eval-action
+CONSOLE MESSAGE: line 19: log-action-after
+CONSOLE MESSAGE: line 19: log-action-before
+CONSOLE MESSAGE: line 1: eval-action
+CONSOLE MESSAGE: line 19: log-action-after
+Debugger.setBreakpoint options.actions
+
+Found breakpoint.js
+Running breakpointActions a few times that should not trigger
+inside breakpointActions a:(1) b:(undefined)
+inside breakpointActions a:(2) b:(12)
+inside breakpointActions a:(2) b:([object Object])
+Running breakpointActions to triggering the breakpoint actions
+inside breakpointActions a:(12) b:([object Object])
+PASS: Console Message: {"source":"javascript","level":"log","text":"log-action-before","location":"breakpoint.js:19:2"}
+PASS: Breakpoint Sound
+PASS: Console Message: {"source":"console-api","level":"log","text":"eval-action","location":"???:1:26","parameters":[{"type":"string"},{"type":"number"},{"type":"object"}]}
+PASS: Console Message: {"source":"javascript","level":"log","text":"log-action-after","location":"breakpoint.js:19:2"}
+PASS: Probe sample payload: {"type":"number","value":12,"description":"12"}
+inside breakpointActions a:(100) b:([object HTMLBodyElement])
+PASS: Console Message: {"source":"javascript","level":"log","text":"log-action-before","location":"breakpoint.js:19:2"}
+PASS: Breakpoint Sound
+PASS: Console Message: {"source":"console-api","level":"log","text":"eval-action","location":"???:1:26","parameters":[{"type":"string"},{"type":"number"},{"type":"object","subtype":"node"}]}
+PASS: Console Message: {"source":"javascript","level":"log","text":"log-action-after","location":"breakpoint.js:19:2"}
+PASS: Probe sample payload: {"type":"number","value":100,"description":"100"}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointactionshtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointactionshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-actions.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-actions.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-actions.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-actions.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,128 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.importScript("console-test.js");
+ InspectorTest.importScript("probe-test.js");
+
+ InspectorTest.sendCommand("Console.enable", {});
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var isExpectingLogs = false;
+ var isExpectingSounds = false;
+ var isExpectingSamples = false;
+ var logCount = 0;
+ var soundCount = 0;
+ var sampleCount = 0;
+ const expectedLogCount = 6;
+ const expectedSoundCount = 2;
+ const expectedSampleCount = 2;
+
+ function receivedAllExpectedOutput() {
+ return logCount === expectedLogCount && sampleCount === expectedSampleCount && soundCount === expectedSoundCount;
+ }
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var location = {scriptId: scriptIdentifier, lineNumber: 18, columnNumber: 0};
+ var options = {
+ condition: "a > 10",
+ autoContinue: true,
+ actions: [
+ {"type": "log", "data": "log-action-before"},
+ {"type": "sound"},
+ {"type": "evaluate", "data": "(function() { console.log('eval-action', a, b); })()"},
+ {"type": "log", "data": "log-action-after"},
+ {"type": "probe", "data": "a"}
+ ]
+ };
+
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ breakpointIdentifier = responseObject.result.breakpointId;
+ InspectorTest.log("Running breakpointActions a few times that should not trigger");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(1)"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(2, 12)"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(2, {x:1,y:2})"}, function() {
+ isExpectingLogs = true;
+ isExpectingSounds = true;
+ isExpectingSamples = true;
+ InspectorTest.log("Running breakpointActions to triggering the breakpoint actions");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(12, {x:1,y:2})"}, function() {
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(100, document.body)"});
+ });
+ });
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+
+ InspectorTest.log("FAIL: should not have hit breakpoint, autoContinue was true");
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.eventHandler["Debugger.playBreakpointActionSound"] = function(messageObject)
+ {
+ if (!isExpectingSounds) {
+ InspectorTest.log("FAIL: unexpected breakpoint sound.");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ InspectorTest.log("PASS: Breakpoint Sound");
+
+ ++soundCount;
+
+ if (receivedAllExpectedOutput())
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.eventHandler["Debugger.didSampleProbe"] = function(messageObject)
+ {
+ if (!isExpectingSamples) {
+ InspectorTest.log("FAIL: unexpected probe sample, probe samples should only have come from breakpoint actions.");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ var simplifiedSample = ProbeHelper.simplifiedProbeSample(messageObject);
+ InspectorTest.log("PASS: Probe sample payload: " + JSON.stringify(simplifiedSample.payload));
+
+ ++sampleCount;
+
+ if (receivedAllExpectedOutput())
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.eventHandler["Console.messageAdded"] = function(messageObject)
+ {
+ if (!isExpectingLogs) {
+ InspectorTest.log("FAIL: unexpected log, logs should only have come from breakpoint actions.");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ var message = InspectorTest.Console.sanitizeConsoleMessage(messageObject);
+ InspectorTest.log("PASS: Console Message: " + JSON.stringify(message));
+
+ ++logCount;
+
+ if (receivedAllExpectedOutput())
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpoint options.actions</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointautoContinueexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointautoContinueexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-autoContinue-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-autoContinue-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-autoContinue-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Debugger.setBreakpoint options.autoContinue
+
+Found breakpoint.js
+Running breakpointAutomaticallyContinue multiple times with automatically continue
+inside breakpointAutomaticallyContinue
+inside breakpointAutomaticallyContinue
+inside breakpointAutomaticallyContinue
+Removing breakpoint
+Setting new breakpoint without autoContinue that should trigger
+inside breakpointAutomaticallyContinue
+Hit Breakpoint!
+PASS: hit breakpoint when allowed.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointautoContinuehtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointautoContinuehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-autoContinue.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-autoContinue.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-autoContinue.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-autoContinue.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var allowedToHitBreakpoint = false;
+ var breakpointIdentifier = null;
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var location = {scriptId: scriptIdentifier, lineNumber: 13, columnNumber: 0};
+ var options = {autoContinue: true};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ breakpointIdentifier = responseObject.result.breakpointId;
+ InspectorTest.log("Running breakpointAutomaticallyContinue multiple times with automatically continue");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointAutomaticallyContinue()"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointAutomaticallyContinue()"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointAutomaticallyContinue()"}, function() {
+ InspectorTest.log("Removing breakpoint");
+ InspectorTest.sendCommand("Debugger.removeBreakpoint", {"breakpointId": breakpointIdentifier}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ allowedToHitBreakpoint = true;
+ options = {autoContinue: false};
+ InspectorTest.log("Setting new breakpoint without autoContinue that should trigger");
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointAutomaticallyContinue()"});
+ });
+ });
+ });
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+
+ if (!allowedToHitBreakpoint) {
+ InspectorTest.log("FAIL: should not have hit breakpoint.");
+ InspectorTest.completeTest();
+ } else {
+ InspectorTest.log("PASS: hit breakpoint when allowed.");
+ InspectorTest.completeTest();
+ }
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpoint options.autoContinue</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointcolumnexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointcolumnexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-column-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-column-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-column-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-column-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+Debugger.setBreakpoint on line:column in <script>
+
+Found <script>
+Running testFunction
+Hit Breakpoint!
+Evaluted value of `a` (expecting number 1) was: {"type":"number","value":1,"description":"1"}
+Evaluted value of `b` (expecting undefined) was: {"type":"undefined"}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointcolumnhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointcolumnhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-column.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-column.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-column.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-column.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test setting a breakpoint on line:column in the <script> below.
+ // We set a breakpoint before evaluating `var b = ...`, and verify that
+ // by running some expressions at that call frame.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/setBreakpoint-column\.html$/.test(messageObject.params.url) && messageObject.params.startLine > 10) {
+ InspectorTest.log("Found <script>");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var lineNumber = messageObject.params.startLine + 2;
+ var columnNumber = 10;
+ var location = {scriptId: scriptIdentifier, lineNumber: lineNumber, columnNumber: columnNumber};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function() {
+ InspectorTest.log("Running testFunction");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "testFunction()"});
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ var callFrameIdentifier = messageObject.params.callFrames[0].callFrameId;
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", {callFrameId: callFrameIdentifier, expression: "a"}, function(messageObject) {
+ InspectorTest.log("Evaluted value of `a` (expecting number 1) was: " + JSON.stringify(messageObject.result.result));
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", {callFrameId: callFrameIdentifier, expression: "b"}, function(messageObject) {
+ InspectorTest.log("Evaluted value of `b` (expecting undefined) was: " + JSON.stringify(messageObject.result.result));
+ InspectorTest.completeTest();
+ });
+ });
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger.setBreakpoint on line:column in &lt;script&gt;</p>
+<script>// Line 0
+function testFunction() {// Line 1
+var a = 1;var b = a + 1;// Line 2
+}// Line 3
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointcolumntxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointcolumntxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-column.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-column.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-column.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-column.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Breakpoints Enabled
+Found <script>
+Running testFunction
+Hit Breakpoint!
+Evaluted value of `a` (expecting number 1) was: {"type":"number","value":1,"description":"1"}
+Evaluted value of `b` (expecting undefined) was: {"type":"undefined"}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointconditionexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointconditionexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-condition-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-condition-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-condition-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-condition-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Debugger.setBreakpoint options.condition
+
+Found breakpoint.js
+Running breakpointWithCondition multiple times
+inside breakpointWithCondition a:(1) b:(2) a+b:(3)
+inside breakpointWithCondition a:(5) b:(5) a+b:(10)
+inside breakpointWithCondition a:(7) b:(4) a+b:(11)
+Hit Breakpoint!
+Evaluted value of `a` (expecting number 7) was: {"type":"number","value":7,"description":"7"}
+Evaluted value of `b` (expecting number 4) was: {"type":"number","value":4,"description":"4"}
+Resumed, running breakpointWithCondition multiple times again
+inside breakpointWithCondition a:(9) b:(0) a+b:(9)
+inside breakpointWithCondition a:(12) b:(-4) a+b:(8)
+inside breakpointWithCondition a:(4) b:(7) a+b:(11)
+Hit Breakpoint!
+Evaluted value of `a` (expecting number 4) was: {"type":"number","value":4,"description":"4"}
+Evaluted value of `b` (expecting number 7) was: {"type":"number","value":7,"description":"7"}
+PASS: hit breakpoints with expected values
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointconditionhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointconditionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-condition.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-condition.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-condition.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-condition.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var inBreakpoint = false;
+ var breakpointTriggered = 0;
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var location = {scriptId: scriptIdentifier, lineNumber: 8, columnNumber: 0};
+ var options = {condition: "(a + b) > 10"};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Running breakpointWithCondition multiple times");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(1, 2)"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(5, 5)"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(7, 4)"});
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ inBreakpoint = true;
+ ++breakpointTriggered;
+
+ var callFrameIdentifier = messageObject.params.callFrames[0].callFrameId;
+ if (breakpointTriggered === 1) {
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", {callFrameId: callFrameIdentifier, expression: "a"}, function(messageObject) {
+ InspectorTest.log("Evaluted value of `a` (expecting number 7) was: " + JSON.stringify(messageObject.result.result));
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", {callFrameId: callFrameIdentifier, expression: "b"}, function(messageObject) {
+ InspectorTest.log("Evaluted value of `b` (expecting number 4) was: " + JSON.stringify(messageObject.result.result));
+ InspectorTest.sendCommand("Debugger.resume", {});
+ });
+ });
+ } else if (breakpointTriggered === 2) {
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", {callFrameId: callFrameIdentifier, expression: "a"}, function(messageObject) {
+ InspectorTest.log("Evaluted value of `a` (expecting number 4) was: " + JSON.stringify(messageObject.result.result));
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", {callFrameId: callFrameIdentifier, expression: "b"}, function(messageObject) {
+ InspectorTest.log("Evaluted value of `b` (expecting number 7) was: " + JSON.stringify(messageObject.result.result));
+ InspectorTest.log("PASS: hit breakpoints with expected values");
+ InspectorTest.completeTest();
+ });
+ });
+ } else {
+ InspectorTest.log("FAIL: hit too many breakpoints.");
+ InspectorTest.completeTest();
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.resumed"] = function(messageObject)
+ {
+ InspectorTest.log("Resumed, running breakpointWithCondition multiple times again");
+ inBreakpoint = false;
+
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(9, 0)"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(12, -4)"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(4, 7)"}, function() {
+ setTimeout(function() {
+ if (!inBreakpoint) {
+ InspectorTest.log("FAIL: Did not hit conditional breakpoint the second time");
+ InspectorTest.completeTest();
+ }
+ }, 100);
+ });
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpoint options.condition</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointdfgandmodifylocalexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointdfgandmodifylocalexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-and-modify-local-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-and-modify-local-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-and-modify-local-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Debugger.evaluateOnCallFrame in a DFG compiled functions.
+
+Found breakpoint.js
+result: 502500
+dfg function warmed up
+
+Breakpoint set in breakpointBasic()
+Hit Breakpoint!
+Evaluating in DFG frame at frame[1]: 'x = 20000;'
+Resumed from breakpoint
+inside breakpointBasic
+PASS: result is 20003
+Test complete
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointdfgandmodifylocalhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointdfgandmodifylocalhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-and-modify-local.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-and-modify-local.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-and-modify-local.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test setting 2 breakpoints in DFG compiled functions: one inlined,
+ // and one not inlined.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var breakpointId = null;
+ var scriptId = 0;
+ var startLine = 0;
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ scriptId = messageObject.params.scriptId;
+ startLine = messageObject.params.startLine;
+
+ InspectorTest.sendCommand("Runtime.evaluate", {
+ expression: "dfgWithoutInline2();"
+ }, function(responseObject) {
+ InspectorTest.log("dfg function warmed up\n");
+
+ var location1 = {scriptId: scriptId, lineNumber: 2, columnNumber: 0};
+
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location1}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Breakpoint set in breakpointBasic()");
+
+ breakpointId = responseObject.result.breakpointId;
+ InspectorTest.sendCommand("Runtime.evaluate", {
+ expression: "callNotInlineable2();"
+ }, function(responseObject) {
+ InspectorTest.log("Test complete");
+ InspectorTest.completeTest();
+ });
+ });
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ var callFrames = messageObject.params.callFrames;
+ if (callFrames.length < 3)
+ InspectorTest.log("FAIL: too few frames in stack trace");
+
+ var callFrameId = callFrames[1].callFrameId;
+ InspectorTest.log("Evaluating in DFG frame at frame[1]: 'x = 20000;'");
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", { callFrameId: callFrameId, expression: "x = 20000;" }, function(responseObject) {
+ InspectorTest.sendCommand("Debugger.resume", {}, function(responseObject) {
+ InspectorTest.log("Resumed from breakpoint");
+ });
+ });
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger.evaluateOnCallFrame in a DFG compiled functions.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointdfgcalleeandexaminedfglocalexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointdfgcalleeandexaminedfglocalexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Debugger.evaluateOnCallFrame in a DFG compiled function from a breakpoint in a non-DFG callee.
+
+Found breakpoint.js
+inside breakpointBasic
+result: 2005000
+dfg function warmed up
+
+Breakpoint set in breakpointBasic()
+Hit Breakpoint!
+Evaluating in DFG frame at frame[2]: 'globalVal3 = 30;'
+Response value is 30
+Evaluating in DFG frame at frame[2]: 'localVal3 = 12;'
+Response value is 12
+Evaluating in DFG frame at frame[2]: 'localVal3'
+Response value is 12
+Resumed from breakpoint
+inside breakpointBasic
+result: 42
+Test complete
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointdfgcalleeandexaminedfglocalhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointdfgcalleeandexaminedfglocalhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,113 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test setting a breakpoints in DFG compiled functions callee and then modify
+ // and examine a global and local via the DFG frame.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var breakpointId = null;
+ var scriptId = 0;
+ var startLine = 0;
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ scriptId = messageObject.params.scriptId;
+ startLine = messageObject.params.startLine;
+
+ InspectorTest.sendCommand("Runtime.evaluate", {
+ expression: "dfgWithoutInline3();"
+ }, function(responseObject) {
+ InspectorTest.log("dfg function warmed up\n");
+
+ var location1 = {scriptId: scriptId, lineNumber: 2, columnNumber: 0};
+
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location1}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Breakpoint set in breakpointBasic()");
+
+ breakpointId = responseObject.result.breakpointId;
+ InspectorTest.sendCommand("Runtime.evaluate", {
+ expression: "dfgWithoutInline3();"
+ }, function(responseObject) {
+ InspectorTest.log("Test complete");
+ InspectorTest.completeTest();
+ });
+ });
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ function dumpResponse(response)
+ {
+ try {
+ if (response.result.wasThrown) {
+ InspectorTest.log("Exception thrown processing request");
+ return false;
+ }
+ InspectorTest.log("Response value is " + response.result.result.value);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ function resumeFromBreakpoint()
+ {
+ InspectorTest.sendCommand("Debugger.resume", {}, function(responseObject) {
+ InspectorTest.log("Resumed from breakpoint");
+ });
+ }
+
+ InspectorTest.log("Hit Breakpoint!");
+ var callFrames = messageObject.params.callFrames;
+ if (callFrames.length < 3) {
+ InspectorTest.log("FAIL: too few frames in stack trace");
+ resumeFromBreakpoint();
+ return;
+ }
+ var callFrameId = callFrames[2].callFrameId;
+ InspectorTest.log("Evaluating in DFG frame at frame[2]: 'globalVal3 = 30;'");
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", { callFrameId: callFrameId, expression: "globalVal3 = 30;" }, function(responseObject) {
+ if (!dumpResponse(responseObject)) {
+ resumeFromBreakpoint();
+ return;
+ }
+ InspectorTest.log("Evaluating in DFG frame at frame[2]: 'localVal3 = 12;'");
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", { callFrameId: callFrameId, expression: "localVal3 = 12;" }, function(responseObject) {
+ if (!dumpResponse(responseObject)) {
+ resumeFromBreakpoint();
+ return;
+ }
+ InspectorTest.log("Evaluating in DFG frame at frame[2]: 'localVal3'");
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", { callFrameId: callFrameId, expression: "localVal3" }, function(responseObject) {
+ if (!dumpResponse(responseObject)) {
+ resumeFromBreakpoint();
+ return;
+ }
+ InspectorTest.sendCommand("Debugger.resume", {}, function(responseObject) {
+ InspectorTest.log("Resumed from breakpoint");
+ });
+ });
+ });
+ });
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger.evaluateOnCallFrame in a DFG compiled function from a breakpoint in a non-DFG callee.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointdfgexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointdfgexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+Debugger.setBreakpoint in DFG compiled functions.
+
+Found breakpoint.js
+dfgWithoutInline result: 502500
+dfgWithInline result: 504500
+dfg functions warmed up
+
+Breakpoint set in notInlineable()
+Breakpoint set in inlineable()
+
+Hit Breakpoint 1!
+Removed Breakpoint 1!
+dfgWithoutInline result: 502500
+Hit Breakpoint 2!
+Removed Breakpoint 2!
+PASS
+dfgWithInline result: 504500
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointdfghtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointdfghtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-dfg.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-dfg.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+
+<script>
+// Put this here instead of on <body onload> to prevent an extra Debugger.scriptParsed event.
+window.onload = runTest;
+
+function test()
+{
+ // This test setting 2 breakpoints in DFG compiled functions: one inlined,
+ // and one not inlined.
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var dfgNonInlinedBreakpointId = null;
+ var dfgInlinedBreakpointId = null;
+ var scriptIdentifier = 0;
+ var startLine = 0;
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ scriptIdentifier = messageObject.params.scriptId;
+ startLine = messageObject.params.startLine;
+
+ InspectorTest.sendCommand("Runtime.evaluate", {
+ expression: "dfgWithoutInline(); dfgWithInline();"
+ }, function(responseObject) {
+ InspectorTest.log("dfg functions warmed up\n");
+
+ var location1 = {scriptId: scriptIdentifier, lineNumber: 22, columnNumber: 0};
+
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location1}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Breakpoint set in notInlineable()");
+
+ dfgNonInlinedBreakpointId = responseObject.result.breakpointId;
+ var location2 = {scriptId: scriptIdentifier, lineNumber: 28, columnNumber: 0};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location2}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Breakpoint set in inlineable()\n");
+
+ dfgInlinedBreakpointId = responseObject.result.breakpointId;
+ InspectorTest.sendCommand("Runtime.evaluate", {
+ expression: "dfgWithoutInline(); dfgWithInline();"
+ });
+ });
+ });
+ });
+ }
+ }
+
+ var breakpointsHit = 0;
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ var breakpointId = null;
+ breakpointsHit++;
+ InspectorTest.log("Hit Breakpoint " + breakpointsHit + "!");
+ if (breakpointsHit == 1)
+ breakpointId = dfgNonInlinedBreakpointId;
+ else if (breakpointsHit == 2)
+ breakpointId = dfgInlinedBreakpointId;
+ else
+ InspectorTest.log("Unexpected breakpoint");
+
+ InspectorTest.sendCommand("Debugger.removeBreakpoint", {"breakpointId": breakpointId}, function(responseObject) {
+ InspectorTest.log("Removed Breakpoint " + breakpointsHit + "!");
+ InspectorTest.sendCommand("Debugger.resume", {}, function(responseObject) {
+ if (breakpointsHit == 2) {
+ InspectorTest.log("PASS");
+ InspectorTest.completeTest();
+ }
+ });
+ });
+ }
+}
+</script>
+</head>
+<body>
+<p>Debugger.setBreakpoint in DFG compiled functions.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Debugger.setBreakpoint on line:0 in <script src="...">
+
+Found breakpoint.js
+PASS: Received error setting duplicate breakpoint: Breakpoint at specified location already exists.
+Running breakpointBasic
+inside breakpointBasic
+Hit Breakpoint!
+PASS
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointoptionsexceptionexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointoptionsexceptionexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'this.will.cause')
+CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'this.will.cause')
+Debugger.setBreakpoint options.condition or options.action with exception
+
+Found breakpoint.js
+Running breakpointWithCondition to trigger condition exception.
+inside breakpointWithCondition a:(1) b:(2) a+b:(3)
+PASS: Console Message: {"source":"javascript","level":"error","text":"TypeError: undefined is not an object (evaluating 'this.will.cause')","location":"undefined:1:10"}
+Running breakpointActions to trigger actions exception.
+inside breakpointActions a:(1) b:(2)
+PASS: Console Message: {"source":"javascript","level":"error","text":"TypeError: undefined is not an object (evaluating 'this.will.cause')","location":"undefined:1:10"}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointoptionsexceptionhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointoptionsexceptionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint-options-exception.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.importScript("console-test.js");
+
+ InspectorTest.sendCommand("Console.enable", {});
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ var logsSeen = 0;
+ const expectedLogs = 2;
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var location = {scriptId: scriptIdentifier, lineNumber: 8, columnNumber: 0};
+ var options = {condition: "this.will.cause.exception", autoContinue: true};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Running breakpointWithCondition to trigger condition exception.");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointWithCondition(1,2)"}, function() {
+ location = {scriptId: scriptIdentifier, lineNumber: 18, columnNumber: 0};
+ options = {actions: [{"type": "evaluate", "data": "this.will.cause.exception"}], autoContinue: true};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
+ InspectorTest.log("Running breakpointActions to trigger actions exception.");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointActions(1,2)"});
+ });
+ });
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+
+ InspectorTest.log("FAIL: should not have hit breakpoint, autoContinue was true");
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.eventHandler["Console.messageAdded"] = function(messageObject)
+ {
+ var message = InspectorTest.Console.sanitizeConsoleMessage(messageObject);
+ InspectorTest.log("PASS: Console Message: " + JSON.stringify(message));
+
+ if (++logsSeen === expectedLogs)
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpoint options.condition or options.action with exception</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpoint.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpoint.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found breakpoint.js");
+ var scriptIdentifier = messageObject.params.scriptId;
+ var location = {scriptId: scriptIdentifier, lineNumber: 3, columnNumber: 0};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function(responseObject) {
+ if (!responseObject.error) {
+ InspectorTest.log("FAIL: Expected error setting duplicate breakpoint");
+ InspectorTest.completeTest();
+ } else {
+ InspectorTest.log("PASS: Received error setting duplicate breakpoint: " + responseObject.error.message);
+ InspectorTest.log("Running breakpointBasic");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointBasic()"});
+ }
+ });
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ InspectorTest.log("PASS");
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpoint on line:0 in &lt;script src="..."&gt;</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointByUrlsourceURLexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointByUrlsourceURLexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpointByUrl-sourceURL-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpointByUrl-sourceURL-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpointByUrl-sourceURL-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+Debugger.setBreakpointByUrl in Script named via sourceURL
+
+Found sourceURL-test.js
+Running sourceURLFunction
+Hit Breakpoint!
+Evaluted value of `a` (expecting number 1) was: {"type":"number","value":1,"description":"1"}
+Evaluted value of `c` (expecting undefined) was: {"type":"undefined"}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointByUrlsourceURLhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetBreakpointByUrlsourceURLhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setBreakpointByUrl-sourceURL.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpointByUrl-sourceURL.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setBreakpointByUrl-sourceURL.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/breakpoint.js"></script>
+<script>
+// sourceURL-test.js:
+eval("function sourceURLFunction() {\n var a = 1;\n var b = 2;\n var c = a+b;\n}\n//# sourceURL=sourceURL-test.js")
+
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
+ {
+ if (/sourceURL-test\.js$/.test(messageObject.params.url)) {
+ InspectorTest.log("Found sourceURL-test.js");
+ var params = {url: messageObject.params.url, lineNumber: 3, columnNumber: 0};
+ InspectorTest.sendCommand("Debugger.setBreakpointByUrl", params, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Running sourceURLFunction");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "sourceURLFunction()"});
+ });
+ }
+ }
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Hit Breakpoint!");
+ var callFrameIdentifier = messageObject.params.callFrames[0].callFrameId;
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", {callFrameId: callFrameIdentifier, expression: "a"}, function(messageObject) {
+ InspectorTest.log("Evaluted value of `a` (expecting number 1) was: " + JSON.stringify(messageObject.result.result));
+ InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", {callFrameId: callFrameIdentifier, expression: "c"}, function(messageObject) {
+ InspectorTest.log("Evaluted value of `c` (expecting undefined) was: " + JSON.stringify(messageObject.result.result));
+ InspectorTest.completeTest();
+ });
+ });
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setBreakpointByUrl in Script named via sourceURL</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetPauseOnExceptionsallexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetPauseOnExceptionsallexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+CONSOLE MESSAGE: line 1: caught inline: {"line":1,"column":36}
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":3,"column":11,"sourceURL":"exception.js"}
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"name":"NotFoundError","message":"NotFoundError: DOM Exception 8","line":8,"column":30,"sourceURL":"exception.js"}
+CONSOLE MESSAGE: line 38: catchNested caught exception: "exception in host function"
+CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":1,"column":61}
+CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating '({}).a.b')
+CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
+CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 24: exception in host function
+CONSOLE MESSAGE: line 13: exception string
+CONSOLE MESSAGE: line 18: [object Object]
+CONSOLE MESSAGE: line 18: Error: error message
+Debugger.setPauseOnExceptions all
+
+Debugger.setPauseOnExceptions - all
+PASS - did not pause on non-exception statements
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+PASS - paused for each caught exception
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+PASS - paused for each uncaught exception
+PASS - did not pause on non-exception statements
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetPauseOnExceptionsallhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetPauseOnExceptionsallhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/exception.js"></script>
+<script>
+function test()
+{
+ var expectPause = true;
+
+ var statementsWithoutExceptions = [
+ "1+1;",
+ "noException();",
+ "catchNested(noException, 7);"
+ ];
+
+ var currentCaughtExceptionStatement = 0;
+ var statementsWithCaughtExceptions = [
+ "try{ ({}).a.b.c.d } catch (e) { console.log('caught inline: ' + JSON.stringify(e)); }",
+ "catchNested(exceptionBasic, 1);",
+ "catchNested(exceptionDOM, 2);",
+ "catchNested(exceptionInHostFunction, 3);",
+ "catchNested(throwString, 10);",
+ "catchNested(throwParam, 5, new Error('error message'));"
+ ];
+
+ var currentUncaughtExceptionStatement = 0;
+ var statementsWithUncaughtExceptions = [
+ "({}).a.b.c.d;",
+ "exceptionBasic();",
+ "exceptionDOM();",
+ "exceptionInHostFunction();",
+ "throwString();",
+ "throwParam({x:1});",
+ "throwParam(new Error('error message'));"
+ ];
+
+ var extraCaughtExceptionPauses = 0;
+ var extraUncaughtExceptionPauses = 0;
+
+ function evaluateStatements(list, callback)
+ {
+ for (var i = 0; i < list.length; ++i) {
+ var statement = list[i];
+ var last = i === list.length - 1;
+ var responseCallback = last ? function() { setTimeout(callback, 10); } : function(){};
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { " + statement + " }, 0);"}, responseCallback);
+ }
+ }
+
+ function evaluateExpectedNoPauses(callback)
+ {
+ var statements = statementsWithoutExceptions;
+ evaluateStatements(statements, function() {
+ InspectorTest.log("PASS - did not pause on non-exception statements");
+ callback();
+ });
+ }
+
+
+ var triggerNext = triggerNextCaughtException;
+
+ function triggerNextCaughtException()
+ {
+ // Evaluate statement and expect to pause.
+ if (currentCaughtExceptionStatement < statementsWithCaughtExceptions.length) {
+ var statement = statementsWithCaughtExceptions[currentCaughtExceptionStatement++];
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { " + statement + " }, 0);"});
+ return;
+ }
+
+ // FIXME: <https://webkit.org/b/121108> Web Inspector gets paused twice when there is an exception in host function
+ if (extraCaughtExceptionPauses-- > 0)
+ return;
+
+ // Done evaluating caught exceptions statements. Move on to uncaught exceptions.
+ InspectorTest.log("PASS - paused for each caught exception");
+ triggerNext = triggerNextUncaughtException;
+ triggerNext();
+ }
+
+ function triggerNextUncaughtException()
+ {
+ // Evaluate statement and expect to pause.
+ if (currentUncaughtExceptionStatement < statementsWithUncaughtExceptions.length) {
+ var statement = statementsWithUncaughtExceptions[currentUncaughtExceptionStatement++];
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { " + statement + " }, 0);"});
+ return;
+ }
+
+ // FIXME: <https://webkit.org/b/121108> Web Inspector gets paused twice when there is an exception in host function
+ if (extraUncaughtExceptionPauses-- > 0)
+ return;
+
+ // Done evaluating statements to pause. Evaluate some more we do not expect to pause.
+ InspectorTest.log("PASS - paused for each uncaught exception");
+ expectPause = false;
+ evaluateExpectedNoPauses(function() {
+ InspectorTest.completeTest();
+ });
+ }
+
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "all"}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Debugger.setPauseOnExceptions - all");
+ evaluateExpectedNoPauses(function() {
+ expectPause = true;
+ triggerNext();
+ });
+ });
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Paused!");
+
+ if (!expectPause) {
+ InspectorTest.log("FAIL - debugger paused when we did not expect to");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ InspectorTest.sendCommand("Debugger.resume", {});
+ }
+
+ InspectorTest.eventHandler["Debugger.resumed"] = function(messageObject)
+ {
+ InspectorTest.log("Resumed");
+ triggerNext();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setPauseOnExceptions all</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetPauseOnExceptionsnoneexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetPauseOnExceptionsnoneexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+CONSOLE MESSAGE: line 1: caught inline: {"line":1,"column":36}
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":3,"column":11,"sourceURL":"exception.js"}
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"name":"NotFoundError","message":"NotFoundError: DOM Exception 8","line":8,"column":30,"sourceURL":"exception.js"}
+CONSOLE MESSAGE: line 38: catchNested caught exception: "exception in host function"
+CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":1,"column":61}
+CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
+CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 24: exception in host function
+CONSOLE MESSAGE: line 13: exception string
+CONSOLE MESSAGE: line 18: [object Object]
+CONSOLE MESSAGE: line 18: Error: error message
+Debugger.setPauseOnExceptions none
+
+Debugger.setPauseOnExceptions - none
+PASS: No pauses
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetPauseOnExceptionsnonehtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetPauseOnExceptionsnonehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/exception.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Debugger.enable", {});
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "none"}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Debugger.setPauseOnExceptions - none");
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { 1+1; }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { noException(); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(noException, 7); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { try{ ({}).a.b.c.d } catch (e) { console.log('caught inline: ' + JSON.stringify(e)); } }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionBasic, 1); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionDOM, 2); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionInHostFunction, 3); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwString, 10); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwParam, 5, new Error('error message')); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { {}.a.b.c.d; }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionBasic(); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionDOM(); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionInHostFunction(); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwString(); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam({x:1}); }, 0);"});
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam(new Error('error message')); }, 0);"}, function() {
+ setTimeout(function() {
+ InspectorTest.log("PASS: No pauses");
+ InspectorTest.completeTest();
+ }, 10);
+ });
+ });
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Paused!");
+ InspectorTest.log("FAIL");
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setPauseOnExceptions none</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetPauseOnExceptionsuncaughtexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetPauseOnExceptionsuncaughtexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+CONSOLE MESSAGE: line 1: caught inline: {"line":1,"column":36}
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":3,"column":11,"sourceURL":"exception.js"}
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"name":"NotFoundError","message":"NotFoundError: DOM Exception 8","line":8,"column":30,"sourceURL":"exception.js"}
+CONSOLE MESSAGE: line 38: catchNested caught exception: "exception in host function"
+CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":1,"column":61}
+CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating '({}).a.b')
+CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
+CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 24: exception in host function
+CONSOLE MESSAGE: line 13: exception string
+CONSOLE MESSAGE: line 18: [object Object]
+CONSOLE MESSAGE: line 18: Error: error message
+CONSOLE MESSAGE: line 1: caught inline: {"line":1,"column":36}
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":3,"column":11,"sourceURL":"exception.js"}
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"name":"NotFoundError","message":"NotFoundError: DOM Exception 8","line":8,"column":30,"sourceURL":"exception.js"}
+CONSOLE MESSAGE: line 38: catchNested caught exception: "exception in host function"
+CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
+CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":1,"column":61}
+Debugger.setPauseOnExceptions uncaught
+
+Debugger.setPauseOnExceptions - uncaught
+PASS - did not pause on non-exception statements or caught exception statements
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+Paused!
+Resumed
+PASS - paused for each uncaught exception
+PASS - did not pause on non-exception statements or caught exception statements
+PASS
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetPauseOnExceptionsuncaughthtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetPauseOnExceptionsuncaughthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,115 @@
</span><ins>+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script src="resources/exception.js"></script>
+<script>
+function test()
+{
+ var expectPause = false;
+
+ var statementsWithoutExceptions = [
+ "1+1;",
+ "noException();",
+ "catchNested(noException, 7);"
+ ];
+
+ var statementsWithCaughtExceptions = [
+ "try{ ({}).a.b.c.d } catch (e) { console.log('caught inline: ' + JSON.stringify(e)); }",
+ "catchNested(exceptionBasic, 1);",
+ "catchNested(exceptionDOM, 2);",
+ "catchNested(exceptionInHostFunction, 3);",
+ "catchNested(throwString, 10);",
+ "catchNested(throwParam, 5, new Error('error message'));"
+ ];
+
+ var currentUncaughtExceptionStatement = 0;
+ var statementsWithUncaughtExceptions = [
+ "({}).a.b.c.d;",
+ "exceptionBasic();",
+ "exceptionDOM();",
+ "exceptionInHostFunction();",
+ "throwString();",
+ "throwParam({x:1});",
+ "throwParam(new Error('error message'));"
+ ];
+
+ // FIXME: <https://webkit.org/b/121108> Web Inspector gets paused twice when there is an exception in host function
+ var extraPauses = 0;
+
+ function evaluateStatements(list, callback)
+ {
+ for (var i = 0; i < list.length; ++i) {
+ var statement = list[i];
+ var last = i === list.length - 1;
+ var responseCallback = last ? function() { setTimeout(callback, 10); } : function(){};
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { " + statement + " }, 0);"}, responseCallback);
+ }
+ }
+
+ function evaluateExpectedNoPauses(callback)
+ {
+ var statements = statementsWithoutExceptions.concat(statementsWithCaughtExceptions);
+ evaluateStatements(statements, function() {
+ InspectorTest.log("PASS - did not pause on non-exception statements or caught exception statements");
+ callback();
+ });
+ }
+
+ function triggerNextUncaughtException()
+ {
+ // Evaluate statement and expect to pause.
+ if (currentUncaughtExceptionStatement < statementsWithUncaughtExceptions.length) {
+ var statement = statementsWithUncaughtExceptions[currentUncaughtExceptionStatement++];
+ InspectorTest.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { " + statement + " }, 0);"});
+ return;
+ }
+
+ // FIXME: <https://webkit.org/b/121108> Web Inspector gets paused twice when there is an exception in host function
+ if (extraPauses-- > 0)
+ return;
+
+ // Done evaluating statements to pause. Evaluate some more we do not expect to pause.
+ InspectorTest.log("PASS - paused for each uncaught exception");
+ expectPause = false;
+ evaluateExpectedNoPauses(function() {
+ InspectorTest.log("PASS");
+ InspectorTest.completeTest();
+ });
+ }
+
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+ InspectorTest.sendCommand("Debugger.setPauseOnExceptions", {state: "uncaught"}, function(responseObject) {
+ InspectorTest.checkForError(responseObject);
+ InspectorTest.log("Debugger.setPauseOnExceptions - uncaught");
+ evaluateExpectedNoPauses(function() {
+ expectPause = true;
+ triggerNextUncaughtException();
+ });
+ });
+
+ InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ {
+ InspectorTest.log("Paused!");
+
+ if (!expectPause) {
+ InspectorTest.log("FAIL - debugger paused when we did not expect to");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ InspectorTest.sendCommand("Debugger.resume", {});
+ }
+
+ InspectorTest.eventHandler["Debugger.resumed"] = function(messageObject)
+ {
+ InspectorTest.log("Resumed");
+ triggerNextUncaughtException();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Debugger.setPauseOnExceptions uncaught</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetVariableValueexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetVariableValueexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setVariableValue-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setVariableValue-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setVariableValue-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setVariableValue-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+Closure returns: {"type":"string","value":"ttttrue52013"}
+ (expected: 'ttttrue52013')
+Protocol command 'Debugger.setVariableValue' failed
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetVariableValuehtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggersetVariableValuehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/setVariableValue.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/setVariableValue.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setVariableValue.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/setVariableValue.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,180 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ // A general-purpose engine for sending a sequence of protocol commands.
+ // The clients provide requests and response handlers, while the engine catches
+ // errors and makes sure that once there's nothing to do completeTest() is called.
+ // @param step is an object with command, params and callback fields
+ function runRequestSeries(step) {
+ processStep(step);
+
+ function processStep(s) {
+ try {
+ processStepOrFail(s);
+ } catch (e) {
+ InspectorTest.log(e.stack);
+ InspectorTest.completeTest();
+ }
+ }
+
+ function processStepOrFail(s) {
+ if (!s) {
+ InspectorTest.completeTest();
+ return;
+ }
+ if (!s.command) {
+ // A simple loopback step.
+ var next = s.callback();
+ processStep(next);
+ return;
+ }
+
+ var innerCallback = function(response) {
+ var next;
+ if ("error" in response) {
+ if (!("errorHandler" in s)) {
+ // Error message is not logged intentionally, it may be platform-specific.
+ InspectorTest.log("Protocol command '" + s.command + "' failed");
+ InspectorTest.completeTest();
+ return;
+ }
+ try {
+ next = s.errorHandler(response.error);
+ } catch (e) {
+ InspectorTest.log(e.stack);
+ InspectorTest.completeTest();
+ return;
+ }
+ } else {
+ try {
+ next = s.callback(response.result);
+ } catch (e) {
+ InspectorTest.log(e.stack);
+ InspectorTest.completeTest();
+ return;
+ }
+ }
+ processStep(next);
+ }
+ InspectorTest.sendCommand(s.command, s.params, innerCallback);
+ }
+ }
+
+ var firstStep = { callback: enableDebugger };
+
+ runRequestSeries(firstStep);
+
+ function enableDebugger() {
+ return { command: "Debugger.enable", params: {}, callback: evalFunction };
+ }
+
+ // Testing function/closure scopes.
+
+ function evalFunction(response) {
+ var expression = "(function(p){var r=5;with({year:2013}){return function Closure(q){return p+q+r+year};}})('ttt')";
+ return { command: "Runtime.evaluate", params: {expression: expression}, callback: callbackEvalFunction };
+ }
+
+ function callbackEvalFunction(result) {
+ var id = result.result.objectId;
+ if (id === undefined)
+ throw new Error("objectId is expected");
+ return createCheckFunctionStepChain(id);
+ }
+
+ function createCheckFunctionStepChain(functionObjectId) {
+ var params = {
+ objectId: functionObjectId,
+ functionDeclaration: "function(){return this(true);}"
+ };
+ return {
+ command: "Runtime.callFunctionOn", params: params, callback: callbackLogClosureEval
+ };
+
+ function callbackLogClosureEval(result) {
+ InspectorTest.log("Closure returns: " + JSON.stringify(result.result));
+ InspectorTest.log(" (expected: 'ttttrue52013')");
+
+ var params = {
+ functionObjectId: functionObjectId,
+ scopeNumber: 1,
+ variableName: "r",
+ newValue: { value: 4 }
+ };
+ return {
+ command: "Debugger.setVariableValue", params: params, callback: setVariableCallback
+ };
+ }
+
+ function setVariableCallback() {
+ InspectorTest.log("Debugger.setVariableValue OK");
+
+ var params = {
+ objectId: functionObjectId,
+ functionDeclaration: "function(){return this(true);}"
+ };
+ return {
+ command: "Runtime.callFunctionOn", params: params, callback: callbackLogClosureEval2
+ };
+
+ }
+
+ function callbackLogClosureEval2(result) {
+ InspectorTest.log("Closure returns: " + JSON.stringify(result.result));
+ InspectorTest.log(" (expected: 'ttttrue42013')");
+
+ var params = {
+ // No target is specified
+ scopeNumber: 1,
+ variableName: "r",
+ newValue: { value: 4 }
+ };
+ return {
+ command: "Debugger.setVariableValue", params: params, errorHandler: setVariableErrorCallback3
+ };
+ }
+
+ function setVariableErrorCallback3(error) {
+ InspectorTest.log("Expected error: " + JSON.stringify(error));
+
+ var params = {
+ functionObjectId: functionObjectId,
+ scopeNumber: 100, // Wrong scope number
+ variableName: "r",
+ newValue: { value: 4 }
+ };
+ return {
+ command: "Debugger.setVariableValue", params: params, errorHandler: setVariableErrorCallback4
+ };
+ }
+
+ function setVariableErrorCallback4(error) {
+ InspectorTest.log("Expected error");
+
+ var params = {
+ functionObjectId: functionObjectId,
+ scopeNumber: 1,
+ variableName: "bad", // Wrong variable name
+ newValue: { value: 4 }
+ };
+ return {
+ command: "Debugger.setVariableValue", params: params, errorHandler: setVariableErrorCallback5
+ };
+ }
+
+ function setVariableErrorCallback5(error) {
+ InspectorTest.log("Expected error");
+
+ // End of test.
+ return;
+ }
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerterminatededicatedworkerwhilepausedexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldebuggerterminatededicatedworkerwhilepausedexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/terminate-dedicated-worker-while-paused-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/terminate-dedicated-worker-while-paused-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/terminate-dedicated-worker-while-paused-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/terminate-dedicated-worker-while-paused-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Test that inspected page won't crash if inspected worker is terminated while it is paused. Test passes if it doesn't crash.
+
+Bug 101065.
+Started worker
+Worker created
+didConnectToWorker
+Worker paused
+SUCCESS: Did terminate paused worker
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerterminatededicatedworkerwhilepausedhtmlfromrev188141trunkLayoutTestsinspectorprotocoldebuggerterminatededicatedworkerwhilepausedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/debugger/terminate-dedicated-worker-while-paused.html (from rev 188141, trunk/LayoutTests/inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/terminate-dedicated-worker-while-paused.html         (rev 0)
+++ trunk/LayoutTests/inspector/debugger/terminate-dedicated-worker-while-paused.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+var worker;
+function startWorkerAndRunTest()
+{
+ worker = new Worker("resources/dedicated-worker.js");
+ worker.onmessage = function(event) { };
+ worker.postMessage(1);
+ log("Started worker");
+ runTest();
+}
+
+function test()
+{
+ var workerId;
+ var workerRequestId = 1;
+ function sendCommandToWorker(method, params)
+ {
+ InspectorTest.sendCommand("Worker.sendMessageToWorker", {
+ "workerId": workerId,
+ "message": {
+ "method": method,
+ "params": params,
+ "id": workerRequestId++
+ }
+ });
+ }
+
+ InspectorTest.sendCommand("Worker.enable", {}, function(messageObject) {
+ if ("error" in messageObject) {
+ InspectorTest.log("FAIL: Couldn't enable worker debugger: " + messageObject.error.message);
+ InspectorTest.completeTest();
+ }
+ });
+
+ InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject)
+ {
+ workerId = messageObject["params"]["workerId"];
+ InspectorTest.log("Worker created");
+ InspectorTest.sendCommand("Worker.connectToWorker", {"workerId": workerId}, function(messageObject) {
+ InspectorTest.log("didConnectToWorker");
+ sendCommandToWorker("Debugger.enable", {});
+ sendCommandToWorker("Debugger.pause", {});
+ });
+ }
+
+ InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = function(messageObject)
+ {
+ var message = messageObject["params"]["message"];
+ if (message["method"] === "Debugger.paused") {
+ InspectorTest.log("Worker paused");
+ InspectorTest.sendCommand("Runtime.evaluate", {"expression": "worker.terminate()"}, function(messageObject) {
+ InspectorTest.log("SUCCESS: Did terminate paused worker");
+ InspectorTest.completeTest();
+ });
+ }
+ }
+}
+</script>
+</head>
+<body onLoad="startWorkerAndRunTest();">
+<p>Test that inspected page won't crash if inspected worker is terminated while it is paused. Test passes if it doesn't crash.</p>
+<a href="https://bugs.webkit.org/show_bug.cgi?id=101065">Bug 101065.</a>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomremoveeventsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomdomremoveeventsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/dom-remove-events-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/dom-remove-events-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-remove-events-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/dom-remove-events-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+Testing that DOM.childNodeRemoved is correctly triggered only when the element is actually going to be removed from the DOM.
+
+PASS: onChildNodeRemoved called for #target_element
+PASS: onChildNodeInserted called for parent node #final_container
+PASS: onChildNodeInserted called for child node #target_element
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomremoveeventshtmlfromrev188141trunkLayoutTestsinspectorprotocoldomdomremoveeventshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/dom-remove-events.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/dom-remove-events.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-remove-events.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/dom-remove-events.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,88 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function moveNode()
+{
+ var tergetElement = document.getElementById("target_element");
+ tergetElement.addEventListener("DOMNodeRemoved", function() {
+ tergetElement.removeEventListener("DOMNodeRemoved", arguments.callee);
+ document.getElementById("final_container").appendChild(this);
+ });
+ tergetElement.remove();
+}
+
+function test()
+{
+ var nodesById = {};
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = onSetChildNodes;
+ InspectorTest.eventHandler["DOM.childNodeRemoved"] = onChildNodeRemoved;
+ InspectorTest.eventHandler["DOM.childNodeInserted"] = onChildNodeInserted;
+
+ function createNodeAttributesMap(node)
+ {
+ var attributes = {};
+ for (var i = 0; i < node.attributes.length; i += 2)
+ attributes[node.attributes[i]] = node.attributes[i + 1];
+ return attributes;
+ }
+
+ function collectNode(node)
+ {
+ nodesById[node.nodeId] = createNodeAttributesMap(node);
+ }
+
+ function getNodeIdentifier(nodeId)
+ {
+ var node = nodesById[nodeId];
+ return node ? node.id : "<unknown node>";
+ }
+
+ function onSetChildNodes(response)
+ {
+ response.params.nodes.forEach(collectNode);
+ }
+
+ function onChildNodeRemoved(response)
+ {
+ var nodeId = response.params.nodeId;
+ InspectorTest.assert(getNodeIdentifier(nodeId) === "target_element", "onChildNodeRemoved called for #target_element");
+ delete nodesById[nodeId];
+ }
+
+ function onChildNodeInserted(response)
+ {
+ collectNode(response.params.node);
+ InspectorTest.assert(getNodeIdentifier(response.params.parentNodeId) === "final_container", "onChildNodeInserted called for parent node #final_container");
+ InspectorTest.assert(getNodeIdentifier(response.params.node.nodeId) === "target_element", "onChildNodeInserted called for child node #target_element");
+ }
+
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+ function onGotDocument(msg)
+ {
+ InspectorTest.checkForError(msg);
+ InspectorTest.sendCommand("DOM.querySelector", {"nodeId": msg.result.root.nodeId, "selector": "#final_container"}, onQuerySelector);
+ }
+
+ function onQuerySelector(response)
+ {
+ // Make sure we receive the children of the "#final_container" as they are added.
+ InspectorTest.sendCommand("DOM.requestChildNodes", {nodeId: response.result.nodeId});
+ InspectorTest.sendCommand("Runtime.evaluate", {"expression": "moveNode()"}, function() {
+ InspectorTest.completeTest();
+ });
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+
+<p>Testing that DOM.childNodeRemoved is correctly triggered only when the element is actually going to be removed from the DOM.</p>
+
+<div id="target_element"></div>
+<div id="final_container"></div>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchcrashexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomdomsearchcrashexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/dom-search-crash-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/dom-search-crash-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search-crash-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/dom-search-crash-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Tests that elements panel search is not crashing on documentElement-less cases.
+
+
+PASS: Test passes if it doesn't crash.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchcrashhtmlfromrev188141trunkLayoutTestsinspectorprotocoldomdomsearchcrashhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/dom-search-crash.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/dom-search-crash.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search-crash.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/dom-search-crash.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+ function onGotDocument(message) {
+ InspectorTest.checkForError(message);
+ InspectorTest.sendCommand("DOM.performSearch", {query: "FooBar"}, onSearchCompleted);
+ }
+
+ function onSearchCompleted(message)
+ {
+ InspectorTest.checkForError(message);
+ InspectorTest.log("PASS: Test passes if it doesn't crash.");
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body>
+<p>Tests that elements panel search is not crashing on documentElement-less cases.</p>
+<iframe src="resources/dom-search-crash-iframe.html" onload="runTest()"></iframe>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomdomsearchexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/dom-search-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/dom-search-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/dom-search-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+Testing DOM.performSearch with no parent node ids.
+
+
+=== Query: "body" ===
+Count: 2
+body.main-frame
+body.inside-iframe
+=== Query: "<body" ===
+Count: 2
+body.main-frame
+body.inside-iframe
+=== Query: "body>" ===
+Count: 2
+body.main-frame
+body.inside-iframe
+=== Query: "<body>" ===
+Count: 2
+body.main-frame
+body.inside-iframe
+=== Query: "<BODY>" ===
+Count: 2
+body.main-frame
+body.inside-iframe
+=== Query: "onload" ===
+Count: 1
+body.main-frame
+=== Query: "ONLOAD" ===
+Count: 1
+body.main-frame
+=== Query: "runTest()" ===
+Count: 1
+body.main-frame
+=== Query: "\"runTest()" ===
+Count: 1
+body.main-frame
+=== Query: "\"runTest()\"" ===
+Count: 1
+body.main-frame
+=== Query: "runTest()\"" ===
+Count: 1
+body.main-frame
+=== Query: "RUNTEST()" ===
+Count: 1
+body.main-frame
+=== Query: "runtest()" ===
+Count: 1
+body.main-frame
+=== Query: ".body-inside-iframe" ===
+Count: 0
+=== Query: "*" ===
+Count: 12
+html
+head
+script
+script
+body.main-frame
+p
+iframe
+html.inside-iframe
+head.inside-iframe
+body.inside-iframe
+div.base1.inside-iframe
+p.inside-iframe
+=== Query: "BODY[ONLOAD]" ===
+Count: 1
+body.main-frame
+=== Query: "/html/body" ===
+Count: 2
+body.main-frame
+body.inside-iframe
+=== Query: "/html/body/@onload" ===
+Count: 1
+body.main-frame
+=== Query: "/HTML/BODY" ===
+Count: 2
+body.main-frame
+body.inside-iframe
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchwithcontextexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomdomsearchwithcontextexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/dom-search-with-context-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/dom-search-with-context-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search-with-context-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/dom-search-with-context-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+Testing DOM.performSearch with parent node ids.
+
+
+=== Query: "p" in [] ===
+Count: 0
+=== Query: "p" in [.base1] ===
+Count: 1
+p.base1.main-frame
+=== Query: "p" in [.base2] ===
+Count: 1
+p.base2.main-frame
+=== Query: "p" in [.base1, .base2] ===
+Count: 2
+p.base1.main-frame
+p.base2.main-frame
+=== Query: "p" in [iframe] ===
+Count: 1
+p.inside-iframe
+=== Query: "//p" in [.base1] ===
+Count: 1
+p.base1.main-frame
+=== Query: "//div" in [.base1] ===
+Count: 1
+div.base1
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchwithcontexthtmlfromrev188141trunkLayoutTestsinspectorprotocoldomdomsearchwithcontexthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/dom-search-with-context.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/dom-search-with-context.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search-with-context.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/dom-search-with-context.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ // Create a DOM listener to convert nodeIds to tag names.
+ InspectorTest.importScript("../dom/resources/InspectorDOMListener.js");
+ var dom = createDOMListener();
+
+ // Caching the output to avoid searching through the log.
+ var output = [];
+ var documentId;
+ var domSearchQueries = [
+ {
+ query: "p",
+ nodes: []
+ },
+ {
+ query: "p",
+ nodes: [".base1"]
+ },
+ {
+ query: "p",
+ nodes: [".base2"]
+ },
+ {
+ query: "p",
+ nodes: [".base1", ".base2"]
+ },
+ {
+ query: "p",
+ nodes: ["iframe"]
+ },
+
+ // XPath should return just the children of the selected nodes.
+ {
+ query: "//p",
+ nodes: [".base1"]
+ },
+ {
+ query: "//div",
+ nodes: [".base1"]
+ }
+ ];
+
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+ function onGotDocument(message) {
+ InspectorTest.checkForError(message);
+ dom.collectNode(message.result.root);
+ documentId = message.result.root.nodeId;
+ performSearches(domSearchQueries, testFinished);
+ }
+
+ function performSearches(list, callback)
+ {
+ function next() {
+ if (list.length)
+ search(list.shift(), next);
+ else
+ callback();
+ }
+ next();
+ }
+
+ function search(queryData, callback)
+ {
+ resolveSelectors(queryData.nodes, function(nodeIds) {
+ output.push("=== Query: " + JSON.stringify(queryData.query) + " in [" + queryData.nodes.join(", ") + "] ===");
+ InspectorTest.sendCommand("DOM.performSearch", {query: queryData.query, nodeIds: nodeIds}, function(message) {
+ InspectorTest.checkForError(message);
+ printSearchResults(message.result, callback);
+ });
+ });
+ }
+
+ function resolveSelectors(nodes, callback)
+ {
+ var results = new Array(nodes.length);
+ var remaining = nodes.length;
+ if (!remaining)
+ return callback(results);
+ nodes.forEach(function(selector, index) {
+ InspectorTest.sendCommand("DOM.querySelector", {nodeId: documentId, selector: selector}, function(message) {
+ InspectorTest.checkForError(message);
+ results[index] = message.result.nodeId;
+ if (--remaining <= 0)
+ callback(results);
+ });
+ });
+ }
+
+ function printSearchResults(results, callback)
+ {
+ output.push("Count: " + results.resultCount);
+ if (!results.resultCount)
+ return callback();
+
+ var options = {"searchId": results.searchId, "fromIndex": 0, "toIndex": results.resultCount};
+ InspectorTest.sendCommand("DOM.getSearchResults", options, function(message) {
+ for (var nodeId of message.result.nodeIds)
+ output.push(dom.getNodeIdentifier(nodeId));
+ callback();
+ });
+ }
+
+ function testFinished()
+ {
+ InspectorTest.log(output.join("\n"));
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()" class="main-frame">
+ <p>Testing DOM.performSearch with parent node ids.</p>
+
+ <div class="base1">
+ <p class="base1 main-frame"></p>
+ </div>
+
+ <div class="base2">
+ <p class="base2 main-frame"></p>
+ </div>
+
+ <iframe src="resources/dom-search-iframe.html"></iframe>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchhtmlfromrev188141trunkLayoutTestsinspectorprotocoldomdomsearchhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/dom-search.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/dom-search.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/dom-search.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ // Loading the queries from external file to avoid having them show up in the results.
+ InspectorTest.importScript("../../../../inspector/dom/resources/dom-search-queries.js");
+
+ // Create a DOM listener to convert nodeIds to tag names.
+ InspectorTest.importScript("../dom/resources/InspectorDOMListener.js");
+ var dom = createDOMListener();
+
+ // Caching the output to avoid searching through the log.
+ var output = [];
+
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+ function onGotDocument(message) {
+ InspectorTest.checkForError(message);
+ dom.collectNode(message.result.root);
+ performSearches(domSearchQueries, testFinished);
+ }
+
+ function performSearches(list, callback)
+ {
+ function next() {
+ if (list.length)
+ search(list.shift(), next);
+ else
+ callback();
+ }
+ next();
+ }
+
+ function search(query, callback)
+ {
+ output.push("=== Query: " + JSON.stringify(query) + " ===");
+ InspectorTest.sendCommand("DOM.performSearch", {query: query}, function(message) {
+ InspectorTest.checkForError(message);
+ printSearchResults(message.result, callback);
+ });
+ }
+
+ function printSearchResults(results, callback)
+ {
+ output.push("Count: " + results.resultCount);
+ if (!results.resultCount)
+ return callback();
+
+ var options = {"searchId": results.searchId, "fromIndex": 0, "toIndex": results.resultCount};
+ InspectorTest.sendCommand("DOM.getSearchResults", options, function onResultsReceived(message) {
+ for (var nodeId of message.result.nodeIds)
+ output.push(dom.getNodeIdentifier(nodeId));
+ callback();
+ });
+ }
+
+ function testFinished()
+ {
+ InspectorTest.log(output.join("\n"));
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()" class="main-frame">
+ <p>Testing DOM.performSearch with no parent node ids.</p>
+ <iframe src="resources/dom-search-iframe.html"></iframe>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomfocusexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomfocusexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/focus-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/focus-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/focus-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/focus-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+focused
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomfocushtmlfromrev188141trunkLayoutTestsinspectorprotocoldomfocushtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/focus.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/focus.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/focus.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/focus.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+window.addEventListener("load", function() {
+ document.querySelector("#second").addEventListener("focus", function() {
+ log("focused");
+ });
+});
+
+function test()
+{
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+ function onGotDocument(msg) {
+ if (msg.error) {
+ InspectorTest.log(msg.error.message);
+ InspectorTest.completeTest();
+ return;
+ }
+ var node = msg.result.root;
+ InspectorTest.sendCommand("DOM.querySelector", { "nodeId": node.nodeId, "selector": "#second" }, onQuerySelector);
+ }
+
+ function onQuerySelector(msg) {
+ if (msg.error) {
+ InspectorTest.log(msg.error.message);
+ InspectorTest.completeTest();
+ return;
+ }
+ var node = msg.result;
+ InspectorTest.sendCommand("DOM.focus", { "nodeId": node.nodeId }, onFocus);
+ }
+
+ function onFocus(msg) {
+ if (msg.error)
+ InspectorTest.log(msg.error);
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<input></input>
+<input id="second"></input>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNodeexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNodeexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,531 @@
</span><ins>+Checking Web Inspector protocol for the Accessibility Node Inspector.
+
+#document
+ exists: true
+ label:
+ role:
+ childNodeIds.length: 43
+
+
+Total elements to be tested: 65.
+
+<div onclick="void(0);">click</div>
+ exists: true
+ label:
+ role:
+ childNodeIds.length: 1
+ mouseEventNodeId: exists
+ parentNodeId: exists
+
+<li role="treeitem" aria-expanded="undefined">expanded</li>
+ exists: true
+ label:
+ role: treeitem
+ childNodeIds.length: 1
+ parentNodeId: exists
+
+<li role="treeitem" aria-expanded="false" id="activedescendant" aria-selected="true">collapsed</li>
+ exists: true
+ label:
+ role: treeitem
+ childNodeIds.length: 1
+ expanded: false
+ parentNodeId: exists
+ selected: true
+
+<li role="treeitem" aria-expanded="true">expanded</li>
+ exists: true
+ label:
+ role: treeitem
+ childNodeIds.length: 1
+ expanded: true
+ parentNodeId: exists
+
+<ul role="tree" id="flowedTo1" aria-activedescendant="activedescendant">
+ <li role="treeitem" aria-expanded="true">expanded</li>
+ <li role="treeitem" aria-expanded="false" id="activedescendant" aria-selected="true">collapsed</li>
+ <li role="treeitem" aria-expanded="undefined">expanded</li>
+</ul>
+ exists: true
+ label:
+ role: tree
+ activeDescendantNodeId: exists
+ childNodeIds.length: 3
+ parentNodeId: exists
+ selectedChildNodeIds.length: 1
+
+<div role="option" aria-busy="true">busy (self)</div>
+ exists: true
+ label: busy (self)
+ role: option
+ busy: true
+ parentNodeId: exists
+
+<div role="option">busy (parent)</div>
+ exists: true
+ label: busy (parent)
+ role: option
+ busy: true
+ parentNodeId: exists
+
+<div role="listbox" aria-multiselectable="true">
+ <div role="option" aria-selected="true">selected</div>
+ <div role="option" aria-selected="false">not selected</div>
+ <div role="option" aria-selected="true">selected</div>
+</div>
+ exists: true
+ label:
+ role: listbox
+ childNodeIds.length: 3
+ parentNodeId: exists
+ required: false
+ selectedChildNodeIds.length: 2
+
+<div role="tab" aria-selected="false">not selected</div>
+ exists: true
+ label: not selected
+ role: tab
+ parentNodeId: exists
+
+<div role="tab" aria-selected="true">selected</div>
+ exists: true
+ label: selected
+ role: tab
+ parentNodeId: exists
+ selected: true
+
+<div role="tablist" aria-flowto="flowedTo1 invalidIdRef flowedTo2">
+ <div role="tab" aria-selected="true">selected</div>
+ <div role="tab" aria-selected="false">not selected</div>
+</div>
+ exists: true
+ label:
+ role: tablist
+ childNodeIds.length: 2
+ flowedNodeIds.length: 2
+ parentNodeId: exists
+
+<div role="option" aria-selected="false">not selected</div>
+ exists: true
+ label: not selected
+ role: option
+ parentNodeId: exists
+
+<div role="option" aria-selected="true">selected</div>
+ exists: true
+ label: selected
+ role: option
+ parentNodeId: exists
+ selected: true
+
+<div role="listbox" id="ownedlistbox">
+ <div role="option" aria-selected="true">selected</div>
+ <div role="option" aria-selected="false">not selected</div>
+</div>
+ exists: true
+ label:
+ role: listbox
+ childNodeIds.length: 2
+ parentNodeId: exists
+ required: false
+ selectedChildNodeIds.length: 1
+
+<input role="combobox" aria-owns="ownedlistbox invalidIdRef" aria-controls="ownedlistbox invalidIdRef">
+ exists: true
+ label:
+ role: combobox
+ controlledNodeIds.length: 1
+ expanded: false
+ focused: false
+ ownedNodeIds.length: 1
+ required: false
+
+<option>not selected</option>
+ exists: false
+ label:
+ role:
+
+<option selected="">FIXME: Selected is false. Expected true. http://webkit.org/b/129835</option>
+ exists: false
+ label:
+ role:
+
+<img src="data:image/gif..." alt="x" style="display:none;">
+ exists: false
+ label:
+ role:
+
+<img src="data:image/gif..." alt="x" aria-hidden="true">
+ exists: true
+ label: x
+ role: img
+ ignored: true
+ ignoredByDefault: true
+ hidden: true
+
+<img src="data:image/gif..." alt="x">
+ exists: true
+ label: x
+ role: img
+
+<img src="data:image/gif..." alt="">
+ exists: true
+ label:
+ role: img
+ ignored: true
+
+<img src="data:image/gif...">
+ exists: true
+ label:
+ role: img
+
+<img src="./404.gif">
+ exists: true
+ label:
+ role: img
+ ignored: true
+
+<input style="display:none;">
+ exists: false
+ label:
+ role:
+
+<input aria-hidden="true">
+ exists: true
+ label:
+ role:
+ focused: false
+ ignored: true
+ ignoredByDefault: true
+ hidden: true
+ required: false
+
+<div role="radio" aria-checked="false">unchecked</div>
+ exists: true
+ label: unchecked
+ role: radio
+ checked: false
+ parentNodeId: exists
+ required: false
+
+<div role="radio" aria-checked="mixed">unchecked [sic] mixed state will not be exposed on radios per ARIA spec.</div>
+ exists: true
+ label: unchecked [sic] mixed state will not be exposed on radios per ARIA spec.
+ role: radio
+ checked: false
+ parentNodeId: exists
+ required: false
+
+<div role="radio" aria-checked="true">checked</div>
+ exists: true
+ label: checked
+ role: radio
+ checked: true
+ parentNodeId: exists
+ required: false
+
+<div role="radio">unchecked (checked undefined evals to false on radio)</div>
+ exists: true
+ label: unchecked (checked undefined evals to false on radio)
+ role: radio
+ checked: false
+ parentNodeId: exists
+ required: false
+
+<input type="radio" checked="">
+ exists: true
+ label:
+ role: radio
+ checked: true
+ focused: false
+ required: false
+
+<input type="radio">
+ exists: true
+ label:
+ role: radio
+ checked: false
+ focused: false
+ required: false
+
+<div role="checkbox" aria-checked="false">unchecked</div>
+ exists: true
+ label: unchecked
+ role: checkbox
+ checked: false
+ parentNodeId: exists
+ required: false
+
+<div role="checkbox" aria-checked="mixed">mixed</div>
+ exists: true
+ label: mixed
+ role: checkbox
+ checked: mixed
+ parentNodeId: exists
+ required: false
+
+<div role="checkbox" aria-checked="true">checked</div>
+ exists: true
+ label: checked
+ role: checkbox
+ checked: true
+ parentNodeId: exists
+ required: false
+
+<div role="checkbox">unchecked (checked undefined evals to false on checkbox)</div>
+ exists: true
+ label: unchecked (checked undefined evals to false on checkbox)
+ role: checkbox
+ checked: false
+ parentNodeId: exists
+ required: false
+
+<input type="checkbox" checked="">
+ exists: true
+ label:
+ role: checkbox
+ checked: true
+ focused: false
+ required: false
+
+<input type="checkbox">
+ exists: true
+ label:
+ role: checkbox
+ checked: false
+ focused: false
+ required: false
+
+<div role="textbox" tabindex="0" aria-disabled="true">disabled</div>
+ exists: true
+ label:
+ role:
+ disabled: true
+ focused: false
+ parentNodeId: exists
+ readonly: true
+ required: false
+
+<input disabled="" value="disabled">
+ exists: true
+ label:
+ role:
+ childNodeIds.length: 1
+ disabled: true
+ required: false
+
+<div role="textbox" tabindex="0" aria-readonly="true">readonly</div>
+ exists: true
+ label:
+ role:
+ focused: false
+ parentNodeId: exists
+ readonly: true
+ required: false
+
+<input readonly="" value="readonly">
+ exists: true
+ label:
+ role:
+ childNodeIds.length: 1
+ focused: false
+ readonly: true
+ required: false
+
+<input aria-invalid="foo" value="fake value will eval to true">
+ exists: true
+ label:
+ role:
+ childNodeIds.length: 1
+ focused: false
+ invalid: true
+ required: false
+
+<input aria-invalid="spelling" value="invalid spelling">
+ exists: true
+ label:
+ role:
+ childNodeIds.length: 1
+ focused: false
+ invalid: spelling
+ required: false
+
+<input aria-required="true" value="required">
+ exists: true
+ label:
+ role:
+ childNodeIds.length: 1
+ focused: false
+ required: true
+
+<input required="">
+ exists: true
+ label:
+ role:
+ focused: false
+ required: true
+
+<input>
+ exists: true
+ label:
+ role:
+ focused: false
+ required: false
+
+<input type="button">
+ exists: true
+ label:
+ role: button
+ focused: false
+
+<button></button>
+ exists: true
+ label:
+ role: button
+ focused: false
+
+<div role="button" tabindex="0" aria-pressed="false">Not Pressed.</div>
+ exists: true
+ label: Not Pressed.
+ role:
+ focused: false
+ parentNodeId: exists
+ pressed: false
+ required: false
+
+<div role="button" tabindex="0" aria-pressed="true">Pressed.</div>
+ exists: true
+ label: Pressed.
+ role:
+ focused: false
+ parentNodeId: exists
+ pressed: true
+ required: false
+
+<div role="button" tabindex="0" aria-disabled="true">disabled</div>
+ exists: true
+ label: disabled
+ role: button
+ disabled: true
+ focused: false
+ parentNodeId: exists
+
+<div role="button" tabindex="0"></div>
+ exists: true
+ label:
+ role: button
+ focused: false
+ parentNodeId: exists
+
+<div role="group" aria-live="assertive" aria-atomic="true">assertive (and atomic)</div>
+ exists: true
+ label:
+ role: group
+ childNodeIds.length: 1
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+ parentNodeId: exists
+
+<div role="group" aria-live="polite">polite</div>
+ exists: true
+ label:
+ role: group
+ childNodeIds.length: 1
+ liveRegionAtomic: false
+ liveRegionRelevant: additions,text
+ liveRegionStatus: polite
+ parentNodeId: exists
+
+<div role="group" aria-live="off">off</div>
+ exists: true
+ label:
+ role: group
+ childNodeIds.length: 1
+ parentNodeId: exists
+
+<div role="listbox" aria-busy="true">
+ <!-- Despite having no required option children, this is valid because it is marked as busy. -->
+ <!-- For example, waiting for a script to load its contents. -->
+</div>
+ exists: true
+ label:
+ role: listbox
+ busy: true
+ parentNodeId: exists
+ required: false
+
+<span aria-hidden="true"></span>
+ exists: true
+ label:
+ role:
+ ignored: true
+ ignoredByDefault: true
+ hidden: true
+ parentNodeId: exists
+
+<span></span>
+ exists: true
+ label:
+ role:
+ ignored: true
+ ignoredByDefault: true
+ parentNodeId: exists
+
+<div aria-hidden="true"></div>
+ exists: true
+ label:
+ role:
+ ignored: true
+ ignoredByDefault: true
+ hidden: true
+ parentNodeId: exists
+
+<div></div>
+ exists: true
+ label:
+ role:
+ ignored: true
+ parentNodeId: exists
+
+<div role="presentation"><div></div></div>
+ exists: true
+ label:
+ role: presentation
+ ignored: true
+ parentNodeId: exists
+
+<div role="group">
+ <div>foo</div>
+ <span>
+ bar
+ <span role="button">baz</span>
+ </span>
+ <div></div>
+ <div></div>
+</div>
+ exists: true
+ label:
+ role: group
+ childNodeIds.length: 3
+ parentNodeId: exists
+
+<div><div></div></div>
+ exists: true
+ label:
+ role:
+ ignored: true
+ parentNodeId: exists
+
+<script style="display:block;"></script>
+ exists: true
+ label:
+ role: group
+ ignored: true
+ parentNodeId: exists
+
+<script></script>
+ exists: false
+ label:
+ role:
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNodehtmlfromrev188141trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNodehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,225 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+</head>
+<body onLoad="runTest()">
+
+<p>Checking Web Inspector protocol for the Accessibility Node Inspector.</p>
+
+<div id="examples">
+
+<script class="ex"></script>
+<script class="ex" style="display:block;"></script>
+
+<div class="ex"><div></div></div>
+
+<div role="group" class="ex">
+ <div>foo</div>
+ <span>
+ bar
+ <span role="button">baz</span>
+ </span>
+ <div></div>
+ <div></div>
+</div>
+
+<div class="ex" role="presentation"><div></div></div>
+<div class="ex"></div>
+<div class="ex" aria-hidden="true"></div>
+<span class="ex"></span>
+<span class="ex" aria-hidden="true"></span>
+
+<div role="listbox" class="ex" aria-busy="true">
+ <!-- Despite having no required option children, this is valid because it is marked as busy. -->
+ <!-- For example, waiting for a script to load its contents. -->
+</div>
+
+<!-- Full coverage of live regions in getAccessibilityPropertiesForNode_liveRegion.html. -->
+<div class="ex" role="group" aria-live="off">off</div>
+<div class="ex" role="group" aria-live="polite">polite</div>
+<div class="ex" role="group" aria-live="assertive" aria-atomic="true">assertive (and atomic)</div>
+
+<div class="ex" role="button" tabindex="0"></div>
+<div class="ex" role="button" tabindex="0" aria-disabled="true">disabled</div>
+<div class="ex" role="button" tabindex="0" aria-pressed="true">Pressed.</div>
+<div class="ex" role="button" tabindex="0" aria-pressed="false">Not Pressed.</div>
+<button class="ex"></button>
+<input class="ex" type="button">
+
+<!-- FIXME: Inputs missing parentNodeId http://webkit.org/b/130181 -->
+<input class="ex">
+<input class="ex" required>
+
+<!-- Note: These correctly report childNodeIds.length of 1 b/c of their shadow DOM tree. See http://webkit.org/b/130302 -->
+<input class="ex" aria-required="true" value="required">
+<input class="ex" aria-invalid="spelling" value="invalid spelling">
+<input class="ex" aria-invalid="foo" value="fake value will eval to true">
+<input class="ex" readonly value="readonly">
+
+<div class="ex" role="textbox" tabindex="0" aria-readonly="true">readonly</div>
+<input class="ex" disabled value="disabled">
+<div class="ex" role="textbox" tabindex="0" aria-disabled="true">disabled</div>
+
+<input class="ex" type="checkbox">
+<input class="ex" type="checkbox" checked>
+<div class="ex" role="checkbox">unchecked (checked undefined evals to false on checkbox)</div>
+<div class="ex" role="checkbox" aria-checked="true">checked</div>
+<div class="ex" role="checkbox" aria-checked="mixed">mixed</div>
+<div class="ex" role="checkbox" aria-checked="false">unchecked</div>
+
+<input class="ex" type="radio">
+<input class="ex" type="radio" checked>
+<div class="ex" role="radio">unchecked (checked undefined evals to false on radio)</div>
+<div class="ex" role="radio" aria-checked="true">checked</div>
+<div class="ex" role="radio" aria-checked="mixed">unchecked [sic] mixed state will not be exposed on radios per ARIA spec.</div>
+<div class="ex" role="radio" aria-checked="false">unchecked</div>
+
+<input class="ex" aria-hidden="true">
+<input class="ex" style="display:none;">
+
+<!-- FIXME: Images missing parentNodeId http://webkit.org/b/130181 -->
+<img class="ex" src="./404.gif"><!-- img:not([alt]) ignored if it does not load. -->
+<img class="ex" src="data:image/gif;base64,R0lGODlhEAARAJECAOHh4UpKSgAAAAAAACH5BAEAAAIALAAAAAAQABEAAAIllB8Zx63b4otSUWcvyuz5D4biSD7AiZroWSXa5r7CJNOvra1RAQA7">
+<img class="ex" src="data:image/gif;base64,R0lGODlhEAARAJECAOHh4UpKSgAAAAAAACH5BAEAAAIALAAAAAAQABEAAAIllB8Zx63b4otSUWcvyuz5D4biSD7AiZroWSXa5r7CJNOvra1RAQA7" alt="">
+<img class="ex" src="data:image/gif;base64,R0lGODlhEAARAJECAOHh4UpKSgAAAAAAACH5BAEAAAIALAAAAAAQABEAAAIllB8Zx63b4otSUWcvyuz5D4biSD7AiZroWSXa5r7CJNOvra1RAQA7" alt="x">
+<img class="ex" src="data:image/gif;base64,R0lGODlhEAARAJECAOHh4UpKSgAAAAAAACH5BAEAAAIALAAAAAAQABEAAAIllB8Zx63b4otSUWcvyuz5D4biSD7AiZroWSXa5r7CJNOvra1RAQA7" alt="x" aria-hidden="true">
+<img class="ex" src="data:image/gif;base64,R0lGODlhEAARAJECAOHh4UpKSgAAAAAAACH5BAEAAAIALAAAAAAQABEAAAIllB8Zx63b4otSUWcvyuz5D4biSD7AiZroWSXa5r7CJNOvra1RAQA7" alt="x" style="display:none;">
+
+<select multiple id="flowedTo2">
+ <option class="ex" selected>FIXME: Selected is false. Expected true. http://webkit.org/b/129835</option>
+ <option class="ex">not selected</option>
+</select>
+
+<input class="ex" role="combobox" aria-owns="ownedlistbox invalidIdRef" aria-controls="ownedlistbox invalidIdRef">
+<div role="listbox" class="ex" id="ownedlistbox">
+ <div class="ex" role="option" aria-selected="true">selected</div>
+ <div class="ex" role="option" aria-selected="false">not selected</div>
+</div>
+
+<div role="tablist" class="ex" aria-flowto="flowedTo1 invalidIdRef flowedTo2">
+ <div class="ex" role="tab" aria-selected="true">selected</div>
+ <div class="ex" role="tab" aria-selected="false">not selected</div>
+</div>
+
+<div role="listbox" class="ex" aria-multiselectable="true">
+ <div role="option" aria-selected="true">selected</div>
+ <div role="option" aria-selected="false">not selected</div>
+ <div role="option" aria-selected="true">selected</div>
+</div>
+
+<div role="listbox" aria-busy="true">
+ <div class="ex" role="option">busy (parent)</div>
+ <div class="ex" role="option" aria-busy="true">busy (self)</div>
+</div>
+
+<ul role="tree" class="ex" id="flowedTo1" aria-activedescendant="activedescendant">
+ <li class="ex" role="treeitem" aria-expanded="true">expanded</li>
+ <li class="ex" role="treeitem" aria-expanded="false" id="activedescendant" aria-selected="true">collapsed</li>
+ <li class="ex" role="treeitem" aria-expanded="undefined">expanded</li>
+</ul>
+
+<!-- Full test of mouseEventNodeId in getAccessibilityPropertiesForNode_mouseEventNodeId.html. -->
+<div class="ex" onclick="void(0);">click</div>
+
+</div>
+
+<script type="text/javascript">
+
+function $(selector) {
+ return document.querySelectorAll(selector);
+}
+function cleanup() {
+ // Hide the test element container to avoid irrelevant output diffs on subsequent updates.
+ document.getElementById("examples").style.display = "none";
+}
+
+function test() {
+
+ var examples = [];
+ var documentNodeId = null;
+
+ function onGotDocument(response) {
+ InspectorTest.checkForError(response);
+ documentNodeId = response.result.root.nodeId;
+ InspectorTest.sendCommand("DOM.getAccessibilityPropertiesForNode", {"nodeId": documentNodeId}, onGotAccessibilityPropertiesForDocumentNode);
+ }
+
+ function onGotAccessibilityPropertiesForDocumentNode(response) {
+ InspectorTest.checkForError(response);
+ InspectorTest.log("#document");
+ logAccessibilityProperties(response.result.properties);
+ InspectorTest.log("\n");
+ InspectorTest.sendCommand("DOM.querySelectorAll", {"nodeId": documentNodeId, "selector": ".ex"}, onGotQuerySelectorAll);
+ }
+
+ function onGotQuerySelectorAll(response) {
+ InspectorTest.checkForError(response);
+ examples = response.result.nodeIds;
+ InspectorTest.log("Total elements to be tested: " + examples.length + ".");
+ loop();
+ }
+
+ function loop() {
+ if (examples.length) {
+ InspectorTest.sendCommand("DOM.getOuterHTML", {"nodeId": examples[examples.length-1]}, onGotOuterHTML);
+ } else {
+ finishTest();
+ }
+ }
+
+ function onGotOuterHTML(response) {
+ InspectorTest.checkForError(response);
+ var outerHTML = response.result.outerHTML;
+ outerHTML = outerHTML.replace(/ class="ex"/g, ""); // remove any duplicated, unnecessary class attributes
+ outerHTML = outerHTML.replace(/;base64,.*?"/, "...\""); // suppress full data URIs in output
+ InspectorTest.log("\n" + outerHTML);
+ InspectorTest.sendCommand("DOM.getAccessibilityPropertiesForNode", {"nodeId": examples[examples.length-1]}, onGotAccessibilityProperties);
+ }
+
+ function onGotAccessibilityProperties(response) {
+ InspectorTest.checkForError(response);
+ logAccessibilityProperties(response.result.properties);
+ examples.pop();
+ loop();
+ }
+
+ function logAccessibilityProperties(properties) {
+ for (var key in properties) {
+ var value = properties[key];
+ switch (key){
+ case "nodeId":
+ continue;
+ case "activeDescendantNodeId":
+ case "mouseEventNodeId":
+ case "parentNodeId":
+ if (typeof value === "number")
+ InspectorTest.log(" " + key + ": exists");
+ break;
+ case "childNodeIds":
+ case "controlledNodeIds":
+ case "flowedNodeIds":
+ case "ownedNodeIds":
+ case "selectedChildNodeIds":
+ if (typeof value === "object" && value.length)
+ InspectorTest.log(" " + key + ".length: " + value.length);
+ break;
+ default:
+ InspectorTest.log(" " + key + ": " + value);
+ }
+ }
+ }
+
+ function finishTest() {
+ InspectorTest.sendCommand("Runtime.evaluate", {"expression": "cleanup()"}, function(){
+ InspectorTest.completeTest();
+ });
+ }
+
+
+
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+}
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNode_liveRegionexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNode_liveRegionexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,175 @@
</span><ins>+Checking Web Inspector protocol (specifically live region properties) for the Accessibility Node Inspector.
+
+Total elements to be tested: 31.
+
+<div role="alert" aria-relevant="text text">relevant: text (duplicate)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions removals removals">relevant: additions removals (duplicate)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="text removals additions">relevant: all (implicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="text additions removals">relevant: all (implicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions removals text">relevant: all (implicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="all">relevant: all (explicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions">relevant: additions</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="text">relevant: text</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="removals">relevant: removals</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: removals
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="removals text">relevant: removals text</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: removals,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions removals">relevant: additions removals</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,removals
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="text additions">relevant: additions text (order should be normalized)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="alert" aria-relevant="additions text">relevant: additions text (explicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="alert">relevant: additions text (implicit)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="timer">off (default)</div>
+ exists: true
+
+<div role="status" aria-live="off">off</div>
+ exists: true
+
+<div role="status" aria-live="assertive">assertive</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="status">polite (default)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: polite
+
+<div role="marquee">off (default)</div>
+ exists: true
+
+<div role="log" aria-live="off">off</div>
+ exists: true
+
+<div role="log" aria-live="assertive">assertive</div>
+ exists: true
+ liveRegionAtomic: false
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="log">polite (default)</div>
+ exists: true
+ liveRegionAtomic: false
+ liveRegionRelevant: additions,text
+ liveRegionStatus: polite
+
+<div role="alert" aria-live="polite">polite</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: polite
+
+<div role="alert" aria-live="off">off</div>
+ exists: true
+
+<div role="alert">assertive (default)</div>
+ exists: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="group" aria-live="assertive" aria-busy="true" aria-atomic="false">assertive</div>
+ exists: true
+ busy: true
+ liveRegionAtomic: false
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="group" aria-live="polite" aria-busy="true" aria-atomic="false">polite</div>
+ exists: true
+ busy: true
+ liveRegionAtomic: false
+ liveRegionRelevant: additions,text
+ liveRegionStatus: polite
+
+<div role="group" aria-live="off" aria-busy="true" aria-atomic="false">off</div>
+ exists: true
+ busy: true
+
+<div role="group" aria-live="assertive" aria-busy="true" aria-atomic="true">assertive</div>
+ exists: true
+ busy: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: assertive
+
+<div role="group" aria-live="polite" aria-busy="true" aria-atomic="true">polite</div>
+ exists: true
+ busy: true
+ liveRegionAtomic: true
+ liveRegionRelevant: additions,text
+ liveRegionStatus: polite
+
+<div role="group" aria-live="off" aria-busy="true" aria-atomic="true">off</div>
+ exists: true
+ busy: true
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNode_liveRegionhtmlfromrev188141trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNode_liveRegionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,128 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+</head>
+<body onLoad="runTest()">
+
+<p>Checking Web Inspector protocol (specifically live region properties) for the Accessibility Node Inspector.</p>
+
+<div id="examples">
+
+        <div class="ex" role="group" aria-live="off" aria-busy="true" aria-atomic="true">off</div>
+ <div class="ex" role="group" aria-live="polite" aria-busy="true" aria-atomic="true">polite</div>
+ <div class="ex" role="group" aria-live="assertive" aria-busy="true" aria-atomic="true">assertive</div>
+ <div class="ex" role="group" aria-live="off" aria-busy="true" aria-atomic="false">off</div>
+ <div class="ex" role="group" aria-live="polite" aria-busy="true" aria-atomic="false">polite</div>
+ <div class="ex" role="group" aria-live="assertive" aria-busy="true" aria-atomic="false">assertive</div>
+
+ <div class="ex" role="alert">assertive (default)</div>
+        <div class="ex" role="alert" aria-live="off">off</div>
+        <div class="ex" role="alert" aria-live="polite">polite</div>
+        <div class="ex" role="log">polite (default)</div>
+        <div class="ex" role="log" aria-live="assertive">assertive</div>
+        <div class="ex" role="log" aria-live="off">off</div>
+        <div class="ex" role="marquee">off (default)</div>
+        <div class="ex" role="status">polite (default)</div>
+        <div class="ex" role="status" aria-live="assertive">assertive</div>
+        <div class="ex" role="status" aria-live="off">off</div>
+        <div class="ex" role="timer">off (default)</div>
+
+ <div class="ex" role="alert">relevant: additions text (implicit)</div>
+ <div class="ex" role="alert" aria-relevant="additions text">relevant: additions text (explicit)</div>
+ <div class="ex" role="alert" aria-relevant="text additions">relevant: additions text (order should be normalized)</div>
+ <div class="ex" role="alert" aria-relevant="additions removals">relevant: additions removals</div>
+ <div class="ex" role="alert" aria-relevant="removals text">relevant: removals text</div>
+ <div class="ex" role="alert" aria-relevant="removals">relevant: removals</div>
+ <div class="ex" role="alert" aria-relevant="text">relevant: text</div>
+ <div class="ex" role="alert" aria-relevant="additions">relevant: additions</div>
+ <div class="ex" role="alert" aria-relevant="all">relevant: all (explicit)</div>
+ <div class="ex" role="alert" aria-relevant="additions removals text">relevant: all (implicit)</div>
+ <div class="ex" role="alert" aria-relevant="text additions removals">relevant: all (implicit)</div>
+ <div class="ex" role="alert" aria-relevant="text removals additions">relevant: all (implicit)</div>
+ <div class="ex" role="alert" aria-relevant="additions removals removals">relevant: additions removals (duplicate)</div>
+ <div class="ex" role="alert" aria-relevant="text text">relevant: text (duplicate)</div>
+
+</div>
+
+<script type="text/javascript">
+
+function $(id) {
+ return document.getElementById(id);
+}
+
+function cleanup() {
+ // Hide the test element container to avoid irrelevant output diffs on subsequent updates.
+ $("examples").style.display = "none";
+}
+
+function test() {
+
+ var examples = [];
+ var documentNodeId = null;
+ var bodyNodeId = null;
+
+ function onGotDocument(response) {
+ InspectorTest.checkForError(response);
+ documentNodeId = response.result.root.nodeId;
+ InspectorTest.sendCommand("DOM.querySelectorAll", {"nodeId": documentNodeId, "selector": ".ex"}, onGotQuerySelectorAll);
+ }
+
+ function onGotQuerySelectorAll(response) {
+ InspectorTest.checkForError(response);
+ examples = response.result.nodeIds;
+ InspectorTest.log("Total elements to be tested: " + examples.length + ".");
+ loop();
+ }
+
+ function loop() {
+ if (examples.length) {
+ InspectorTest.sendCommand("DOM.getOuterHTML", {"nodeId": examples[examples.length-1]}, onGotOuterHTML);
+ } else {
+ finishTest();
+ }
+ }
+
+ function onGotOuterHTML(response) {
+ InspectorTest.checkForError(response);
+ var outerHTML = response.result.outerHTML;
+ outerHTML = outerHTML.replace(/ class="ex"/g, ""); // remove any duplicated, unnecessary class attributes
+ InspectorTest.log("\n" + outerHTML);
+ InspectorTest.sendCommand("DOM.getAccessibilityPropertiesForNode", {"nodeId": examples[examples.length-1]}, onGotAccessibilityProperties);
+ }
+
+ function onGotAccessibilityProperties(response) {
+ InspectorTest.checkForError(response);
+ logAccessibilityProperties(response.result.properties);
+ examples.pop();
+ loop();
+ }
+
+ function logAccessibilityProperties(properties) {
+ for (var key in properties) {
+ var value = properties[key];
+ switch (key){
+ case "busy":
+ case "exists":
+ case "liveRegionAtomic":
+ case "liveRegionRelevant":
+ case "liveRegionStatus":
+ InspectorTest.log(" " + key + ": " + value);
+ break;
+ default:
+ continue;
+ }
+ }
+ }
+
+ function finishTest() {
+ InspectorTest.sendCommand("Runtime.evaluate", {"expression": "cleanup()"}, function(){
+ InspectorTest.completeTest();
+ });
+ }
+
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+}
+</script>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNode_mouseEventNodeIdexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNode_mouseEventNodeIdexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+Checking Web Inspector protocol (specifically mouseEventNodeId) for the Accessibility Node Inspector.
+
+Total elements to be tested: 21.
+
+<div>DOM2 mouseup on parent div.</div>
+ mouseEventNodeId: ancestor element
+
+<div>DOM2 mousedown on parent div.</div>
+ mouseEventNodeId: ancestor element
+
+<div>DOM2 click on parent div.</div>
+ mouseEventNodeId: ancestor element
+
+<div id="dom2mouseup">mouseup</div>
+ mouseEventNodeId: self
+
+<div id="dom2mousedown">mousedown</div>
+ mouseEventNodeId: self
+
+<div id="dom2click">click</div>
+ mouseEventNodeId: self
+
+<div>DOM1 mouseup on parent div</div>
+ mouseEventNodeId: ancestor element
+
+<div>DOM1 mousedown on parent div.</div>
+ mouseEventNodeId: ancestor element
+
+<div>DOM1 click on parent div.</div>
+ mouseEventNodeId: ancestor element
+
+<div id="dom1mouseup">mouseup</div>
+ mouseEventNodeId: self
+
+<div id="dom1mousedown">mousedown</div>
+ mouseEventNodeId: self
+
+<div id="dom1click">click</div>
+ mouseEventNodeId: self
+
+<span role="img">DOM1 inline click on parent span.</span>
+ mouseEventNodeId: ancestor element
+
+<div>DOM1 inline click on parent div with tabindex="0".</div>
+ mouseEventNodeId: ancestor element
+
+<div>DOM1 inline click on parent div with role="button".</div>
+ mouseEventNodeId: ancestor element
+
+<div>DOM1 inline click on parent div.</div>
+ mouseEventNodeId: ancestor element
+
+<span onclick="void(0);">click</span>
+ mouseEventNodeId: self
+
+<div tabindex="0" onclick="void(0);">click</div>
+ mouseEventNodeId: self
+
+<div role="button" onclick="void(0);">click</div>
+ mouseEventNodeId: self
+
+<div onclick="void(0);">click</div>
+ mouseEventNodeId: self
+
+<div>Click handler on body delegate.</div>
+ mouseEventNodeId: body element
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNode_mouseEventNodeIdhtmlfromrev188141trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNode_mouseEventNodeIdhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,149 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+</head>
+<body onLoad="runTest()" onclick="void(0);">
+
+<p>Checking Web Inspector protocol (specifically mouseEventNodeId) for the Accessibility Node Inspector.</p>
+
+<div id="examples">
+
+ <div class="ex">Click handler on body delegate.</div>
+
+ <!-- Inline event handlers for mouseEventNodeId test. -->
+ <div class="ex" onclick="void(0);">click</div>
+ <div class="ex" role="button" onclick="void(0);">click</div>
+ <div class="ex" tabindex="0" onclick="void(0);">click</div>
+ <span class="ex" onclick="void(0);">click</span>
+ <div onclick="void(0);"><div class="ex">DOM1 inline click on parent div.</div></div>
+ <div role="button" onclick="void(0);"><div class="ex">DOM1 inline click on parent div with role="button".</div></div>
+ <div tabindex="0" onclick="void(0);"><div class="ex">DOM1 inline click on parent div with tabindex="0".</div></div>
+ <span onclick="void(0);"><span role="img" class="ex">DOM1 inline click on parent span.</span></span>
+
+ <!-- DOM Level 1 events assigned below for mouseEventNodeId test. -->
+ <div class="ex" id="dom1click">click</div>
+ <div class="ex" id="dom1mousedown">mousedown</div>
+ <div class="ex" id="dom1mouseup">mouseup</div>
+ <div id="dom1clickparent"><div class="ex">DOM1 click on parent div.</div></div>
+ <div id="dom1mousedownparent"><div class="ex">DOM1 mousedown on parent div.</div></div>
+ <div id="dom1mouseupparent"><div class="ex">DOM1 mouseup on parent div</div></div>
+
+ <!-- DOM Level 2 events assigned below for mouseEventNodeId test. -->
+ <div class="ex" id="dom2click">click</div>
+ <div class="ex" id="dom2mousedown">mousedown</div>
+ <div class="ex" id="dom2mouseup">mouseup</div>
+ <div id="dom2clickparent"><div class="ex">DOM2 click on parent div.</div></div>
+ <div id="dom2mousedownparent"><div class="ex">DOM2 mousedown on parent div.</div></div>
+ <div id="dom2mouseupparent"><div class="ex">DOM2 mouseup on parent div.</div></div>
+
+</div>
+
+<script type="text/javascript">
+
+function $(id) {
+ return document.getElementById(id);
+}
+
+function voidHandler() {
+ void(0);
+}
+
+// DOM Level 1 events.
+$("dom1click").onclick = voidHandler;
+$("dom1mousedown").onmousedown = voidHandler;
+$("dom1mouseup").onmouseup = voidHandler;
+$("dom1clickparent").onclick = voidHandler;
+$("dom1mousedownparent").onmousedown = voidHandler;
+$("dom1mouseupparent").onmouseup = voidHandler;
+
+// DOM Level 2 events.
+$("dom2click").addEventListener("click", voidHandler);
+$("dom2mousedown").addEventListener("mousedown", voidHandler);
+$("dom2mouseup").addEventListener("mouseup", voidHandler);
+$("dom2clickparent").addEventListener("click", voidHandler);
+$("dom2mousedownparent").addEventListener("mousedown", voidHandler);
+$("dom2mouseupparent").addEventListener("mouseup", voidHandler);
+
+function cleanup() {
+ // Hide the test element container to avoid irrelevant output diffs on subsequent updates.
+ $("examples").style.display = "none";
+}
+
+function test() {
+
+ var examples = [];
+ var documentNodeId = null;
+ var bodyNodeId = null;
+
+ function onGotDocument(response) {
+ InspectorTest.checkForError(response);
+ documentNodeId = response.result.root.nodeId;
+ InspectorTest.sendCommand("DOM.querySelector", {"nodeId": documentNodeId, "selector": "body"}, onGotBody);
+ }
+
+ function onGotBody(response) {
+ InspectorTest.checkForError(response);
+ bodyNodeId = response.result.nodeId;
+ InspectorTest.sendCommand("DOM.getAccessibilityPropertiesForNode", {"nodeId": bodyNodeId}, onGotAccessibilityPropertiesForBodyNode);
+ }
+
+ function onGotAccessibilityPropertiesForBodyNode(response) {
+ InspectorTest.checkForError(response);
+ InspectorTest.sendCommand("DOM.querySelectorAll", {"nodeId": documentNodeId, "selector": ".ex"}, onGotQuerySelectorAll);
+ }
+
+ function onGotQuerySelectorAll(response) {
+ InspectorTest.checkForError(response);
+ examples = response.result.nodeIds;
+ InspectorTest.log("Total elements to be tested: " + examples.length + ".");
+ loop();
+ }
+
+ function loop() {
+ if (examples.length) {
+ InspectorTest.sendCommand("DOM.getOuterHTML", {"nodeId": examples[examples.length-1]}, onGotOuterHTML);
+ } else {
+ finishTest();
+ }
+ }
+
+ function onGotOuterHTML(response) {
+ InspectorTest.checkForError(response);
+ var outerHTML = response.result.outerHTML;
+ outerHTML = outerHTML.replace(/ class="ex"/g, ""); // remove any duplicated, unnecessary class attributes
+ InspectorTest.log("\n" + outerHTML);
+ InspectorTest.sendCommand("DOM.getAccessibilityPropertiesForNode", {"nodeId": examples[examples.length-1]}, onGotAccessibilityProperties);
+ }
+
+ function onGotAccessibilityProperties(response) {
+ InspectorTest.checkForError(response);
+ logAccessibilityProperties(response.result.properties);
+ examples.pop();
+ loop();
+ }
+
+ function logAccessibilityProperties(properties) {
+ var mouseEventNodeId = properties.mouseEventNodeId;
+ if (typeof mouseEventNodeId === "number")
+ var msg = " mouseEventNodeId: ";
+ if (mouseEventNodeId === bodyNodeId)
+ msg += "body element";
+ else if (mouseEventNodeId === properties.nodeId)
+ msg += "self";
+ else
+ msg += "ancestor element";
+ InspectorTest.log(msg);
+ }
+
+ function finishTest() {
+ InspectorTest.sendCommand("Runtime.evaluate", {"expression": "cleanup()"}, function(){
+ InspectorTest.completeTest();
+ });
+ }
+
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+}
+</script>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomhighlightflowwithnoregionexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomhighlightflowwithnoregionexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/highlight-flow-with-no-region-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/highlight-flow-with-no-region-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/highlight-flow-with-no-region-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/highlight-flow-with-no-region-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+Testing that the backend is not crashing when highlighting a node that has no associated region.
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomhighlightflowwithnoregionhtmlfromrev188141trunkLayoutTestsinspectorprotocoldomhighlightflowwithnoregionhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/highlight-flow-with-no-region.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/highlight-flow-with-no-region.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/highlight-flow-with-no-region.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/highlight-flow-with-no-region.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<style>
+#flow {
+ -webkit-flow-into: flow;
+}
+</style>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+ function onGotDocument(msg) {
+ InspectorTest.checkForError(msg);
+ var node = msg.result.root;
+ InspectorTest.sendCommand("DOM.querySelector", { "nodeId": node.nodeId, "selector": "#inspectedElement" }, onQuerySelector);
+ }
+
+ function onQuerySelector(msg) {
+ InspectorTest.checkForError(msg);
+ var node = msg.result;
+ var highlightConfig = {
+ showInfo: true,
+ contentColor: {r: 255, g: 255, b: 255},
+ paddingColor: {r: 255, g: 255, b: 255},
+ borderColor: {r: 255, g: 255, b: 255},
+ marginColor: {r: 255, g: 255, b: 255},
+ };
+ InspectorTest.sendCommand("DOM.highlightNode", { "highlightConfig": highlightConfig, "nodeId": node.nodeId }, onHighlightComplete);
+ }
+
+ function onHighlightComplete(msg) {
+ InspectorTest.checkForError(msg);
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+
+<div id="flow">
+ <div id="inspectedElement"></div>
+</div>
+
+<p>Testing that the backend is not crashing when highlighting a node that has no associated region.</p>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomremovemultiplenodesexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomremovemultiplenodesexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/remove-multiple-nodes-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/remove-multiple-nodes-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/remove-multiple-nodes-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/remove-multiple-nodes-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Testing that DOM.childNodeRemoved is correctly triggered when all the parent children of a node are removed at once.
+
+Parent container is now empty
+Target element should have been moved after this line:
+Target element
+
+Removing node div#target_element
+Inserting node div#target_element into p#final_container
+Removing node div#before
+Removing node div#after
+Inserting node <text node "Parent container is now empty"> into div#parent_container
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomremovemultiplenodeshtmlfromrev188141trunkLayoutTestsinspectorprotocoldomremovemultiplenodeshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/remove-multiple-nodes.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/remove-multiple-nodes.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/remove-multiple-nodes.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/remove-multiple-nodes.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function moveNode()
+{
+ var targetElement = document.getElementById("target_element");
+ targetElement.addEventListener("DOMNodeRemoved", function() {
+ targetElement.removeEventListener("DOMNodeRemoved", arguments.callee);
+ document.getElementById("final_container").appendChild(this);
+ });
+ // Remove all the children inside parent container, including "#target_element".
+ var parentContainer = document.getElementById("parent_container");
+ parentContainer.textContent = "Parent container is now empty";
+}
+
+function test()
+{
+ var nodesById = {};
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = onSetChildNodes;
+ InspectorTest.eventHandler["DOM.childNodeRemoved"] = onChildNodeRemoved;
+ InspectorTest.eventHandler["DOM.childNodeInserted"] = onChildNodeInserted;
+
+ function createNodeAttributesMap(attributes)
+ {
+ var attributesMap = {};
+ for (var i = 0; i < attributes.length; i += 2)
+ attributesMap[attributes[i]] = attributes[i + 1];
+ return attributesMap;
+ }
+
+ function collectNode(node)
+ {
+ if (node.nodeType === 1)
+ node.attributes = createNodeAttributesMap(node.attributes);
+ if (node.children)
+ node.children.forEach(collectNode);
+ nodesById[node.nodeId] = node;
+ }
+
+ function nodeToString(node)
+ {
+ switch (node.nodeType) {
+ case 1:
+ return node.localName + "#" + node.attributes.id;
+ case 3:
+ return "<text node " + JSON.stringify(node.nodeValue) + ">";
+ default:
+ return "<nodeType " + node.nodeType + ">";
+ }
+ }
+
+ function getNodeIdentifier(nodeId)
+ {
+ if (!nodeId)
+ return "<invalid node id>";
+ var node = nodesById[nodeId];
+ return node ? nodeToString(node) : "<unknown node>";
+ }
+
+ function onSetChildNodes(response)
+ {
+ response.params.nodes.forEach(collectNode);
+ }
+
+ function onChildNodeRemoved(response)
+ {
+ var nodeId = response.params.nodeId;
+ InspectorTest.log("Removing node " + getNodeIdentifier(nodeId));
+ delete nodesById[nodeId];
+ }
+
+ function onChildNodeInserted(response)
+ {
+ collectNode(response.params.node);
+ InspectorTest.log("Inserting node " + getNodeIdentifier(response.params.node.nodeId) + " into " + getNodeIdentifier(response.params.parentNodeId));
+ }
+
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+
+ function onGotDocument(msg)
+ {
+ InspectorTest.checkForError(msg);
+ InspectorTest.sendCommand("DOM.querySelectorAll", {"nodeId": msg.result.root.nodeId, "selector": "#parent_container,#final_container"}, onQuerySelectorAll);
+ }
+
+ function onQuerySelectorAll(response)
+ {
+ // Make sure we receive the children of the "#final_container" as they are added.
+ for (var i = 0; i < response.result.nodeIds.length; ++i)
+ InspectorTest.sendCommand("DOM.requestChildNodes", {nodeId: response.result.nodeIds[i]});
+
+ InspectorTest.sendCommand("Runtime.evaluate", {"expression": "moveNode()"}, function() {
+ InspectorTest.completeTest();
+ });
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+
+<p>Testing that DOM.childNodeRemoved is correctly triggered when all the parent children of a node are removed at once.</p>
+
+<div id="parent_container">
+ <div id="before">FAIL: Element "#before" should be removed</div>
+ <div id="target_element">Target element</div>
+ <div id="after">FAIL: Element "#after" should be removed</div>
+</div>
+
+<p id="final_container">Target element should have been moved after this line:</p>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomrequestchildnodesdepthexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomrequestchildnodesdepthexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/request-child-nodes-depth-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/request-child-nodes-depth-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/request-child-nodes-depth-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom/request-child-nodes-depth-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+
+=== Get the Document ===
+
+
+=== Get immediate children of the body ===
+
+PASS: First child is a div
+PASS: First child is div#depth-1
+PASS: First child has one child
+PASS: First child has no .children property
+
+=== Get children of div#depth-1 three levels deep ===
+
+PASS: div#depth-1 has nodes 3 levels deep
+
+=== Get all children of body ===
+
+PASS: div#depth-1 has nodes 9 levels deep
+
+=== Pass an invalid depth ===
+
+Backend error: Please provide a positive integer as a depth or -1 for entire subtree (-32000)
+
+PASS: Expected number of setChildNodes events
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomrequestchildnodesdepthhtmlfromrev188141trunkLayoutTestsinspectorprotocoldomrequestchildnodesdepthhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/request-child-nodes-depth.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/request-child-nodes-depth.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/request-child-nodes-depth.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/request-child-nodes-depth.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,162 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ var firstDiv;
+ var eventsCount = 0;
+
+ getDocument();
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = function setChildNodes(messageObject)
+ {
+ eventsCount++;
+
+ if (eventsCount === 1)
+ gotImmediateChildren(messageObject);
+ else if (eventsCount === 2)
+ gotAdditionalChildren(messageObject);
+ else if (eventsCount === 3)
+ gotAllChildren(messageObject);
+ else
+ InspectorTest.log(JSON.stringify(messageObject, null, " "));
+ };
+
+ function getDocument()
+ {
+ // We must first get the document so that later on we may get sensible nodeIds.
+ step({
+ name: "Get the Document",
+ command: "DOM.getDocument",
+ parameters: {},
+ callback: getImmediateChildren
+ });
+ };
+
+ function getImmediateChildren(result)
+ {
+ var bodyId = result.root.children[0].children[1].nodeId;
+ step({
+ name: "Get immediate children of the body",
+ command: "DOM.requestChildNodes",
+ parameters: {"nodeId": bodyId}
+ });
+ };
+
+ function gotImmediateChildren(messageObject)
+ {
+ firstDiv = messageObject.params.nodes[0];
+ assert("First child is a div", firstDiv.localName, "div");
+ assert("First child is div#depth-1", firstDiv.attributes[1], "depth-1");
+ assert("First child has one child", firstDiv.childNodeCount, 1);
+ assert("First child has no .children property", firstDiv.children, undefined);
+
+ step({
+ name: "Get children of div#depth-1 three levels deep",
+ command: "DOM.requestChildNodes",
+ parameters: {"nodeId": firstDiv.nodeId, "depth": 3}
+ });
+ };
+
+ function gotAdditionalChildren(messageObject)
+ {
+ var depth = 1;
+ var firstChild = messageObject.params.nodes[0];
+ var node = firstChild;
+ while (node && node.children) {
+ depth++;
+ node = node.children[0];
+ }
+
+ assert("div#depth-1 has nodes 3 levels deep", depth, 3);
+
+ step({
+ name: "Get all children of body",
+ command: "DOM.requestChildNodes",
+ parameters: {"nodeId": firstDiv.nodeId, "depth": -1}
+ });
+ };
+
+ function gotAllChildren(messageObject)
+ {
+ var depth = 1;
+ var firstChild = messageObject.params.nodes[0];
+ var node = firstChild;
+ while (node && node.children) {
+ depth++;
+ node = node.children[0];
+ }
+
+ // We have requested nodes 3-level deep so far, so
+ // we should have gotten an additional 6 levels of depth.
+ assert("div#depth-1 has nodes 9 levels deep", depth, 6);
+
+ step({
+ name: "Pass an invalid depth",
+ command: "DOM.requestChildNodes",
+ parameters: {"nodeId": firstDiv.nodeId, "depth": 0},
+ callback: finishTest
+ });
+ };
+
+ function finishTest()
+ {
+ assert("Expected number of setChildNodes events", eventsCount, 3);
+
+ InspectorTest.completeTest();
+ };
+
+ function step(test)
+ {
+ InspectorTest.log("\n=== " + test.name + " ===\n");
+ InspectorTest.sendCommand(test.command, test.parameters, function(messageObject) {
+ if (messageObject.hasOwnProperty("error"))
+ InspectorTest.log("Backend error: " + messageObject.error.message + " (" + messageObject.error.code + ")\n");
+
+ if (test.callback)
+ test.callback(messageObject.result);
+ });
+ };
+
+ function assert(message, actual, expected)
+ {
+ if (actual === expected)
+ InspectorTest.log("PASS: " + message);
+ else {
+ InspectorTest.log("FAIL: " + message + ", expected \"" + expected + "\" but got \"" + actual + "\"");
+ InspectorTest.completeTest();
+ }
+ };
+};
+
+window.addEventListener("DOMContentLoaded", function() {
+ runTest();
+}, false);
+</script>
+</head>
+<body>
+
+<div id="depth-1">
+ <div id="depth-2">
+ <div id="depth-3">
+ <div id="depth-4">
+ <div id="depth-5">
+ <div id="depth-6">
+ <div id="depth-7">
+ <div id="depth-8">
+ <div id="depth-9">
+ <div id="depth-10">
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomresourcesdomsearchcrashiframehtmlfromrev188141trunkLayoutTestsinspectorprotocoldomresourcesdomsearchcrashiframehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/resources/dom-search-crash-iframe.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/resources/dom-search-crash-iframe.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/resources/dom-search-crash-iframe.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/resources/dom-search-crash-iframe.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+<script>
+document.documentElement.parentNode.removeChild(document.documentElement);
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomresourcesdomsearchiframehtmlfromrev188141trunkLayoutTestsinspectorprotocoldomresourcesdomsearchiframehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/resources/dom-search-iframe.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/resources/dom-search-iframe.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/resources/dom-search-iframe.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom/resources/dom-search-iframe.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+<html class="inside-iframe">
+ <head class="inside-iframe">
+ </head>
+ <body class="inside-iframe">
+ <div class="base1 inside-iframe">
+ <p class="inside-iframe"></p>
+ </div>
+ </body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomresourcesdomsearchqueriesjsfromrev188141trunkLayoutTestsinspectorprotocoldomresourcesdomsearchqueriesjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom/resources/dom-search-queries.js (from rev 188141, trunk/LayoutTests/inspector-protocol/dom/resources/dom-search-queries.js) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/resources/dom-search-queries.js         (rev 0)
+++ trunk/LayoutTests/inspector/dom/resources/dom-search-queries.js        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+// Having the queries in an external file, so that DOM search will not find the script when searching for values.
+
+var domSearchQueries = [
+ "body",
+ "<body",
+ "body>",
+ "<body>",
+ "<BODY>",
+
+ // Attribute names
+ "onload",
+ "ONLOAD",
+
+ // Attribute values
+ "runTest()",
+ "\"runTest()",
+ "\"runTest()\"",
+ "runTest()\"",
+ "RUNTEST()",
+ "runtest()",
+
+ // CSS selectors
+ ".body-inside-iframe",
+ "*",
+ "BODY[ONLOAD]",
+
+ // XPath query
+ "/html/body",
+ "/html/body/@onload",
+ "/HTML/BODY"
+];
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomdebuggernoderemovedexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocoldomdebuggernoderemovedexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom-debugger/node-removed-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/dom-debugger/node-removed-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom-debugger/node-removed-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/dom-debugger/node-removed-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+Testing that DOM.childNodeRemoved is correctly triggered even when the element is moved while paused in the debugger on a DOMDebugger "node-removed" breakpoint.
+
+Found <script>
+Stopped on DOM breakpoint
+PASS: onChildNodeRemoved called for #target_element
+PASS: onChildNodeInserted called for parent node #final_container
+PASS: onChildNodeInserted called for child node #target_element
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordomdebuggernoderemovedhtmlfromrev188141trunkLayoutTestsinspectorprotocoldomdebuggernoderemovedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/dom-debugger/node-removed.html (from rev 188141, trunk/LayoutTests/inspector-protocol/dom-debugger/node-removed.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom-debugger/node-removed.html         (rev 0)
+++ trunk/LayoutTests/inspector/dom-debugger/node-removed.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,143 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+window.onload = runTest;
+
+function removeNode()
+{
+ document.getElementById("target_element").remove();
+}
+
+function moveNode()
+{
+ var targetElement = document.getElementById("target_element");
+ document.getElementById("final_container").appendChild(targetElement);
+}
+
+function test()
+{
+ var nodesById = {};
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = onSetChildNodes;
+ InspectorTest.eventHandler["DOM.childNodeRemoved"] = onChildNodeRemoved;
+ InspectorTest.eventHandler["DOM.childNodeInserted"] = onChildNodeInserted;
+ InspectorTest.eventHandler["Debugger.paused"] = onDebuggerPaused;
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = onScriptParsed;
+
+ function createNodeAttributesMap(attributes)
+ {
+ var attributesMap = {};
+ for (var i = 0; i < attributes.length; i += 2)
+ attributesMap[attributes[i]] = attributes[i + 1];
+ return attributesMap;
+ }
+
+ function collectNode(node)
+ {
+ if (node.nodeType === 1)
+ node.attributes = createNodeAttributesMap(node.attributes);
+ if (node.children)
+ node.children.forEach(collectNode);
+ nodesById[node.nodeId] = node;
+ }
+
+ function nodeToString(node)
+ {
+ switch (node.nodeType) {
+ case 1:
+ return node.localName + "#" + node.attributes.id;
+ case 3:
+ return "<text node " + JSON.stringify(node.nodeValue) + ">";
+ default:
+ return "<nodeType " + node.nodeType + ">";
+ }
+ }
+
+ function getNodeIdentifier(nodeId)
+ {
+ if (!nodeId)
+ return "<invalid node id>";
+ var node = nodesById[nodeId];
+ return node ? nodeToString(node) : "<unknown node>";
+ }
+
+ function onSetChildNodes(response)
+ {
+ response.params.nodes.forEach(collectNode);
+ }
+
+ function onChildNodeRemoved(response)
+ {
+ var nodeId = response.params.nodeId;
+ InspectorTest.assert(getNodeIdentifier(nodeId) === "div#target_element", "onChildNodeRemoved called for #target_element");
+ delete nodesById[nodeId];
+ }
+
+ function onChildNodeInserted(response)
+ {
+ collectNode(response.params.node);
+ InspectorTest.assert(getNodeIdentifier(response.params.parentNodeId) === "div#final_container", "onChildNodeInserted called for parent node #final_container");
+ InspectorTest.assert(getNodeIdentifier(response.params.node.nodeId) === "div#target_element", "onChildNodeInserted called for child node #target_element");
+ }
+
+ function onDebuggerPaused(response)
+ {
+ InspectorTest.log("Stopped on DOM breakpoint");
+ InspectorTest.sendCommand("Runtime.evaluate", {"expression": "moveNode()"}, function() {
+ InspectorTest.sendCommand("Debugger.resume");
+ InspectorTest.completeTest();
+ });
+ }
+
+ function onScriptParsed(messageObject)
+ {
+ // FIXME: The DOM breakpoints are not working unless there's a JS brakpoint set. Setting a fake breakpoint to workaround that.
+ // https://bugs.webkit.org/show_bug.cgi?id=123770
+ if (/node-removed\.html$/.test(messageObject.params.url) && messageObject.params.startLine > 20) {
+ InspectorTest.eventHandler["Debugger.scriptParsed"] = null;
+ InspectorTest.log("Found <script>");
+ var location = {scriptId: messageObject.params.scriptId, lineNumber: messageObject.params.startLine + 2, columnNumber: 0};
+ InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function() {
+ InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
+ });
+ }
+ }
+
+ function onGotDocument(response)
+ {
+ InspectorTest.checkForError(response);
+ InspectorTest.sendCommand("DOM.querySelectorAll", {"nodeId": response.result.root.nodeId, "selector": "#target_element,#final_container"}, onQuerySelectorAll);
+ }
+
+ function onQuerySelectorAll(response)
+ {
+ var targetElementId = response.result.nodeIds[0];
+ var finalContainerId = response.result.nodeIds[1];
+
+ InspectorTest.sendCommand("DOMDebugger.setDOMBreakpoint", {nodeId: targetElementId, type: "node-removed"});
+ InspectorTest.sendCommand("DOM.requestChildNodes", {nodeId: finalContainerId});
+
+ InspectorTest.sendCommand("Runtime.evaluate", {"expression": "removeNode()"});
+ }
+
+ InspectorTest.sendCommand("Debugger.enable", {});
+}
+</script>
+</head>
+<body>
+
+<p>Testing that DOM.childNodeRemoved is correctly triggered even when the element is moved while paused in the debugger on a DOMDebugger "node-removed" breakpoint.</p>
+
+<div id="target_element"></div>
+<div id="final_container"></div>
+
+<!-- Script tag required to workaround bug 123770. See onScriptParsed for details. -->
+<script>// Line 0
+function testFunction() { // Line 1
+ console.log("FAIL: Workaround JS code should not run.");
+}
+</script>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectoreventlistenerexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/event-listener-expected.txt (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/event-listener-expected.txt        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/event-listener-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>-Testing basic functionality of WebInspector.EventListener.
-
-Connecting the listener.
-Invoked callback for kaboom event.
-Invoked callback for kaboom event.
-Disconnecting the listener.
-Connecting the listener.
-Invoked callback for kaboom event.
-Disconnecting the listener.
-Connecting the listener.
-Disconnecting the listener.
-Connecting the single-fire listener.
-Invoked callback for kaboom event.
-Disconnecting the single-fire listener.
-Invoked callback for kaboom event.
-
</del></span></pre></div>
<a id="trunkLayoutTestsinspectoreventlistenersetexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/event-listener-set-expected.txt (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/event-listener-set-expected.txt        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/event-listener-set-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-Testing basic functionality of WebInspector.EventListenerSet.
-
-Registering listeners.
-Installing listeners.
-Dispatching events.
-Invoked callback for foo event.
-Invoked callback for bar event.
-Invoked callback for baz event.
-Uninstalling and disconnecting listeners.
-Registering listeners.
-Dispatching events.
-Invoked callback for foo event.
-Invoked callback for bar event.
-Invoked callback for baz event.
-Uninstalling listeners.
-Installing listeners.
-Dispatching events.
-Invoked callback for foo event.
-Invoked callback for bar event.
-Invoked callback for baz event.
-Unregistering everything.
-Dispatching events.
-Unintalling and disconnecting listeners.
-Dispatching events.
-
</del></span></pre></div>
<a id="trunkLayoutTestsinspectoreventlistenersethtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/event-listener-set.html (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/event-listener-set.html        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/event-listener-set.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,117 +0,0 @@
</span><del>-<!doctype html>
-<html>
-<head>
-<script type="text/javascript" src="../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function test()
-{
- const FooEvent = "foo";
- const BarEvent = "bar";
- const BazEvent = "baz";
- var emitter1 = new WebInspector.Object();
- var emitter2 = new WebInspector.Object();
- var context1 = new WebInspector.Object();
- var context2 = new WebInspector.Object();
- var data1 = [1, 2, 3];
- var data2 = [4, 6, 8];
-
- function fooCallback(event)
- {
- InspectorTest.assert(this === context1, "Callback invoked with wrong |this| binding.");
- InspectorTest.assert(event.target === emitter1, "Callback invoked with wrong event emitter.");
- InspectorTest.assert(event.data === data1, "Callback invoked with wrong event data.");
-
- InspectorTest.log("Invoked callback for foo event.");
- }
-
- function barCallback(event)
- {
- InspectorTest.assert(this === context1, "Callback invoked with wrong |this| binding.");
- InspectorTest.assert(event.target === emitter1, "Callback invoked with wrong event emitter.");
- InspectorTest.assert(event.data === data2, "Callback invoked with wrong event data.");
-
- InspectorTest.log("Invoked callback for bar event.");
- }
-
- function bazCallback(event)
- {
- InspectorTest.assert(this === context2, "Callback invoked with wrong |this| binding.");
- InspectorTest.assert(event.target === emitter2, "Callback invoked with wrong event emitter.");
- InspectorTest.assert(event.data === data2, "Callback invoked with wrong event data.");
-
- InspectorTest.log("Invoked callback for baz event.");
- }
-
- // Test for multiple firings of listeners in the set.
-
- var listenerSet = new WebInspector.EventListenerSet(context1);
- InspectorTest.assert(!emitter1.hasEventListeners(FooEvent), "Emitter should not have any listeners.");
- emitter1.dispatchEventToListeners(FooEvent, data1); // Should not fire anything.
-
- InspectorTest.log("Registering listeners.");
- listenerSet.register(emitter1, FooEvent, fooCallback);
- listenerSet.register(emitter1, BarEvent, barCallback);
- listenerSet.register(emitter2, BazEvent, bazCallback, context2);
- InspectorTest.assert(!emitter1.hasEventListeners(FooEvent), "Emitter should not have a listener.");
- InspectorTest.assert(!emitter1.hasEventListeners(BarEvent), "Emitter should not have a listener.");
- InspectorTest.assert(!emitter2.hasEventListeners(BazEvent), "Emitter should not have a listener.");
-
- InspectorTest.log("Installing listeners.");
- listenerSet.install();
- InspectorTest.assert(emitter1.hasEventListeners(FooEvent), "Emitter should have a listener.");
- InspectorTest.assert(emitter1.hasEventListeners(BarEvent), "Emitter should have a listener.");
- InspectorTest.assert(emitter2.hasEventListeners(BazEvent), "Emitter should have a listener.");
-
- InspectorTest.log("Dispatching events.");
- emitter1.dispatchEventToListeners(FooEvent, data1); // Should fire.
- emitter1.dispatchEventToListeners(BarEvent, data2); // Should fire.
- emitter2.dispatchEventToListeners(BazEvent, data2); // Should fire.
- InspectorTest.log("Uninstalling and disconnecting listeners.");
- listenerSet.uninstall(true);
-
- InspectorTest.log("Registering listeners.");
- listenerSet.register(emitter1, FooEvent, fooCallback);
- listenerSet.register(emitter1, BarEvent, barCallback);
- listenerSet.register(emitter2, BazEvent, bazCallback, context2);
-
- listenerSet.install();
- InspectorTest.log("Dispatching events.");
- emitter1.dispatchEventToListeners(FooEvent, data1); // Should fire.
- emitter1.dispatchEventToListeners(BarEvent, data2); // Should fire.
- emitter2.dispatchEventToListeners(BazEvent, data2); // Should fire.
- InspectorTest.log("Uninstalling listeners.");
- listenerSet.uninstall();
-
- InspectorTest.log("Installing listeners.");
- listenerSet.install();
- InspectorTest.log("Dispatching events.");
- emitter1.dispatchEventToListeners(FooEvent, data1); // Should fire.
- emitter1.dispatchEventToListeners(BarEvent, data2); // Should fire.
- emitter2.dispatchEventToListeners(BazEvent, data2); // Should fire.
-
- InspectorTest.log("Unregistering everything.");
- listenerSet.unregister();
- InspectorTest.log("Dispatching events.");
- emitter1.dispatchEventToListeners(FooEvent, data1); // Should not fire.
- emitter1.dispatchEventToListeners(BarEvent, data2); // Should not fire.
- emitter2.dispatchEventToListeners(BazEvent, data2); // Should not fire.
-
- InspectorTest.log("Unintalling and disconnecting listeners.");
- listenerSet.uninstall(true);
- InspectorTest.log("Dispatching events.");
- emitter1.dispatchEventToListeners(FooEvent, data1); // Should not fire.
- emitter1.dispatchEventToListeners(BarEvent, data2); // Should not fire.
- emitter2.dispatchEventToListeners(BazEvent, data2); // Should not fire.
-
- InspectorTest.assert(!emitter1.hasEventListeners(FooEvent), "Emitter should not have a listener.");
- InspectorTest.assert(!emitter1.hasEventListeners(BarEvent), "Emitter should not have a listener.");
- InspectorTest.assert(!emitter2.hasEventListeners(BazEvent), "Emitter should not have a listener.");
-
- InspectorTest.completeTest();
-}
-</script>
-</head>
-<body onload="runTest()">
- <p>Testing basic functionality of WebInspector.EventListenerSet.</p>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsinspectoreventlistenerhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/event-listener.html (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/event-listener.html        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/event-listener.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,93 +0,0 @@
</span><del>-<!doctype html>
-<html>
-<head>
-<script type="text/javascript" src="../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function test()
-{
- const KaboomEvent = "kaboom";
- var emitter = new WebInspector.Object();
- var context = new WebInspector.Object();
- var data = [1, 2, 3];
-
- function kaboomCallback(event) {
- InspectorTest.assert(this === context, "Callback invoked with wrong |this| binding.");
- InspectorTest.assert(event.target === emitter, "Callback invoked with wrong event emitter.");
- InspectorTest.assert(event.data === data, "Callback invoked with wrong event data.");
-
- InspectorTest.log("Invoked callback for kaboom event.");
- }
-
- // Test for multiple firings of the listener.
-
- var listener = new WebInspector.EventListener(context);
- InspectorTest.assert(!emitter.hasEventListeners(KaboomEvent), "Emitter should not have any listeners.");
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire anything.
-
- InspectorTest.log("Connecting the listener.");
- listener.connect(emitter, KaboomEvent, kaboomCallback);
- InspectorTest.assert(emitter.hasEventListeners(KaboomEvent), "Emitter should have a listener.");
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
- InspectorTest.log("Disconnecting the listener.");
- listener.disconnect();
-
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire anything.
- InspectorTest.assert(!emitter.hasEventListeners(KaboomEvent), "Emitter should not have any listeners.");
-
- // Test reconnection.
-
- InspectorTest.log("Connecting the listener.");
- listener.connect(emitter, KaboomEvent, kaboomCallback);
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
- InspectorTest.log("Disconnecting the listener.");
- listener.disconnect();
-
- // Test unused listener.
-
- InspectorTest.log("Connecting the listener.");
- listener.connect(emitter, KaboomEvent, kaboomCallback);
- InspectorTest.log("Disconnecting the listener.");
- listener.disconnect();
-
- // Test for single firing of the listener.
-
- var singleListener = new WebInspector.EventListener(context, true);
- InspectorTest.assert(!emitter.hasEventListeners(KaboomEvent), "Emitter should not have any listeners.");
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire anything.
-
- InspectorTest.log("Connecting the single-fire listener.");
- singleListener.connect(emitter, KaboomEvent, kaboomCallback);
- InspectorTest.assert(emitter.hasEventListeners(KaboomEvent), "Emitter should have a listener.");
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
- InspectorTest.assert(!emitter.hasEventListeners(KaboomEvent), "Emitter should not have any listeners.");
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire.
- InspectorTest.log("Disconnecting the single-fire listener.");
- singleListener.disconnect(); // Should cause an error.
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire.
-
- // Test for various error cases and abuse.
-
- var badListener = new WebInspector.EventListener(context);
- badListener.connect(data, data, data); // Should complain about non-callable callback.
- badListener.connect(null, KaboomEvent, kaboomCallback); // Should complain about non-callable callback.
- badListener.connect(emitter, KaboomEvent, null); // Should complain about non-callable callback.
- badListener.connect(emitter, null, kaboomCallback); // Should complain about null event.
-
- var badListener2 = new WebInspector.EventListener(context);
- badListener2.disconnect(); // Should complain about already disconnected.
- badListener2.connect(emitter, KaboomEvent, kaboomCallback);
- badListener2.connect(emitter, KaboomEvent, kaboomCallback); // Should complain about already connected.
- emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
- badListener2.connect(emitter, KaboomEvent, kaboomCallback); // Should complain about already connected.
- badListener2.disconnect();
- badListener2.disconnect(); // Should complain about already disconnected.
-
- InspectorTest.completeTest();
-}
-</script>
-</head>
-<body onload="runTest()">
- <p>Testing basic functionality of WebInspector.EventListener.</p>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersanonymousexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocollayerslayersanonymousexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-anonymous-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-anonymous-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-anonymous-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-anonymous-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+This is a test
+
+
+=== Enable the LayerTree agent ===
+
+PASS
+
+=== Get the Document ===
+
+PASS
+
+=== Get the layer tree ===
+
+PASS
+
+=== Check layers ===
+
+PASS: Expected number of anonymous layers.
+PASS: The sole anonymous layer has a non-zero node id.
+PASS: The sole anonymous layer has a :first-letter pseudo-element.
+
+=== Check node ===
+
+PASS: Node was found.
+PASS: Node has expected localName.
+PASS: Node has id.
+PASS: Node has expected id.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersanonymoushtmlfromrev188141trunkLayoutTestsinspectorprotocollayerslayersanonymoushtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-anonymous.html (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-anonymous.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-anonymous.html         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-anonymous.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,140 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script type="text/javascript">
+
+function test()
+{
+
+ var nodes;
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = setChildNodes;
+
+ enableLayerTreeAgent();
+
+ function enableLayerTreeAgent(result)
+ {
+ step({
+ name: "Enable the LayerTree agent",
+ command: "LayerTree.enable",
+ parameters: {},
+ callback: getDocument
+ });
+ };
+
+ function getDocument()
+ {
+ // We must first get the document so that later on we may get sensible nodeIds.
+ step({
+ name: "Get the Document",
+ command: "DOM.getDocument",
+ parameters: {},
+ callback: getLayerTree
+ });
+ };
+
+ function getLayerTree(result)
+ {
+ step({
+ name: "Get the layer tree",
+ command: "LayerTree.layersForNode",
+ parameters: {"nodeId": result.root.nodeId},
+ callback: gotLayerTree
+ });
+ };
+
+ function gotLayerTree(result)
+ {
+ var anonymousLayers = result.layers.filter(function (layer) {
+ return layer.isAnonymous;
+ });
+
+ logTestName("Check layers");
+
+ assert("Expected number of anonymous layers", anonymousLayers.length, 1);
+ assert("The sole anonymous layer has a non-zero node id", anonymousLayers[0].nodeId !== 0, true);
+ assert("The sole anonymous layer has a :first-letter pseudo-element", anonymousLayers[0].pseudoElement === "first-letter", true);
+
+ var node;
+ var nodeId = anonymousLayers[0].nodeId;
+ for (var i = 0, count = nodes.length; i < count; ++i) {
+ if (nodes[i].nodeId === nodeId) {
+ node = nodes[i];
+ break;
+ }
+ }
+
+ logTestName("Check node");
+
+ assert("Node was found", !!node, true);
+ assert("Node has expected localName", node.localName, "p");
+ assert("Node has id", node.attributes[0], "id");
+ assert("Node has expected id", node.attributes[1], "first-letter");
+
+ InspectorTest.completeTest();
+ };
+
+ function setChildNodes (messageObject) {
+ nodes = messageObject.params.nodes;
+ };
+
+ function step(test)
+ {
+ if (test.callback)
+ logTestName(test.name);
+ runCommand(test);
+ };
+
+ function logTestName(name)
+ {
+ InspectorTest.log("\n=== " + name + " ===\n");
+ };
+
+ function runCommand(command)
+ {
+ InspectorTest.sendCommand(command.command, command.parameters, function(messageObject) {
+ if (messageObject.hasOwnProperty("error")) {
+ InspectorTest.log("FAIL: " + messageObject.error.message + " (" + messageObject.error.code + ")");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ if (command.name)
+ InspectorTest.log("PASS");
+
+ if (command.callback)
+ command.callback(messageObject.result);
+ });
+ };
+
+ function assert(name, actual, expected)
+ {
+ if (expected === actual)
+ InspectorTest.log("PASS: " + name + ".");
+ else
+ InspectorTest.log("FAIL: " + name + ". Expected " + expected + " but got " + actual);
+ };
+
+};
+
+window.addEventListener("DOMContentLoaded", function()
+{
+ runTest();
+}, false);
+
+</script>
+<style type="text/css">
+
+ #first-letter::first-letter {
+ float: left;
+ -webkit-transform: translateZ(0);
+ }
+
+</style>
+</head>
+<body>
+
+ <p id="first-letter">This is a test</p>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersblendingcompositingreasonsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocollayerslayersblendingcompositingreasonsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-blending-compositing-reasons-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-blending-compositing-reasons-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-blending-compositing-reasons-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+
+=== Enable the LayerTree agent ===
+
+PASS
+
+=== Get the Document ===
+
+PASS
+
+=== Get the layer tree ===
+
+PASS
+
+=== Check layers' reasons for compositing ===
+
+PASS: <div id="isolating"> is composition due to isolating compositing descendants having CSS blending applied.
+PASS: <div id="blending"> is composited due having CSS blending applied and composited descendants.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersblendingcompositingreasonshtmlfromrev188141trunkLayoutTestsinspectorprotocollayerslayersblendingcompositingreasonshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-blending-compositing-reasons.html (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-blending-compositing-reasons.html         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-blending-compositing-reasons.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,163 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script type="text/javascript">
+
+function test()
+{
+
+ var nodes = [];
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = setChildNodes;
+
+ enableLayerTreeAgent();
+
+ function enableLayerTreeAgent(result)
+ {
+ step({
+ name: "Enable the LayerTree agent",
+ command: "LayerTree.enable",
+ parameters: {},
+ callback: getDocument
+ });
+ };
+
+ function getDocument()
+ {
+ // We must first get the document so that later on we may get sensible nodeIds.
+ step({
+ name: "Get the Document",
+ command: "DOM.getDocument",
+ parameters: {},
+ callback: getLayerTree
+ });
+ };
+
+ function getLayerTree(result)
+ {
+ step({
+ name: "Get the layer tree",
+ command: "LayerTree.layersForNode",
+ parameters: {"nodeId": result.root.nodeId},
+ callback: gotLayerTree
+ });
+ };
+
+ function gotLayerTree(result)
+ {
+ logTestName("Check layers' reasons for compositing")
+
+ var layers = result.layers;
+
+ var nodesById = {};
+ nodes.forEach(function(node) {
+ nodesById[node.nodeId] = node;
+ });
+
+ var count = 0;
+
+ function hasId(node, id) {
+ return node && node.attributes && node.attributes[0] === "id" && node.attributes[1] === id;
+ }
+
+ function dumpReasons(layer, compositingReasons) {
+ var node = nodesById[layer.nodeId];
+
+ if (hasId(node, "blending")) {
+ assert(
+ "<div id=\"blending\"> is composited due having CSS blending applied and composited descendants",
+ compositingReasons.blendingWithCompositedDescendants,
+ true);
+ } else if (hasId(node, "isolating")) {
+ assert(
+ "<div id=\"isolating\"> is composition due to isolating compositing descendants having CSS blending applied",
+ compositingReasons.isolatesCompositedBlendingDescendants,
+ true);
+ }
+
+ if (++count === layers.length)
+ InspectorTest.completeTest();
+ };
+
+ layers.forEach(function (layer) {
+ runCommand({
+ command: "LayerTree.reasonsForCompositingLayer",
+ parameters: {"layerId": layer.layerId},
+ callback: function(result) {
+ dumpReasons(layer, result.compositingReasons);
+ }
+ });
+ });
+ };
+
+ function setChildNodes (messageObject) {
+ messageObject.params.nodes.forEach(function (node) {
+ nodes.push(node);
+ })
+ };
+
+ function step(test)
+ {
+ if (test.callback)
+ logTestName(test.name);
+ runCommand(test);
+ };
+
+ function logTestName(name)
+ {
+ InspectorTest.log("\n=== " + name + " ===\n");
+ };
+
+ function runCommand(command)
+ {
+ InspectorTest.sendCommand(command.command, command.parameters, function(messageObject) {
+ InspectorTest.checkForError(messageObject);
+
+ if (command.name)
+ InspectorTest.log("PASS");
+
+ if (command.callback)
+ command.callback(messageObject.result);
+ });
+ };
+
+ function assert(name, actual, expected)
+ {
+ if (expected === actual)
+ InspectorTest.log("PASS: " + name + ".");
+ else
+ InspectorTest.log("FAIL: " + name + ". Expected " + expected + " but got " + actual);
+ };
+
+};
+
+window.addEventListener("DOMContentLoaded", function()
+{
+ runTest();
+}, false);
+
+</script>
+<style type="text/css">
+
+ #isolating {
+ isolation: isolate;
+ }
+
+ #blending {
+ mix-blend-mode: difference;
+ }
+
+ #composited {
+ -webkit-transform: translateZ(0);
+ }
+
+</style>
+</head>
+<body>
+ <div id="isolating">
+ <div id="blending">
+ <div id="composited"></div>
+ </div>
+ </div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayerscompositingreasonsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocollayerslayerscompositingreasonsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-compositing-reasons-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-compositing-reasons-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-compositing-reasons-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-compositing-reasons-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+
+=== Enable the LayerTree agent ===
+
+PASS
+
+=== Get the Document ===
+
+PASS
+
+=== Get the layer tree ===
+
+PASS
+
+=== Check layers' reasons for compositing ===
+
+PASS: <div id="opacity-container"> is composited due to having an opacity style and a composited child.
+PASS: <div id="child"> is composited due to having "backface-visibility: hidden" and a 3D transform.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayerscompositingreasonshtmlfromrev188141trunkLayoutTestsinspectorprotocollayerslayerscompositingreasonshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-compositing-reasons.html (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-compositing-reasons.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-compositing-reasons.html         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-compositing-reasons.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,166 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script type="text/javascript">
+
+function test()
+{
+
+ var nodes = [];
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = setChildNodes;
+
+ enableLayerTreeAgent();
+
+ function enableLayerTreeAgent(result)
+ {
+ step({
+ name: "Enable the LayerTree agent",
+ command: "LayerTree.enable",
+ parameters: {},
+ callback: getDocument
+ });
+ };
+
+ function getDocument()
+ {
+ // We must first get the document so that later on we may get sensible nodeIds.
+ step({
+ name: "Get the Document",
+ command: "DOM.getDocument",
+ parameters: {},
+ callback: getLayerTree
+ });
+ };
+
+ function getLayerTree(result)
+ {
+ step({
+ name: "Get the layer tree",
+ command: "LayerTree.layersForNode",
+ parameters: {"nodeId": result.root.nodeId},
+ callback: gotLayerTree
+ });
+ };
+
+ function gotLayerTree(result)
+ {
+ logTestName("Check layers' reasons for compositing")
+
+ var layers = result.layers;
+
+ var nodesById = {};
+ nodes.forEach(function(node) {
+ nodesById[node.nodeId] = node;
+ });
+
+ var count = 0;
+
+ function hasId(node, id) {
+ return node && node.attributes && node.attributes[0] === "id" && node.attributes[1] === id;
+ }
+
+ function dumpReasons(layer, compositingReasons) {
+ var node = nodesById[layer.nodeId];
+
+ if (hasId(node, "opacity-container")) {
+ assert(
+ "<div id=\"opacity-container\"> is composited due to having an opacity style and a composited child",
+ compositingReasons.opacityWithCompositedDescendants,
+ true);
+ } else if (hasId(node, "child")) {
+ assert(
+ "<div id=\"child\"> is composited due to having \"backface-visibility: hidden\" and a 3D transform",
+ compositingReasons.transform3D && compositingReasons.backfaceVisibilityHidden,
+ true);
+ }
+
+ if (++count === layers.length)
+ InspectorTest.completeTest();
+ };
+
+ layers.forEach(function (layer) {
+ runCommand({
+ command: "LayerTree.reasonsForCompositingLayer",
+ parameters: {"layerId": layer.layerId},
+ callback: function(result) {
+ dumpReasons(layer, result.compositingReasons);
+ }
+ });
+ });
+ };
+
+ function setChildNodes (messageObject) {
+ messageObject.params.nodes.forEach(function (node) {
+ nodes.push(node);
+ })
+ };
+
+ function step(test)
+ {
+ if (test.callback)
+ logTestName(test.name);
+ runCommand(test);
+ };
+
+ function logTestName(name)
+ {
+ InspectorTest.log("\n=== " + name + " ===\n");
+ };
+
+ function runCommand(command)
+ {
+ InspectorTest.sendCommand(command.command, command.parameters, function(messageObject) {
+ if (messageObject.hasOwnProperty("error")) {
+ InspectorTest.log("FAIL: " + messageObject.error.message + " (" + messageObject.error.code + ")");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ if (command.name)
+ InspectorTest.log("PASS");
+
+ if (command.callback)
+ command.callback(messageObject.result);
+ });
+ };
+
+ function assert(name, actual, expected)
+ {
+ if (expected === actual)
+ InspectorTest.log("PASS: " + name + ".");
+ else
+ InspectorTest.log("FAIL: " + name + ". Expected " + expected + " but got " + actual);
+ };
+
+};
+
+window.addEventListener("DOMContentLoaded", function()
+{
+ runTest();
+}, false);
+
+</script>
+<style type="text/css">
+
+ #opacity-container {
+ opacity: 0.5;
+ }
+
+ #child {
+ -webkit-backface-visibility: hidden;
+ -webkit-transform: translateZ(0);
+ }
+
+</style>
+</head>
+<body>
+
+ <div id="fixed"></div>
+
+ <div id="opacity-container">
+ <div id="child"></div>
+ </div>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersfornodeexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocollayerslayersfornodeexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-for-node-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-for-node-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-for-node-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-for-node-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,267 @@
</span><ins>+
+=== Enable the LayerTree agent ===
+
+PASS
+
+=== Get the Document ===
+
+PASS
+
+=== Get the initial layer tree ===
+
+PASS
+
+[
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 0,
+ "y": 0,
+ "width": "number",
+ "height": "number"
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": "number",
+ "height": "number"
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 25,
+ "y": 25,
+ "width": 50,
+ "height": 50
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 50,
+ "height": 50
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 50,
+ "y": 50,
+ "width": 50,
+ "height": 50
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 50,
+ "height": 50
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 200,
+ "y": 0,
+ "width": 100,
+ "height": 100
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 100,
+ "height": 100
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 225,
+ "y": 25,
+ "width": 50,
+ "height": 50
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 50,
+ "height": 50
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 0,
+ "y": 0,
+ "width": "number",
+ "height": "number"
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": "number",
+ "height": "number"
+ },
+ "paintCount": "number"
+ }
+]
+
+=== Message the page to add a new composited layer ===
+
+PASS
+
+=== Get the modified layer tree ===
+
+PASS
+
+[
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 0,
+ "y": 0,
+ "width": "number",
+ "height": "number"
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": "number",
+ "height": "number"
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 25,
+ "y": 25,
+ "width": 50,
+ "height": 50
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 50,
+ "height": 50
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 50,
+ "y": 50,
+ "width": 50,
+ "height": 50
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 50,
+ "height": 50
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 200,
+ "y": 0,
+ "width": 100,
+ "height": 100
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 100,
+ "height": 100
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 225,
+ "y": 25,
+ "width": 50,
+ "height": 50
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 50,
+ "height": 50
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 0,
+ "y": 0,
+ "width": "number",
+ "height": "number"
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": "number",
+ "height": "number"
+ },
+ "paintCount": "number"
+ },
+ {
+ "layerId": "string",
+ "nodeId": "number",
+ "bounds": {
+ "x": 25,
+ "y": 25,
+ "width": 50,
+ "height": 50
+ },
+ "memory": "number",
+ "compositedBounds": {
+ "x": 0,
+ "y": 0,
+ "width": 50,
+ "height": 50
+ },
+ "paintCount": "number"
+ }
+]
+
+=== Get attributes for the newly inserted node ===
+
+PASS
+
+=== Test complete, all expected conditions met ===
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersfornodehtmlfromrev188141trunkLayoutTestsinspectorprotocollayerslayersfornodehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-for-node.html (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-for-node.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-for-node.html         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-for-node.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,236 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script type="text/javascript">
+
+function addCompositedLayer()
+{
+ var element = document.createElement("div");
+ element.className = "composited";
+ element.id = "last-element";
+ document.body.appendChild(element);
+};
+
+function test()
+{
+ var documentNode;
+ var initialLayers;
+ var eventsCount = 0;
+
+ InspectorTest.eventHandler["LayerTree.layerTreeDidChange"] = function (messageObject) {
+ eventsCount++;
+ };
+
+ enableLayerTreeAgent();
+
+ function enableLayerTreeAgent(result)
+ {
+ step({
+ name: "Enable the LayerTree agent",
+ command: "LayerTree.enable",
+ parameters: {},
+ callback: getDocument
+ });
+ };
+
+ function getDocument(result)
+ {
+ step({
+ name: "Get the Document",
+ command: "DOM.getDocument",
+ parameters: {},
+ callback: getInitialLayerTree
+ });
+ };
+
+ function getInitialLayerTree(result)
+ {
+ documentNode = result.root;
+ step({
+ name: "Get the initial layer tree",
+ command: "LayerTree.layersForNode",
+ parameters: {"nodeId": documentNode.nodeId},
+ callback: gotInitialLayerTree
+ });
+ };
+
+ function gotInitialLayerTree(result)
+ {
+ initialLayers = result.layers;
+
+ dumpLayers(initialLayers);
+
+ step({
+ name: "Message the page to add a new composited layer",
+ command: "Runtime.evaluate",
+ parameters: {"expression": "addCompositedLayer()"},
+ callback: getModifiedLayerTree
+ });
+ };
+
+ function getModifiedLayerTree(result)
+ {
+ step({
+ name: "Get the modified layer tree",
+ command: "LayerTree.layersForNode",
+ parameters: {"nodeId": documentNode.nodeId},
+ callback: gotModifiedLayerTree
+ });
+ };
+
+ var layerCount = 0;
+
+ function gotModifiedLayerTree(result)
+ {
+ dumpLayers(result.layers);
+
+ var mutations = layerMutations(initialLayers, result.layers);
+ var newLayer = mutations.additions[0];
+
+ step({
+ name: "Get attributes for the newly inserted node",
+ command: "DOM.getAttributes",
+ parameters: {"nodeId": newLayer.nodeId},
+ callback: gotNodeAttributes
+ });
+ };
+
+ function gotNodeAttributes(result)
+ {
+ var attributes = attributesDictionaryFromArray(result.attributes);
+ if (attributes.id !== "last-element")
+ InspectorTest.log("FAIL: Did not obtain the expected element for the last inserted layer.");
+
+ finishTest();
+ };
+
+ function finishTest()
+ {
+ if (!eventsCount)
+ InspectorTest.log("FAIL: Did not receive layerTreeDidChange events.");
+ else
+ InspectorTest.log("\n=== Test complete, all expected conditions met ===");
+
+ InspectorTest.completeTest();
+ };
+
+ function layerMutations(oldLayers, newLayers)
+ {
+ function layerIdMap(layer) {
+ return layer.layerId;
+ }
+
+ var oldLayerIds = oldLayers.map(layerIdMap);
+ var newLayerIds = newLayers.map(layerIdMap);
+
+ return {
+ additions: newLayers.filter(function (layer) {
+ return (oldLayerIds.indexOf(layer.layerId) === -1);
+ }),
+ removals: oldLayers.filter(function (layer) {
+ return (newLayerIds.indexOf(layer.layerId) === -1);
+ })
+ };
+ };
+
+ function attributesDictionaryFromArray(attributes)
+ {
+ var dictionary = {}
+ for (var i = 0, count = attributes.length; i < count; i += 2) {
+ dictionary[attributes[i]] = attributes[i + 1];
+ }
+ return dictionary;
+ };
+
+ function dumpLayers(layers)
+ {
+ function replacer(key, value)
+ {
+ if (key === "layerId" || key === "nodeId" || key === "memory" || key === "paintCount")
+ return typeof(value);
+
+ // some values differ based on port, but the ones we most
+ // care about will always be less or equal 100.
+ if ((key === "width" || key === "height") && value > 100)
+ return typeof(value);
+
+ return value;
+ };
+
+ InspectorTest.log("\n" + JSON.stringify(layers, replacer, " "));
+ };
+
+ function step(test)
+ {
+ InspectorTest.log("\n=== " + test.name + " ===\n")
+ InspectorTest.sendCommand(test.command, test.parameters, function(messageObject) {
+ if (messageObject.hasOwnProperty("error")) {
+ InspectorTest.log("FAIL: " + messageObject.error.message + " (" + messageObject.error.code + ")");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ InspectorTest.log("PASS");
+ test.callback(messageObject.result);
+ });
+ };
+
+ function assert(name, actual, expected)
+ {
+ if (expected === actual)
+ InspectorTest.log("PASS: " + name + ".");
+ else
+ InspectorTest.log("FAIL: " + name + ". Expected " + expected + " but got " + actual);
+ };
+
+};
+
+window.addEventListener("DOMContentLoaded", function () {
+ runTest();
+}, false);
+
+</script>
+<style type="text/css">
+
+ div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ }
+
+ .regular {
+ width: 100px;
+ height: 100px;
+ background-color: black;
+ }
+
+ .composited {
+ top: 25px;
+ left: 25px;
+ width: 50px;
+ height: 50px;
+ background-color: blue;
+ -webkit-transform: translateZ(0);
+ }
+
+ .offset {
+ left: 200px;
+ -webkit-transform: translateZ(0);
+ }
+
+</style>
+</head>
+<body>
+
+ <div class="regular"></div>
+
+ <div class="composited">
+ <div class="composited"></div>
+ </div>
+
+ <div class="regular offset">
+ <div class="composited"></div>
+ </div>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersgeneratedcontentexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocollayerslayersgeneratedcontentexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-generated-content-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-generated-content-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-generated-content-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-generated-content-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+
+=== Enable the LayerTree agent ===
+
+PASS
+
+=== Get the Document ===
+
+PASS
+
+=== Get the layer tree ===
+
+PASS
+
+=== Check layers ===
+
+PASS: Expected number of ::before layers.
+PASS: The sole ::before layer has a pseudo element.
+PASS: Expected number of ::after layers.
+PASS: The first ::after layer has a pseudo element.
+PASS: The second ::after layer has a pseudo element.
+PASS: The second ::after layer is a reflection.
+PASS: The two ::after layers have the same node id.
+PASS: The two ::after layers have the same pseudo element id.
+PASS: The non-reflection generated generated layers have the same node id.
+PASS: The non-reflection generated layers have different pseudo element ids.
+
+=== Check generating node ===
+
+PASS: Generating node was found.
+PASS: Generating node has expected localName.
+PASS: Generating node has id.
+PASS: Generating node has expected id.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersgeneratedcontenthtmlfromrev188141trunkLayoutTestsinspectorprotocollayerslayersgeneratedcontenthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-generated-content.html (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-generated-content.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-generated-content.html         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-generated-content.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,166 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script type="text/javascript">
+
+function test()
+{
+
+ var nodes;
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = setChildNodes;
+
+ enableLayerTreeAgent();
+
+ function enableLayerTreeAgent(result)
+ {
+ step({
+ name: "Enable the LayerTree agent",
+ command: "LayerTree.enable",
+ parameters: {},
+ callback: getDocument
+ });
+ };
+
+ function getDocument()
+ {
+ // We must first get the document so that later on we may get sensible nodeIds.
+ step({
+ name: "Get the Document",
+ command: "DOM.getDocument",
+ parameters: {},
+ callback: getLayerTree
+ });
+ };
+
+ function getLayerTree(result)
+ {
+ step({
+ name: "Get the layer tree",
+ command: "LayerTree.layersForNode",
+ parameters: {"nodeId": result.root.nodeId},
+ callback: gotLayerTree
+ });
+ };
+
+ function gotLayerTree(result)
+ {
+ var beforeLayers = [];
+ var afterLayers = [];
+ result.layers.forEach(function (layer) {
+ if (!layer.isGeneratedContent)
+ return;
+
+ if (layer.pseudoElement === "before")
+ beforeLayers.push(layer);
+ if (layer.pseudoElement === "after")
+ afterLayers.push(layer);
+ });
+
+ logTestName("Check layers");
+
+ assert("Expected number of ::before layers", beforeLayers.length, 1);
+ assert("The sole ::before layer has a pseudo element", beforeLayers[0].pseudoElementId !== "", true);
+
+ assert("Expected number of ::after layers", afterLayers.length, 2);
+ assert("The first ::after layer has a pseudo element", afterLayers[0].pseudoElementId !== "", true);
+ assert("The second ::after layer has a pseudo element", afterLayers[1].pseudoElementId !== "", true);
+ assert("The second ::after layer is a reflection", afterLayers[1].isReflection, true);
+ assert("The two ::after layers have the same node id", afterLayers[0].nodeId, afterLayers[1].nodeId);
+ assert("The two ::after layers have the same pseudo element id", afterLayers[0].pseudoElementId, afterLayers[1].pseudoElementId);
+
+ assert("The non-reflection generated generated layers have the same node id", beforeLayers[0].nodeId, afterLayers[0].nodeId);
+ assert("The non-reflection generated layers have different pseudo element ids", beforeLayers[0].pseudoElementId !== afterLayers[0].pseudoElementId, true);
+
+ var node;
+ var nodeId = beforeLayers[0].nodeId;
+ for (var i = 0, count = nodes.length; i < count; ++i) {
+ if (nodes[i].nodeId === nodeId) {
+ node = nodes[i];
+ break;
+ }
+ }
+
+ logTestName("Check generating node");
+
+ assert("Generating node was found", !!node, true);
+ assert("Generating node has expected localName", node.localName, "div");
+ assert("Generating node has id", node.attributes[0], "id");
+ assert("Generating node has expected id", node.attributes[1], "generator");
+
+ InspectorTest.completeTest();
+ };
+
+ function setChildNodes (messageObject) {
+ nodes = messageObject.params.nodes;
+ };
+
+ function step(test)
+ {
+ if (test.callback)
+ logTestName(test.name);
+ runCommand(test);
+ };
+
+ function logTestName(name)
+ {
+ InspectorTest.log("\n=== " + name + " ===\n");
+ };
+
+ function runCommand(command)
+ {
+ InspectorTest.sendCommand(command.command, command.parameters, function(messageObject) {
+ if (messageObject.hasOwnProperty("error")) {
+ InspectorTest.log("FAIL: " + messageObject.error.message + " (" + messageObject.error.code + ")");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ if (command.name)
+ InspectorTest.log("PASS");
+
+ if (command.callback)
+ command.callback(messageObject.result);
+ });
+ };
+
+ function assert(name, actual, expected)
+ {
+ if (expected === actual)
+ InspectorTest.log("PASS: " + name + ".");
+ else
+ InspectorTest.log("FAIL: " + name + ". Expected " + expected + " but got " + actual);
+ };
+
+};
+
+window.addEventListener("DOMContentLoaded", function()
+{
+ runTest();
+}, false);
+
+</script>
+<style type="text/css">
+
+ #generator::before,
+ #generator::after {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ background-color: black;
+ -webkit-transform: translateZ(0);
+ content: "";
+ }
+
+ #generator::after {
+ -webkit-box-reflect:below 1px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.5, transparent), to(white));
+ }
+
+</style>
+</head>
+<body>
+
+ <div id="generator"></div>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersreflectedcontentexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocollayerslayersreflectedcontentexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-reflected-content-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-reflected-content-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-reflected-content-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-reflected-content-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+
+=== Enable the LayerTree agent ===
+
+PASS
+
+=== Get the Document ===
+
+PASS
+
+=== Get the layer tree ===
+
+PASS
+
+=== Check layers ===
+
+PASS: Expected number of reflected layers.
+PASS: First reflected layer has a node.
+
+=== Check reflected node ===
+
+PASS: Node for layer was found.
+PASS: Node has expected localName.
+PASS: Node has expected number of attributes.
+PASS: Node has CSS class.
+PASS: Node has expected CSS class.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorlayerslayersreflectedcontenthtmlfromrev188141trunkLayoutTestsinspectorprotocollayerslayersreflectedcontenthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/layers/layers-reflected-content.html (from rev 188141, trunk/LayoutTests/inspector-protocol/layers/layers-reflected-content.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/layers/layers-reflected-content.html         (rev 0)
+++ trunk/LayoutTests/inspector/layers/layers-reflected-content.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,149 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script type="text/javascript">
+
+function test()
+{
+
+ var nodes;
+
+ InspectorTest.eventHandler["DOM.setChildNodes"] = setChildNodes;
+
+ enableLayerTreeAgent();
+
+ function enableLayerTreeAgent(result)
+ {
+ step({
+ name: "Enable the LayerTree agent",
+ command: "LayerTree.enable",
+ parameters: {},
+ callback: getDocument
+ });
+ };
+
+ function getDocument()
+ {
+ // We must first get the document so that later on we may get sensible nodeIds.
+ step({
+ name: "Get the Document",
+ command: "DOM.getDocument",
+ parameters: {},
+ callback: getLayerTree
+ });
+ };
+
+ function getLayerTree(result)
+ {
+ step({
+ name: "Get the layer tree",
+ command: "LayerTree.layersForNode",
+ parameters: {"nodeId": result.root.nodeId},
+ callback: gotLayerTree
+ });
+ };
+
+ function gotLayerTree(result)
+ {
+ var reflectedLayers = result.layers.filter(function(layer) {
+ return layer.isReflection;
+ });
+
+ logTestName("Check layers");
+
+ assert("Expected number of reflected layers", reflectedLayers.length, 1);
+ assert("First reflected layer has a node", reflectedLayers[0].nodeId > 0, true);
+
+
+ logTestName("Check reflected node");
+
+ var node;
+ var nodeId = reflectedLayers[0].nodeId;
+ for (var i = 0, count = nodes.length; i < count; ++i) {
+ if (nodes[i].nodeId === nodeId) {
+ node = nodes[i];
+ break;
+ }
+ }
+
+ assert("Node for layer was found", !!node, true);
+ assert("Node has expected localName", node.localName, "div");
+ assert("Node has expected number of attributes", node.attributes.length, 2);
+ assert("Node has CSS class", node.attributes[0], "class");
+ assert("Node has expected CSS class", node.attributes[1], "reflected composited");
+
+ InspectorTest.completeTest();
+ };
+
+ function setChildNodes (messageObject) {
+ nodes = messageObject.params.nodes;
+ };
+
+ function step(test)
+ {
+ if (test.callback)
+ logTestName(test.name);
+ runCommand(test);
+ };
+
+ function logTestName(name)
+ {
+ InspectorTest.log("\n=== " + name + " ===\n");
+ };
+
+ function runCommand(command)
+ {
+ InspectorTest.sendCommand(command.command, command.parameters, function(messageObject) {
+ if (messageObject.hasOwnProperty("error")) {
+ InspectorTest.log("FAIL: " + messageObject.error.message + " (" + messageObject.error.code + ")");
+ InspectorTest.completeTest();
+ return;
+ }
+
+ if (command.name)
+ InspectorTest.log("PASS");
+
+ if (command.callback)
+ command.callback(messageObject.result);
+ });
+ };
+
+ function assert(name, actual, expected)
+ {
+ if (expected === actual)
+ InspectorTest.log("PASS: " + name + ".");
+ else
+ InspectorTest.log("FAIL: " + name + ". Expected " + expected + " but got " + actual);
+ };
+
+};
+
+window.addEventListener("DOMContentLoaded", function()
+{
+ runTest();
+}, false);
+
+</script>
+<style type="text/css">
+
+ .reflected {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ background-color: black;
+ -webkit-box-reflect: below;
+ }
+
+ .composited {
+ -webkit-transform: translateZ(0);
+ }
+
+</style>
+</head>
+<body>
+
+ <div class="reflected"></div>
+ <div class="reflected composited"></div>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpagearchiveexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolpagearchiveexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/archive-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/page/archive-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/archive-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/page/archive-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+PASS: Received archive data.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpagearchivehtmlfromrev188141trunkLayoutTestsinspectorprotocolpagearchivehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/archive.html (from rev 188141, trunk/LayoutTests/inspector-protocol/page/archive.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/archive.html         (rev 0)
+++ trunk/LayoutTests/inspector/page/archive.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ InspectorTest.sendCommand("Page.enable", {});
+ InspectorTest.sendCommand("Page.archive", {}, function(event) {
+ var data = event.result.data;
+ if (!data)
+ InspectorTest.log("FAIL: no data");
+ else if (data.length < 1000)
+ InspectorTest.log("FAIL: unexpectedly short data. A serialized archive should be pretty large.");
+ else
+ InspectorTest.log("PASS: Received archive data.");
+
+ InspectorTest.completeTest();
+ });
+}
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpageframeScheduledNavigationexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolpageframeScheduledNavigationexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/frameScheduledNavigation-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/page/frameScheduledNavigation-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/frameScheduledNavigation-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/page/frameScheduledNavigation-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+Scheduled navigation with delay 0
+Started loading
+Cleared scheduled navigation
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpageframeScheduledNavigationhtmlfromrev188141trunkLayoutTestsinspectorprotocolpageframeScheduledNavigationhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/frameScheduledNavigation.html (from rev 188141, trunk/LayoutTests/inspector-protocol/page/frameScheduledNavigation.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/frameScheduledNavigation.html         (rev 0)
+++ trunk/LayoutTests/inspector/page/frameScheduledNavigation.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+
+function load()
+{
+ document.querySelector("iframe").src = "resources/blank.html";
+}
+
+function test()
+{
+ InspectorTest.eventHandler["Page.frameScheduledNavigation"] = onScheduled;
+ InspectorTest.eventHandler["Page.frameStartedLoading"] = onStarted;
+ InspectorTest.eventHandler["Page.frameClearedScheduledNavigation"] = onCleared;
+ InspectorTest.sendCommand("Page.enable", {});
+
+ function onScheduled(msg)
+ {
+ InspectorTest.log("Scheduled navigation with delay " + msg.params.delay);
+ }
+
+ function onStarted(msg)
+ {
+ // This event should be received before the scheduled navigation is cleared.
+ InspectorTest.log("Started loading");
+ }
+
+ function onCleared(msg)
+ {
+ InspectorTest.log("Cleared scheduled navigation");
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "load()" });
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<iframe>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpageframeStartedLoadingexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolpageframeStartedLoadingexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/frameStartedLoading-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/page/frameStartedLoading-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/frameStartedLoading-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/page/frameStartedLoading-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+Started loading
+Stopped loading
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpageframeStartedLoadinghtmlfromrev188141trunkLayoutTestsinspectorprotocolpageframeStartedLoadinghtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/frameStartedLoading.html (from rev 188141, trunk/LayoutTests/inspector-protocol/page/frameStartedLoading.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/frameStartedLoading.html         (rev 0)
+++ trunk/LayoutTests/inspector/page/frameStartedLoading.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+
+function load()
+{
+ var frame = document.createElement("iframe");
+ frame.src = "resources/blank.html";
+ document.body.appendChild(frame);
+}
+
+function test()
+{
+ InspectorTest.eventHandler["Page.frameStartedLoading"] = onStart;
+ InspectorTest.eventHandler["Page.frameStoppedLoading"] = onStop;
+ InspectorTest.sendCommand("Page.enable", {});
+
+ function onStart()
+ {
+ InspectorTest.log("Started loading");
+ }
+ function onStop()
+ {
+ InspectorTest.log("Stopped loading");
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "load()" });
+}
+
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpagejavascriptDialogEventsexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolpagejavascriptDialogEventsexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/javascriptDialogEvents-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/page/javascriptDialogEvents-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/javascriptDialogEvents-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/page/javascriptDialogEvents-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+CONFIRM NAVIGATION: beforeunload in javascriptDialogEvents
+ALERT: alert
+CONFIRM: confirm
+PROMPT: prompt, default text:
+Opening with message: beforeunload in javascriptDialogEvents
+Closed
+Opening with message: alert
+Closed
+Opening with message: confirm
+Closed
+Opening with message: prompt
+Closed
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpagejavascriptDialogEventshtmlfromrev188141trunkLayoutTestsinspectorprotocolpagejavascriptDialogEventshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/javascriptDialogEvents.html (from rev 188141, trunk/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/javascriptDialogEvents.html         (rev 0)
+++ trunk/LayoutTests/inspector/page/javascriptDialogEvents.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+
+window.addEventListener("beforeunload", onBeforeUnload);
+
+function onBeforeUnload()
+{
+ window.removeEventListener("beforeunload", onBeforeUnload);
+ return "beforeunload in javascriptDialogEvents";
+}
+
+function test()
+{
+ InspectorTest.eventHandler["Page.javascriptDialogOpening"] = onOpening;
+ InspectorTest.eventHandler["Page.javascriptDialogClosed"] = onClosed;
+ InspectorTest.sendCommand("Page.enable", {});
+
+ function onOpening(event)
+ {
+ InspectorTest.log("Opening with message: " + event.params.message);
+ }
+ function onClosed()
+ {
+ InspectorTest.log("Closed");
+ }
+
+ InspectorTest.sendCommand("Page.navigate", { "url": "nosuchurl" });
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "alert('alert')" });
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "confirm('confirm')" });
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "prompt('prompt')" }, onDone);
+
+ function onDone()
+ {
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpageresourcesblankhtmlfromrev188141trunkLayoutTestsinspectorprotocolpageresourcesblankhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/resources/blank.html (from rev 188141, trunk/LayoutTests/inspector-protocol/page/resources/blank.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/resources/blank.html         (rev 0)
+++ trunk/LayoutTests/inspector/page/resources/blank.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+<html>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpagesetEmulatedMediaexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolpagesetEmulatedMediaexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/setEmulatedMedia-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/page/setEmulatedMedia-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/setEmulatedMedia-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/page/setEmulatedMedia-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+CONSOLE MESSAGE: line 7: ReferenceError: Can't find variable: objectThatDoesNotExist
+CONSOLE MESSAGE: line 7: ReferenceError: Can't find variable: objectThatDoesNotExist
+Test that uncaught exception in MediaQueryListListener will be reported to the console. On success you should see two exceptions in the listener logged to the console (first time when the media type is overridden and second - when they are restored). Bug 105162.
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorpagesetEmulatedMediahtmlfromrev188141trunkLayoutTestsinspectorprotocolpagesetEmulatedMediahtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/page/setEmulatedMedia.html (from rev 188141, trunk/LayoutTests/inspector-protocol/page/setEmulatedMedia.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/page/setEmulatedMedia.html         (rev 0)
+++ trunk/LayoutTests/inspector/page/setEmulatedMedia.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+var theMediaQueryList = window.matchMedia("print");
+theMediaQueryList.addListener(function(aMediaQueryList) {
+ objectThatDoesNotExist.produceError();
+});
+
+function test()
+{
+ InspectorTest.sendCommand("Page.enable", {});
+ InspectorTest.sendCommand("Page.setEmulatedMedia", {"media": "print"}, function(messageObject) {
+ if (messageObject.error)
+ InspectorTest.log("FAILED: " + messageObject.error.message);
+ InspectorTest.sendCommand("Page.disable", {});
+ InspectorTest.completeTest();
+ });
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Test that uncaught exception in MediaQueryListListener will be reported to the console. On success you should see two exceptions in the listener logged to the console (first time when the media type is overridden and second - when they are restored). <a href="https://bugs.webkit.org/show_bug.cgi?id=105162">Bug 105162.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocolprotocolpromiseresultexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolpromiseresultexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/protocol/protocol-promise-result-expected.txt (from rev 188141, trunk/LayoutTests/inspector/protocol-promise-result-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/protocol/protocol-promise-result-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/protocol/protocol-promise-result-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Testing that the inspector backend can return command results using promises.
+
+Using a callback, got RuntimeAgent.evaluate() result: 41
+Setting up two promises for RuntimeAgent.evaluate.
+Using a promise, got RuntimeAgent.evaluate() result: 42
+Using a promise, got RuntimeAgent.evaluate() result: 43
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocolprotocolpromiseresulthtmlfromrev188141trunkLayoutTestsinspectorprotocolpromiseresulthtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/protocol/protocol-promise-result.html (from rev 188141, trunk/LayoutTests/inspector/protocol-promise-result.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/protocol/protocol-promise-result.html         (rev 0)
+++ trunk/LayoutTests/inspector/protocol/protocol-promise-result.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script>
+function test()
+{
+ var c1 = RuntimeAgent.evaluate("41", function(err, result, wasThrown) {
+ InspectorTest.log("Using a callback, got RuntimeAgent.evaluate() result: " + result.value);
+
+ InspectorTest.log("Setting up two promises for RuntimeAgent.evaluate.");
+
+ var p1 = RuntimeAgent.evaluate.promise("42");
+ var p2 = RuntimeAgent.evaluate("43");
+
+ InspectorTest.assert(!(c1 instanceof Promise), "A promise was returned even though a callback was supplied to the command!");
+
+ p1.then(function(payload) {
+ InspectorTest.log("Using a promise, got RuntimeAgent.evaluate() result: " + payload.result.value);
+ });
+ p2.then(function(payload) {
+ InspectorTest.log("Using a promise, got RuntimeAgent.evaluate() result: " + payload.result.value);
+ });
+
+ Promise.all([p1, p2]).then(function() {
+ InspectorTest.completeTest();
+ }).catch(function(error) {
+ InspectorTest.log("ERROR: " + error);
+ InspectorTest.completeTest();
+ })
+ });
+}
+</script>
+</head>
+<body onload="runTest()">
+ <p>Testing that the inspector backend can return command results using promises.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocolpromiseresultexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/protocol-promise-result-expected.txt (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/protocol-promise-result-expected.txt        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/protocol-promise-result-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-Testing that the inspector backend can return command results using promises.
-
-Using a callback, got RuntimeAgent.evaluate() result: 41
-Setting up two promises for RuntimeAgent.evaluate.
-Using a promise, got RuntimeAgent.evaluate() result: 42
-Using a promise, got RuntimeAgent.evaluate() result: 43
-
</del></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocolpromiseresulthtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/protocol-promise-result.html (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/protocol-promise-result.html        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/protocol-promise-result.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-<!doctype html>
-<html>
-<head>
-<script type="text/javascript" src="../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function test()
-{
- var c1 = RuntimeAgent.evaluate("41", function(err, result, wasThrown) {
- InspectorTest.log("Using a callback, got RuntimeAgent.evaluate() result: " + result.value);
-
- InspectorTest.log("Setting up two promises for RuntimeAgent.evaluate.");
-
- var p1 = RuntimeAgent.evaluate.promise("42");
- var p2 = RuntimeAgent.evaluate("43");
-
- InspectorTest.assert(!(c1 instanceof Promise), "A promise was returned even though a callback was supplied to the command!");
-
- p1.then(function(payload) {
- InspectorTest.log("Using a promise, got RuntimeAgent.evaluate() result: " + payload.result.value);
- });
- p2.then(function(payload) {
- InspectorTest.log("Using a promise, got RuntimeAgent.evaluate() result: " + payload.result.value);
- });
-
- Promise.all([p1, p2]).then(function() {
- InspectorTest.completeTest();
- }).catch(function(error) {
- InspectorTest.log("ERROR: " + error);
- InspectorTest.completeTest();
- })
- });
-}
-</script>
-</head>
-<body onload="runTest()">
- <p>Testing that the inspector backend can return command results using promises.</p>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsinspectorruntimegetPropertiesexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolruntimegetPropertiesexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/runtime/getProperties-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/runtime/getProperties-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/runtime/getProperties-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/runtime/getProperties-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+
+== Running test suite: Runtime.getProperties
+-- Running test case: CheckPropertiesOfWrapperObject
+Evaluating expression: (function(){var r = Object(5); r.foo = 'cat';return r;})()
+Properties:
+ __proto__ object Number
+ foo string cat
+
+-- Running test case: CheckPropertiesOfArray
+Evaluating expression: ['red', 'green', 'blue']
+Properties:
+ __proto__ object Array
+ 0 string red
+ 1 string green
+ 2 string blue
+ length number 3
+
+-- Running test case: CheckPropertiesOfBoundConstructor
+Evaluating expression: Number.bind({}, 5)
+Properties:
+ __proto__ function function () {
+ [native code]
+}
+ arguments
+ caller
+ length number 0
+ name string Number
+Internal properties:
+ boundArgs object Array
+ boundThis object Object
+ targetFunction function function Number() {
+ [native code]
+}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorruntimegetPropertieshtmlfromrev188141trunkLayoutTestsinspectorprotocolruntimegetPropertieshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/runtime/getProperties.html (from rev 188141, trunk/LayoutTests/inspector-protocol/runtime/getProperties.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/runtime/getProperties.html         (rev 0)
+++ trunk/LayoutTests/inspector/runtime/getProperties.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,93 @@
</span><ins>+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ var suite = new InspectorTest.AsyncTestSuite("Runtime.getProperties");
+
+ addGetPropertiesTestCase({
+ name: "CheckPropertiesOfWrapperObject",
+ description: "Check properties of `Object(5)`.",
+ expression: "(function(){var r = Object(5); r.foo = 'cat';return r;})()",
+ });
+
+ addGetPropertiesTestCase({
+ name: "CheckPropertiesOfArray",
+ description: "Check properties of `['red', 'green', 'blue']`.",
+ expression: "['red', 'green', 'blue']",
+ });
+
+ addGetPropertiesTestCase({
+ name: "CheckPropertiesOfBoundConstructor",
+ description: "Check properties of a bound function (has a bunch of internal properties).",
+ expression: "Number.bind({}, 5)",
+ });
+
+ suite.runTestCasesAndFinish();
+
+ function addGetPropertiesTestCase(args) {
+ var {name, description, expression} = args;
+
+ suite.addTestCase({
+ name,
+ description,
+ test: function(resolve, reject) {
+ InspectorTest.log("Evaluating expression: " + expression);
+ InspectorTest.awaitCommand({
+ method: "Runtime.evaluate",
+ params: {expression}
+ })
+ .then(function(reply) {
+ var objectId = reply.result.objectId;
+ if (objectId === undefined)
+ throw new Error("objectId is expected");
+
+ return InspectorTest.awaitCommand({
+ method: "Runtime.getProperties",
+ params: {objectId, ownProperties: true}
+ });
+ })
+ .then(function(reply) {
+ dumpGetPropertiesResult(reply);
+ resolve();
+ })
+ .catch(reject);
+ }
+ });
+ }
+
+ // A helper function that dumps object properties and internal properties in sorted order.
+ function dumpGetPropertiesResult(protocolResult) {
+ var properties = protocolResult.result;
+ if (properties) {
+ InspectorTest.log("Properties:");
+ properties.sort(NamedThingComparator);
+ properties.map(dumpSingleProperty);
+ }
+
+ var internalProperties = protocolResult.internalProperties;
+ if (internalProperties) {
+ InspectorTest.log("Internal properties:");
+ internalProperties.sort(NamedThingComparator);
+ internalProperties.map(dumpSingleProperty);
+ }
+
+ function dumpSingleProperty(property) {
+ var {name, value} = property;
+ if (value)
+ InspectorTest.log(" " + name + " " + value.type + " " + (value.value || value.description));
+ else
+ InspectorTest.log(" " + name);
+ }
+
+ function NamedThingComparator(o1, o2) {
+ return o1.name.localeCompare(o2.name);
+ }
+ }
+}
+</script>
+</head>
+<body onLoad="runTest()">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectortestharnesstriviallyworksexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/test-harness-trivially-works-expected.txt (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/test-harness-trivially-works-expected.txt        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/test-harness-trivially-works-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,4 +0,0 @@
</span><del>-Tests that the test harness for non-stub inspector tests can load and run a test.
-
-Logged a message from the inspector page.
-
</del></span></pre></div>
<a id="trunkLayoutTestsinspectortestharnesstriviallyworkshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/inspector/test-harness-trivially-works.html (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/test-harness-trivially-works.html        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/inspector/test-harness-trivially-works.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-<html>
-<head>
-<script type="text/javascript" src="../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function test()
-{
- InspectorTest.log("Logged a message from the inspector page.");
- InspectorTest.completeTest();
-}
-</script>
-</head>
-<body onload="runTest()">
-<p>Tests that the test harness for non-stub inspector tests can load and run a test.</p>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsasynctestsuiteexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolasynctestsuiteexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/async-test-suite-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/async-test-suite-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/async-test-suite-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/async-test-suite-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+PASS: instantiating AsyncTestSuite requires name argument.
+PASS: instantiating AsyncTestSuite requires string name argument.
+PASS: should not be able to add empty test case.
+PASS: should not be able to add non-object test case.
+PASS: test case should require string name.
+PASS: test case should require test function.
+PASS: should not be able to run empty test suite.
+
+== Running test suite: AsyncTestSuite.RunTwiceSuite
+PASS: should not be able to run a test suite twice.
+-- Running test case: DummyTest0
+
+== Running test suite: AsyncTestSuite.SequentialExecution
+PASS: AsyncTestSuite.RunTestCases() should return a Promise.
+-- Running test case: DummyTest1
+-- Running test case: DummyTest2
+-- Running test case: DummyTest3
+-- Running test case: FailingTest4
+!! EXCEPTION: [object Object]
+PASS: Promise from sequentialExecutionSuite.runTestCases() should reject when a test case fails.
+PASS: Promise from sequentialExecutionSuite.runTestCases() should reject without altering its result value.
+PASS: sequentialExecutionSuite should have executed four tests.
+PASS: sequentialExecutionSuite should have passed three tests.
+PASS: sequentialExecutionSuite should have failed 1 test.
+PASS: sequentialExecutionSuite should have skipped zero tests.
+
+== Running test suite: AsyncTestSuite.AbortOnFailure
+-- Running test case: PassingTest5
+-- Running test case: FailingTest6
+!! EXCEPTION: {"token":666}
+PASS: Promise from abortOnFailureSuite.runTestCases() should reject when a test case fails.
+PASS: Promise from abortOnFailureSuite.runTestCases() should reject without altering its result value.
+PASS: abortOnFailureSuite should have executed two tests.
+PASS: abortOnFailureSuite should have passed one test.
+PASS: abortOnFailureSuite should have failed one test.
+PASS: abortOnFailureSuite should have skipped one test.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsasynctestsuitehtmlfromrev188141trunkLayoutTestsinspectorprotocolasynctestsuitehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/async-test-suite.html (from rev 188141, trunk/LayoutTests/inspector-protocol/async-test-suite.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/async-test-suite.html         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/async-test-suite.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,179 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ try {
+ new InspectorTest.AsyncTestSuite();
+ InspectorTest.log("FAIL: instantiating AsyncTestSuite requires name argument.");
+ } catch (e) {
+ InspectorTest.log("PASS: instantiating AsyncTestSuite requires name argument.");
+ }
+
+ try {
+ new InspectorTest.AsyncTestSuite({});
+ InspectorTest.log("FAIL: instantiating AsyncTestSuite requires string name argument.");
+ } catch (e) {
+ InspectorTest.log("PASS: instantiating AsyncTestSuite requires string name argument.");
+ }
+
+ var badArgsSuite = new InspectorTest.AsyncTestSuite("dummy");
+ try {
+ badArgsSuite.addTestCase();
+ InspectorTest.log("FAIL: should not be able to add empty test case.");
+ } catch (e) {
+ InspectorTest.log("PASS: should not be able to add empty test case.");
+ }
+ try {
+ badArgsSuite.addTestCase("string");
+ InspectorTest.log("FAIL: should not be able to add non-object test case.");
+ } catch (e) {
+ InspectorTest.log("PASS: should not be able to add non-object test case.");
+ }
+ try {
+ badArgsSuite.addTestCase({
+ name: {},
+ test: function() {},
+ });
+ InspectorTest.log("FAIL: test case should require string name.");
+ } catch (e) {
+ InspectorTest.log("PASS: test case should require string name.");
+ }
+ try {
+ badArgsSuite.addTestCase({
+ name: "foo",
+ test: null,
+ });
+ InspectorTest.log("FAIL: test case should require test function.");
+ } catch (e) {
+ InspectorTest.log("PASS: test case should require test function.");
+ }
+
+ var runEmptySuite = new InspectorTest.AsyncTestSuite("AsyncTestSuite.RunEmptySuite");
+ try {
+ runEmptySuite.runTestCases();
+ InspectorTest.log("FAIL: should not be able to run empty test suite.");
+ } catch (e) {
+ InspectorTest.log("PASS: should not be able to run empty test suite.");
+ }
+
+ var runTwiceSuite = new InspectorTest.AsyncTestSuite("AsyncTestSuite.RunTwiceSuite");
+ runTwiceSuite.addTestCase({
+ name: "DummyTest0",
+ description: "Check that a suite can't run more than once.",
+ test: function(resolve, reject) {
+ resolve();
+ }
+ });
+
+ var result = runTwiceSuite.runTestCases();
+ try {
+ // Test cases won't run in this event loop; this call should still throw.
+ // Later tests are chained to this suite to avoid nondeterminism.
+ runTwiceSuite.runTestCases();
+ InspectorTest.log("FAIL: should not be able to run a test suite twice.");
+ } catch (e) {
+ InspectorTest.log("PASS: should not be able to run a test suite twice.");
+ }
+
+ var rejectToken = {"token": 666};
+ var thrownError = new Error(rejectToken);
+
+ var sequentialExecutionSuite = new InspectorTest.AsyncTestSuite("AsyncTestSuite.SequentialExecution");
+ sequentialExecutionSuite.addTestCase({
+ name: "DummyTest1",
+ description: "Check test case execution order.",
+ test: function(resolve, reject) {
+ resolve();
+ }
+ });
+ sequentialExecutionSuite.addTestCase({
+ name: "DummyTest2",
+ description: "Check test case execution order.",
+ test: function(resolve, reject) {
+ resolve();
+ }
+ });
+ sequentialExecutionSuite.addTestCase({
+ name: "DummyTest3",
+ description: "Check test case execution order.",
+ test: function(resolve, reject) {
+ resolve();
+ }
+ });
+ sequentialExecutionSuite.addTestCase({
+ name: "FailingTest4",
+ description: "Check that test fails by throwing an Error instance.",
+ test: function(resolve, reject) {
+ throw thrownError;
+ }
+ });
+
+ var abortOnFailureSuite = new InspectorTest.AsyncTestSuite("AsyncTestSuite.AbortOnFailure");
+ abortOnFailureSuite.addTestCase({
+ name: "PassingTest5",
+ description: "This test is a dummy.",
+ test: function(resolve, reject) {
+ resolve();
+ }
+ });
+ abortOnFailureSuite.addTestCase({
+ name: "FailingTest6",
+ description: "This test should fail by explicitly calling the `reject` callback.",
+ test: function(resolve, reject) {
+ reject(rejectToken);
+ }
+ });
+ abortOnFailureSuite.addTestCase({
+ name: "PassingTest7",
+ description: "This test should not executed when the preceding test fails.",
+ test: function(resolve, reject) {
+ resolve();
+ }
+ });
+
+ result = result.then(function() {
+ var promise = sequentialExecutionSuite.runTestCases();
+ InspectorTest.assert(result instanceof Promise, "AsyncTestSuite.RunTestCases() should return a Promise.");
+ return promise;
+ });
+ result = result.then(function resolved() {
+ InspectorTest.log("FAIL: Promise from sequentialExecutionSuite.runTestCases() should reject when a test case fails.");
+ return Promise.resolve(); // Continue this test.
+ }, function rejected(e) {
+ InspectorTest.log("PASS: Promise from sequentialExecutionSuite.runTestCases() should reject when a test case fails.");
+ InspectorTest.assert(e === thrownError, "Promise from sequentialExecutionSuite.runTestCases() should reject without altering its result value.");
+
+ InspectorTest.assert(sequentialExecutionSuite.runCount === 4, "sequentialExecutionSuite should have executed four tests.");
+ InspectorTest.assert(sequentialExecutionSuite.passCount === 3, "sequentialExecutionSuite should have passed three tests.");
+ InspectorTest.assert(sequentialExecutionSuite.failCount === 1, "sequentialExecutionSuite should have failed 1 test.");
+ InspectorTest.assert(sequentialExecutionSuite.skipCount === 0, "sequentialExecutionSuite should have skipped zero tests.");
+ return Promise.resolve(); // Continue this test.
+ });
+
+ result = result.then(function() {
+ return abortOnFailureSuite.runTestCases();
+ }).then(function resolved() {
+ InspectorTest.log("FAIL: Promise from abortOnFailureSuite.runTestCases() should reject when a test case fails.");
+ return Promise.resolve(); // Continue this test.
+ }, function rejected(e) {
+ InspectorTest.log("PASS: Promise from abortOnFailureSuite.runTestCases() should reject when a test case fails.");
+ InspectorTest.assert(e === rejectToken, "Promise from abortOnFailureSuite.runTestCases() should reject without altering its result value.");
+ InspectorTest.assert(abortOnFailureSuite.runCount === 2, "abortOnFailureSuite should have executed two tests.");
+ InspectorTest.assert(abortOnFailureSuite.passCount === 1, "abortOnFailureSuite should have passed one test.");
+ InspectorTest.assert(abortOnFailureSuite.failCount === 1, "abortOnFailureSuite should have failed one test.");
+ InspectorTest.assert(abortOnFailureSuite.skipCount === 1, "abortOnFailureSuite should have skipped one test.");
+
+ return Promise.resolve(); // Continue this test.
+ });
+
+ // This will finish the test whether the chain was resolved or rejected.
+ result = result.then(function() { InspectorTest.completeTest(); });
+}
+</script>
+</head>
+<body onLoad="runTest()">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestseventlistenerexpectedtxtfromrev188141trunkLayoutTestsinspectoreventlistenerexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/event-listener-expected.txt (from rev 188141, trunk/LayoutTests/inspector/event-listener-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/event-listener-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/event-listener-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Testing basic functionality of WebInspector.EventListener.
+
+Connecting the listener.
+Invoked callback for kaboom event.
+Invoked callback for kaboom event.
+Disconnecting the listener.
+Connecting the listener.
+Invoked callback for kaboom event.
+Disconnecting the listener.
+Connecting the listener.
+Disconnecting the listener.
+Connecting the single-fire listener.
+Invoked callback for kaboom event.
+Disconnecting the single-fire listener.
+Invoked callback for kaboom event.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestseventlistenersetexpectedtxtfromrev188141trunkLayoutTestsinspectoreventlistenersetexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/event-listener-set-expected.txt (from rev 188141, trunk/LayoutTests/inspector/event-listener-set-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/event-listener-set-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/event-listener-set-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+Testing basic functionality of WebInspector.EventListenerSet.
+
+Registering listeners.
+Installing listeners.
+Dispatching events.
+Invoked callback for foo event.
+Invoked callback for bar event.
+Invoked callback for baz event.
+Uninstalling and disconnecting listeners.
+Registering listeners.
+Dispatching events.
+Invoked callback for foo event.
+Invoked callback for bar event.
+Invoked callback for baz event.
+Uninstalling listeners.
+Installing listeners.
+Dispatching events.
+Invoked callback for foo event.
+Invoked callback for bar event.
+Invoked callback for baz event.
+Unregistering everything.
+Dispatching events.
+Unintalling and disconnecting listeners.
+Dispatching events.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestseventlistenersethtmlfromrev188141trunkLayoutTestsinspectoreventlistenersethtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/event-listener-set.html (from rev 188141, trunk/LayoutTests/inspector/event-listener-set.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/event-listener-set.html         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/event-listener-set.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,117 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script>
+function test()
+{
+ const FooEvent = "foo";
+ const BarEvent = "bar";
+ const BazEvent = "baz";
+ var emitter1 = new WebInspector.Object();
+ var emitter2 = new WebInspector.Object();
+ var context1 = new WebInspector.Object();
+ var context2 = new WebInspector.Object();
+ var data1 = [1, 2, 3];
+ var data2 = [4, 6, 8];
+
+ function fooCallback(event)
+ {
+ InspectorTest.assert(this === context1, "Callback invoked with wrong |this| binding.");
+ InspectorTest.assert(event.target === emitter1, "Callback invoked with wrong event emitter.");
+ InspectorTest.assert(event.data === data1, "Callback invoked with wrong event data.");
+
+ InspectorTest.log("Invoked callback for foo event.");
+ }
+
+ function barCallback(event)
+ {
+ InspectorTest.assert(this === context1, "Callback invoked with wrong |this| binding.");
+ InspectorTest.assert(event.target === emitter1, "Callback invoked with wrong event emitter.");
+ InspectorTest.assert(event.data === data2, "Callback invoked with wrong event data.");
+
+ InspectorTest.log("Invoked callback for bar event.");
+ }
+
+ function bazCallback(event)
+ {
+ InspectorTest.assert(this === context2, "Callback invoked with wrong |this| binding.");
+ InspectorTest.assert(event.target === emitter2, "Callback invoked with wrong event emitter.");
+ InspectorTest.assert(event.data === data2, "Callback invoked with wrong event data.");
+
+ InspectorTest.log("Invoked callback for baz event.");
+ }
+
+ // Test for multiple firings of listeners in the set.
+
+ var listenerSet = new WebInspector.EventListenerSet(context1);
+ InspectorTest.assert(!emitter1.hasEventListeners(FooEvent), "Emitter should not have any listeners.");
+ emitter1.dispatchEventToListeners(FooEvent, data1); // Should not fire anything.
+
+ InspectorTest.log("Registering listeners.");
+ listenerSet.register(emitter1, FooEvent, fooCallback);
+ listenerSet.register(emitter1, BarEvent, barCallback);
+ listenerSet.register(emitter2, BazEvent, bazCallback, context2);
+ InspectorTest.assert(!emitter1.hasEventListeners(FooEvent), "Emitter should not have a listener.");
+ InspectorTest.assert(!emitter1.hasEventListeners(BarEvent), "Emitter should not have a listener.");
+ InspectorTest.assert(!emitter2.hasEventListeners(BazEvent), "Emitter should not have a listener.");
+
+ InspectorTest.log("Installing listeners.");
+ listenerSet.install();
+ InspectorTest.assert(emitter1.hasEventListeners(FooEvent), "Emitter should have a listener.");
+ InspectorTest.assert(emitter1.hasEventListeners(BarEvent), "Emitter should have a listener.");
+ InspectorTest.assert(emitter2.hasEventListeners(BazEvent), "Emitter should have a listener.");
+
+ InspectorTest.log("Dispatching events.");
+ emitter1.dispatchEventToListeners(FooEvent, data1); // Should fire.
+ emitter1.dispatchEventToListeners(BarEvent, data2); // Should fire.
+ emitter2.dispatchEventToListeners(BazEvent, data2); // Should fire.
+ InspectorTest.log("Uninstalling and disconnecting listeners.");
+ listenerSet.uninstall(true);
+
+ InspectorTest.log("Registering listeners.");
+ listenerSet.register(emitter1, FooEvent, fooCallback);
+ listenerSet.register(emitter1, BarEvent, barCallback);
+ listenerSet.register(emitter2, BazEvent, bazCallback, context2);
+
+ listenerSet.install();
+ InspectorTest.log("Dispatching events.");
+ emitter1.dispatchEventToListeners(FooEvent, data1); // Should fire.
+ emitter1.dispatchEventToListeners(BarEvent, data2); // Should fire.
+ emitter2.dispatchEventToListeners(BazEvent, data2); // Should fire.
+ InspectorTest.log("Uninstalling listeners.");
+ listenerSet.uninstall();
+
+ InspectorTest.log("Installing listeners.");
+ listenerSet.install();
+ InspectorTest.log("Dispatching events.");
+ emitter1.dispatchEventToListeners(FooEvent, data1); // Should fire.
+ emitter1.dispatchEventToListeners(BarEvent, data2); // Should fire.
+ emitter2.dispatchEventToListeners(BazEvent, data2); // Should fire.
+
+ InspectorTest.log("Unregistering everything.");
+ listenerSet.unregister();
+ InspectorTest.log("Dispatching events.");
+ emitter1.dispatchEventToListeners(FooEvent, data1); // Should not fire.
+ emitter1.dispatchEventToListeners(BarEvent, data2); // Should not fire.
+ emitter2.dispatchEventToListeners(BazEvent, data2); // Should not fire.
+
+ InspectorTest.log("Unintalling and disconnecting listeners.");
+ listenerSet.uninstall(true);
+ InspectorTest.log("Dispatching events.");
+ emitter1.dispatchEventToListeners(FooEvent, data1); // Should not fire.
+ emitter1.dispatchEventToListeners(BarEvent, data2); // Should not fire.
+ emitter2.dispatchEventToListeners(BazEvent, data2); // Should not fire.
+
+ InspectorTest.assert(!emitter1.hasEventListeners(FooEvent), "Emitter should not have a listener.");
+ InspectorTest.assert(!emitter1.hasEventListeners(BarEvent), "Emitter should not have a listener.");
+ InspectorTest.assert(!emitter2.hasEventListeners(BazEvent), "Emitter should not have a listener.");
+
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onload="runTest()">
+ <p>Testing basic functionality of WebInspector.EventListenerSet.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestseventlistenerhtmlfromrev188141trunkLayoutTestsinspectoreventlistenerhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/event-listener.html (from rev 188141, trunk/LayoutTests/inspector/event-listener.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/event-listener.html         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/event-listener.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,93 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script>
+function test()
+{
+ const KaboomEvent = "kaboom";
+ var emitter = new WebInspector.Object();
+ var context = new WebInspector.Object();
+ var data = [1, 2, 3];
+
+ function kaboomCallback(event) {
+ InspectorTest.assert(this === context, "Callback invoked with wrong |this| binding.");
+ InspectorTest.assert(event.target === emitter, "Callback invoked with wrong event emitter.");
+ InspectorTest.assert(event.data === data, "Callback invoked with wrong event data.");
+
+ InspectorTest.log("Invoked callback for kaboom event.");
+ }
+
+ // Test for multiple firings of the listener.
+
+ var listener = new WebInspector.EventListener(context);
+ InspectorTest.assert(!emitter.hasEventListeners(KaboomEvent), "Emitter should not have any listeners.");
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire anything.
+
+ InspectorTest.log("Connecting the listener.");
+ listener.connect(emitter, KaboomEvent, kaboomCallback);
+ InspectorTest.assert(emitter.hasEventListeners(KaboomEvent), "Emitter should have a listener.");
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
+ InspectorTest.log("Disconnecting the listener.");
+ listener.disconnect();
+
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire anything.
+ InspectorTest.assert(!emitter.hasEventListeners(KaboomEvent), "Emitter should not have any listeners.");
+
+ // Test reconnection.
+
+ InspectorTest.log("Connecting the listener.");
+ listener.connect(emitter, KaboomEvent, kaboomCallback);
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
+ InspectorTest.log("Disconnecting the listener.");
+ listener.disconnect();
+
+ // Test unused listener.
+
+ InspectorTest.log("Connecting the listener.");
+ listener.connect(emitter, KaboomEvent, kaboomCallback);
+ InspectorTest.log("Disconnecting the listener.");
+ listener.disconnect();
+
+ // Test for single firing of the listener.
+
+ var singleListener = new WebInspector.EventListener(context, true);
+ InspectorTest.assert(!emitter.hasEventListeners(KaboomEvent), "Emitter should not have any listeners.");
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire anything.
+
+ InspectorTest.log("Connecting the single-fire listener.");
+ singleListener.connect(emitter, KaboomEvent, kaboomCallback);
+ InspectorTest.assert(emitter.hasEventListeners(KaboomEvent), "Emitter should have a listener.");
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
+ InspectorTest.assert(!emitter.hasEventListeners(KaboomEvent), "Emitter should not have any listeners.");
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire.
+ InspectorTest.log("Disconnecting the single-fire listener.");
+ singleListener.disconnect(); // Should cause an error.
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should not fire.
+
+ // Test for various error cases and abuse.
+
+ var badListener = new WebInspector.EventListener(context);
+ badListener.connect(data, data, data); // Should complain about non-callable callback.
+ badListener.connect(null, KaboomEvent, kaboomCallback); // Should complain about non-callable callback.
+ badListener.connect(emitter, KaboomEvent, null); // Should complain about non-callable callback.
+ badListener.connect(emitter, null, kaboomCallback); // Should complain about null event.
+
+ var badListener2 = new WebInspector.EventListener(context);
+ badListener2.disconnect(); // Should complain about already disconnected.
+ badListener2.connect(emitter, KaboomEvent, kaboomCallback);
+ badListener2.connect(emitter, KaboomEvent, kaboomCallback); // Should complain about already connected.
+ emitter.dispatchEventToListeners(KaboomEvent, data); // Should fire.
+ badListener2.connect(emitter, KaboomEvent, kaboomCallback); // Should complain about already connected.
+ badListener2.disconnect();
+ badListener2.disconnect(); // Should complain about already disconnected.
+
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onload="runTest()">
+ <p>Testing basic functionality of WebInspector.EventListener.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestssynctestsuiteexpectedtxtfromrev188141trunkLayoutTestsinspectorprotocolsynctestsuiteexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/sync-test-suite-expected.txt (from rev 188141, trunk/LayoutTests/inspector-protocol/sync-test-suite-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/sync-test-suite-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/sync-test-suite-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+PASS: instantiating SyncTestSuite requires name argument.
+PASS: instantiating SyncTestSuite requires string name argument.
+PASS: should not be able to add empty test case.
+PASS: should not be able to add non-object test case.
+PASS: test case should require string name.
+PASS: test case should require test function.
+PASS: should not be able to run empty test suite.
+
+== Running test suite: SyncTestSuite.RunTwiceSuite
+-- Running test case: DummyTest0
+PASS: Return value of runTwiceSuite.runTestCases() should be true when all tests pass.
+PASS: should not be able to run a test suite twice.
+
+== Running test suite: SyncTestSuite.SequentialExecution
+-- Running test case: DummyTest1
+-- Running test case: DummyTest2
+-- Running test case: DummyTest3
+-- Running test case: FailingTest4
+!! EXCEPTION: [object Object]
+PASS: Return value of sequentialExecutionSuite.runTestCases() should be false when a test case fails.
+PASS: sequentialExecutionSuite should have executed four tests.
+PASS: sequentialExecutionSuite should have passed three tests.
+PASS: sequentialExecutionSuite should have failed 1 test.
+PASS: sequentialExecutionSuite should have skipped zero tests.
+
+== Running test suite: SyncTestSuite.AbortOnFailure
+-- Running test case: PassingTest5
+-- Running test case: FailingTest6
+PASS: Return value of abortOnFailureSuite.runTestCases() should be false when a test case fails.
+PASS: abortOnFailureSuite should have executed two tests.
+PASS: abortOnFailureSuite should have passed one test.
+PASS: abortOnFailureSuite should have failed one test.
+PASS: abortOnFailureSuite should have skipped one test.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestssynctestsuitehtmlfromrev188141trunkLayoutTestsinspectorprotocolsynctestsuitehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/sync-test-suite.html (from rev 188141, trunk/LayoutTests/inspector-protocol/sync-test-suite.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/sync-test-suite.html         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/sync-test-suite.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,140 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
+<script>
+function test()
+{
+ try {
+ new InspectorTest.SyncTestSuite();
+ InspectorTest.log("FAIL: instantiating SyncTestSuite requires name argument.");
+ } catch (e) {
+ InspectorTest.log("PASS: instantiating SyncTestSuite requires name argument.");
+ }
+
+ try {
+ new InspectorTest.SyncTestSuite({});
+ InspectorTest.log("FAIL: instantiating SyncTestSuite requires string name argument.");
+ } catch (e) {
+ InspectorTest.log("PASS: instantiating SyncTestSuite requires string name argument.");
+ }
+
+ var badArgsSuite = new InspectorTest.SyncTestSuite("dummy");
+ try {
+ badArgsSuite.addTestCase();
+ InspectorTest.log("FAIL: should not be able to add empty test case.");
+ } catch (e) {
+ InspectorTest.log("PASS: should not be able to add empty test case.");
+ }
+ try {
+ badArgsSuite.addTestCase("string");
+ InspectorTest.log("FAIL: should not be able to add non-object test case.");
+ } catch (e) {
+ InspectorTest.log("PASS: should not be able to add non-object test case.");
+ }
+ try {
+ badArgsSuite.addTestCase({
+ name: {},
+ test: function() { return true; },
+ });
+ InspectorTest.log("FAIL: test case should require string name.");
+ } catch (e) {
+ InspectorTest.log("PASS: test case should require string name.");
+ }
+ try {
+ badArgsSuite.addTestCase({
+ name: "foo",
+ test: null,
+ });
+ InspectorTest.log("FAIL: test case should require test function.");
+ } catch (e) {
+ InspectorTest.log("PASS: test case should require test function.");
+ }
+
+ var runEmptySuite = new InspectorTest.SyncTestSuite("SyncTestSuite.RunEmptySuite");
+ try {
+ runEmptySuite.runTestCases();
+ InspectorTest.log("FAIL: should not be able to run empty test suite.");
+ } catch (e) {
+ InspectorTest.log("PASS: should not be able to run empty test suite.");
+ }
+
+ var runTwiceSuite = new InspectorTest.SyncTestSuite("SyncTestSuite.RunTwiceSuite");
+ runTwiceSuite.addTestCase({
+ name: "DummyTest0",
+ description: "Check that a suite can't run more than once.",
+ test: function() { return true; }
+ });
+
+ try {
+ var result = runTwiceSuite.runTestCases();
+ InspectorTest.assert(result === true, "Return value of runTwiceSuite.runTestCases() should be true when all tests pass.");
+
+ runTwiceSuite.runTestCases(); // Try to trigger an error.
+ InspectorTest.log("FAIL: should not be able to run a test suite twice.");
+ } catch (e) {
+ InspectorTest.log("PASS: should not be able to run a test suite twice.");
+ }
+
+ var thrownError = new Error({"token": 666});
+
+ var sequentialExecutionSuite = new InspectorTest.SyncTestSuite("SyncTestSuite.SequentialExecution");
+ sequentialExecutionSuite.addTestCase({
+ name: "DummyTest1",
+ description: "Check test case execution order.",
+ test: function() { return true; }
+ });
+ sequentialExecutionSuite.addTestCase({
+ name: "DummyTest2",
+ description: "Check test case execution order.",
+ test: function() { return true; }
+ });
+ sequentialExecutionSuite.addTestCase({
+ name: "DummyTest3",
+ description: "Check test case execution order.",
+ test: function() { return true; }
+ });
+ sequentialExecutionSuite.addTestCase({
+ name: "FailingTest4",
+ description: "Check that test fails by throwing an Error instance.",
+ test: function() { throw thrownError; }
+ });
+
+ var result = sequentialExecutionSuite.runTestCases();
+ InspectorTest.assert(result === false, "Return value of sequentialExecutionSuite.runTestCases() should be false when a test case fails.");
+ InspectorTest.assert(sequentialExecutionSuite.runCount === 4, "sequentialExecutionSuite should have executed four tests.");
+ InspectorTest.assert(sequentialExecutionSuite.passCount === 3, "sequentialExecutionSuite should have passed three tests.");
+ InspectorTest.assert(sequentialExecutionSuite.failCount === 1, "sequentialExecutionSuite should have failed 1 test.");
+ InspectorTest.assert(sequentialExecutionSuite.skipCount === 0, "sequentialExecutionSuite should have skipped zero tests.");
+
+ var abortOnFailureSuite = new InspectorTest.SyncTestSuite("SyncTestSuite.AbortOnFailure");
+ abortOnFailureSuite.addTestCase({
+ name: "PassingTest5",
+ description: "This test is a dummy.",
+ test: function() { return true; }
+ });
+ abortOnFailureSuite.addTestCase({
+ name: "FailingTest6",
+ description: "This test should fail by explicitly returning `false`.",
+ test: function() { return false; }
+ });
+ abortOnFailureSuite.addTestCase({
+ name: "PassingTest7",
+ description: "This test should not executed when the preceding test fails.",
+ test: function() { return true; }
+ });
+
+ abortOnFailureSuite.runTestCases();
+ InspectorTest.assert(result === false, "Return value of abortOnFailureSuite.runTestCases() should be false when a test case fails.");
+ InspectorTest.assert(abortOnFailureSuite.runCount === 2, "abortOnFailureSuite should have executed two tests.");
+ InspectorTest.assert(abortOnFailureSuite.passCount === 1, "abortOnFailureSuite should have passed one test.");
+ InspectorTest.assert(abortOnFailureSuite.failCount === 1, "abortOnFailureSuite should have failed one test.");
+ InspectorTest.assert(abortOnFailureSuite.skipCount === 1, "abortOnFailureSuite should have skipped one test.");
+
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onLoad="runTest()">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunitteststestharnesstriviallyworksexpectedtxtfromrev188141trunkLayoutTestsinspectortestharnesstriviallyworksexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/test-harness-trivially-works-expected.txt (from rev 188141, trunk/LayoutTests/inspector/test-harness-trivially-works-expected.txt) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/test-harness-trivially-works-expected.txt         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/test-harness-trivially-works-expected.txt        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+Tests that the test harness for non-stub inspector tests can load and run a test.
+
+Logged a message from the inspector page.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunitteststestharnesstriviallyworkshtmlfromrev188141trunkLayoutTestsinspectortestharnesstriviallyworkshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/inspector/unit-tests/test-harness-trivially-works.html (from rev 188141, trunk/LayoutTests/inspector/test-harness-trivially-works.html) (0 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/test-harness-trivially-works.html         (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/test-harness-trivially-works.html        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script>
+function test()
+{
+ InspectorTest.log("Logged a message from the inspector page.");
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests that the test harness for non-stub inspector tests can load and run a test.</p>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/TestExpectations (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/TestExpectations        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/platform/efl/TestExpectations        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -748,10 +748,9 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/136227 mathml/very-large-stretchy-operators.html [ Crash Timeout Pass ]
</span><span class="cx">
</span><del>-#webkit.org/b/142158 inspector-protocol/dom/remove-multiple-nodes.html [ Crash Pass ]
</del><ins>+#webkit.org/b/142158 inspector/dom/remove-multiple-nodes.html [ Crash Pass ]
+#webkit.org/b/147018 inspector/css/get-system-fonts.html [ Skip ]
</ins><span class="cx">
</span><del>-webkit.org/b/147018 inspector/css/get-system-fonts.html [ Skip ]
-
</del><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> # FLAKY TESTS
</span><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span><span class="lines">@@ -1537,8 +1536,8 @@
</span><span class="cx"> webkit.org/b/102068 webkit.org/b/102993 media/audio-repaint.html [ Failure ]
</span><span class="cx"> webkit.org/b/102068 webkit.org/b/102993 media/media-document-audio-repaint.html [ Timeout ]
</span><span class="cx">
</span><del>-#webkit.org/b/100846 inspector-protocol/debugger/pause-dedicated-worker.html [ Skip ]
-#webkit.org/b/100846 inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html [ Skip ]
</del><ins>+#webkit.org/b/100846 inspector/debugger/pause-dedicated-worker.html [ Skip ]
+#webkit.org/b/100846 inspector/debugger/terminate-dedicated-worker-while-paused.html [ Skip ]
</ins><span class="cx">
</span><span class="cx"> # New media test introduced in r133660 fails.
</span><span class="cx"> webkit.org/b/101439 media/progress-events-generated-correctly.html [ Failure Pass ]
</span><span class="lines">@@ -1979,7 +1978,7 @@
</span><span class="cx"> webkit.org/b/133972 mathml/presentation/foreign-element-in-token.html [ Failure ]
</span><span class="cx">
</span><span class="cx"> # Tests failing or flaky with closer reasons unknwown at this time
</span><del>-#webkit.org/b/133857 inspector-protocol/layers/layers-blending-compositing-reasons.html [ Failure ]
</del><ins>+#webkit.org/b/133857 inspector/layers/layers-blending-compositing-reasons.html [ Failure ]
</ins><span class="cx"> webkit.org/b/133860 fast/regions/auto-size/autosize-region-window-resize.html [ ImageOnlyFailure Pass ]
</span><span class="cx"> webkit.org/b/133974 fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg.html [ ImageOnlyFailure Pass ]
</span><span class="cx">
</span><span class="lines">@@ -2062,8 +2061,8 @@
</span><span class="cx"> webkit.org/b/141512 fast/css/pseudo-valid-form-invalidation-optimization.html [ Failure ]
</span><span class="cx">
</span><span class="cx"> # Probably started failing since r159110
</span><del>-#webkit.org/b/141591 inspector-protocol/debugger/breakpoint-eval-with-exception.html [ Failure ]
-#webkit.org/b/141591 inspector-protocol/debugger/setBreakpoint-actions.html [ Failure ]
</del><ins>+#webkit.org/b/141591 inspector/debugger/breakpoint-eval-with-exception.html [ Failure ]
+#webkit.org/b/141591 inspector/debugger/setBreakpoint-actions.html [ Failure ]
</ins><span class="cx">
</span><span class="cx"> # Doesn't support inter-ideograph justification
</span><span class="cx"> webkit.org/b/141593 fast/text/justify-ideograph-complex.html [ Failure ]
</span><span class="lines">@@ -2168,8 +2167,8 @@
</span><span class="cx"> compositing/masks/compositing-clip-path-change-no-repaint.html [ Failure ]
</span><span class="cx"> compositing/tiling/transform-origin-tiled.html [ Failure ]
</span><span class="cx">
</span><del>-# [EFL] REGRESSION(r183907): It made all inspector-protocol test crash
-webkit.org/b/144737 inspector-protocol [ Skip ]
</del><ins>+# [EFL] REGRESSION(r183907): It made all inspector test crash
+webkit.org/b/144737 inspector [ Skip ]
</ins><span class="cx"> webkit.org/b/144737 http/tests/inspector [ Skip ]
</span><span class="cx">
</span><span class="cx"> webkit.org/b/145632 fast/animation/request-animation-frame-throttle-subframe.html [ Timeout ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -300,7 +300,7 @@
</span><span class="cx"> webkit.org/b/71849 http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html [ Skip ]
</span><span class="cx"> webkit.org/b/71849 http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html [ Skip ]
</span><span class="cx"> webkit.org/b/71849 webkit.org/b/124486 http/tests/webgl [ Skip ]
</span><del>-webkit.org/b/71849 webkit.org/b/111477 inspector-protocol/layers [ Skip ]
</del><ins>+webkit.org/b/71849 webkit.org/b/111477 inspector/layers [ Skip ]
</ins><span class="cx"> webkit.org/b/71849 webgl [ Skip ]
</span><span class="cx">
</span><span class="cx"> # These tests reference specific fonts on Mac port.
</span><span class="lines">@@ -994,7 +994,6 @@
</span><span class="cx"> webkit.org/b/132260 fast/workers/worker-close.html [ Timeout Pass ]
</span><span class="cx"> webkit.org/b/132261 html5lib/generated/run-tests16-data.html [ Timeout Pass ]
</span><span class="cx"> webkit.org/b/132262 http/tests/media/video-redirect.html [ Timeout Pass ]
</span><del>-webkit.org/b/132264 inspector-protocol/page/deny-X-FrameOption.html [ Failure Timeout Pass ]
</del><span class="cx"> webkit.org/b/132267 mathml/wbr-in-mroot-crash.html [ Timeout Pass ]
</span><span class="cx"> webkit.org/b/132272 fast/dom/gc-10.html [ Failure Pass ]
</span><span class="cx"> webkit.org/b/132279 perf/mouse-event.html [ Failure Pass ]
</span><span class="lines">@@ -1114,7 +1113,7 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/136581 editing/pasteboard/drag-drop-dead-frame.html [ Failure Timeout Pass ]
</span><span class="cx">
</span><del>-webkit.org/b/139359 inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html [ Failure Pass ]
</del><ins>+webkit.org/b/139359 inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html [ Failure Pass ]
</ins><span class="cx">
</span><span class="cx"> webkit.org/b/139489 http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html [ Failure Pass ]
</span><span class="cx">
</span><span class="lines">@@ -1127,7 +1126,7 @@
</span><span class="cx"> webkit.org/b/143702 media/progress-events-generated-correctly.html [ Timeout Crash ]
</span><span class="cx"> webkit.org/b/143704 media/media-source/media-source-append-media-segment-without-init.html [ Failure Pass ]
</span><span class="cx">
</span><del>-webkit.org/b/139364 inspector-protocol/debugger/setBreakpoint-dfg.html [ Failure Pass ]
</del><ins>+webkit.org/b/139364 inspector/debugger/setBreakpoint-dfg.html [ Failure Pass ]
</ins><span class="cx"> webkit.org/b/143876 css3/viewport-percentage-lengths/vh-resize.html [ ImageOnlyFailure Pass ]
</span><span class="cx">
</span><span class="cx"> webkit.org/b/143983 fast/hidpi/image-srcset-svg-canvas.html [ ImageOnlyFailure Pass ]
</span><span class="lines">@@ -1260,32 +1259,32 @@
</span><span class="cx"> webkit.org/b/116958 http/tests/navigation/scrollstate-after-http-equiv-refresh.html [ Timeout ]
</span><span class="cx"> webkit.org/b/116958 http/tests/navigation/scrollstate-after-location-reload.html [ Timeout ]
</span><span class="cx">
</span><del>-webkit.org/b/120682 inspector-protocol/page/archive.html [ Timeout ]
</del><ins>+webkit.org/b/120682 inspector/page/archive.html [ Timeout ]
</ins><span class="cx">
</span><span class="cx"> webkit.org/b/122571 http/tests/inspector/console/access-inspected-object.html [ Timeout Pass ]
</span><del>-webkit.org/b/122571 inspector-protocol/debugger/setBreakpoint.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/call-frame-function-name.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setBreakpoint-options-exception.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setPauseOnExceptions-all.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setPauseOnExceptions-none.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/call-frame-this-host.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setBreakpoint-autoContinue.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setPauseOnExceptions-uncaught.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setBreakpoint-actions.html [ Failure Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/call-frame-this-nonstrict.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setBreakpoint-column.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setBreakpoint-condition.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/removeBreakpoint.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/setVariableValue.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/debugger/call-frame-this-strict.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/dom/request-child-nodes-depth.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/dom/focus.html [ Failure Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/runtime/getProperties.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/page/javascriptDialogEvents.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/page/frameStartedLoading.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/page/frameScheduledNavigation.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/page/setEmulatedMedia.html [ Timeout Pass ]
-webkit.org/b/122571 inspector-protocol/css/getSupportedCSSProperties.html [ Timeout Pass ]
</del><ins>+webkit.org/b/122571 inspector/debugger/setBreakpoint.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/call-frame-function-name.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setBreakpoint-options-exception.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setPauseOnExceptions-all.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setPauseOnExceptions-none.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/call-frame-this-host.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setBreakpoint-autoContinue.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setPauseOnExceptions-uncaught.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setBreakpoint-actions.html [ Failure Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/call-frame-this-nonstrict.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setBreakpoint-column.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setBreakpoint-condition.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/removeBreakpoint.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/setVariableValue.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/debugger/call-frame-this-strict.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/dom/request-child-nodes-depth.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/dom/focus.html [ Failure Timeout Pass ]
+webkit.org/b/122571 inspector/runtime/getProperties.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/page/javascriptDialogEvents.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/page/frameStartedLoading.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/page/frameScheduledNavigation.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/page/setEmulatedMedia.html [ Timeout Pass ]
+webkit.org/b/122571 inspector/css/getSupportedCSSProperties.html [ Timeout Pass ]
</ins><span class="cx">
</span><span class="cx"> Bug(GTK) plugins/reloadplugins-and-pages.html [ Timeout ]
</span><span class="cx">
</span><span class="lines">@@ -1830,8 +1829,8 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/98950 transitions/blendmode-transitions.html [ Failure ]
</span><span class="cx">
</span><del>-webkit.org/b/100846 inspector-protocol/debugger/pause-dedicated-worker.html [ Skip ]
-webkit.org/b/100846 inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html [ Skip ]
</del><ins>+webkit.org/b/100846 inspector/debugger/pause-dedicated-worker.html [ Skip ]
+webkit.org/b/100846 inspector/debugger/terminate-dedicated-worker-while-paused.html [ Skip ]
</ins><span class="cx">
</span><span class="cx"> webkit.org/b/101539 editing/execCommand/switch-list-type-with-orphaned-li.html [ Failure ]
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -1297,9 +1297,9 @@
</span><span class="cx"> fast/writing-mode/Kusa-Makura-background-canvas.html [ Failure ]
</span><span class="cx">
</span><span class="cx"> # Inspector protocol tests that fail:
</span><del>-inspector-protocol/debugger/breakpoint-eval-with-exception.html [ Failure ]
-inspector-protocol/debugger/setBreakpoint-actions.html [ Failure ]
-inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html [ Failure ]
</del><ins>+inspector/debugger/breakpoint-eval-with-exception.html [ Failure ]
+inspector/debugger/setBreakpoint-actions.html [ Failure ]
+inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html [ Failure ]
</ins><span class="cx">
</span><span class="cx"> # JavaScripts tests that fail:
</span><span class="cx"> js/dom/deep-recursion-test.html [ Failure ]
</span><span class="lines">@@ -1412,8 +1412,8 @@
</span><span class="cx"> fast/text/emphasis-height-crash.html
</span><span class="cx"> fast/text/emphasis-vertical.html
</span><span class="cx"> fast/text/emphasis.html
</span><del>-inspector-protocol/debugger/pause-dedicated-worker.html
-inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html
</del><ins>+inspector/debugger/pause-dedicated-worker.html
+inspector/debugger/terminate-dedicated-worker-while-paused.html
</ins><span class="cx"> inspector/css/selector-dynamic-specificity.html
</span><span class="cx"> inspector/model/remote-object-get-properties.html
</span><span class="cx"> transitions/cubic-bezier-overflow-transform.html
</span><span class="lines">@@ -1674,10 +1674,10 @@
</span><span class="cx"> fast/writing-mode/broken-ideographic-font.html [ Failure ]
</span><span class="cx"> fast/writing-mode/japanese-rl-text-with-broken-font.html [ Failure ]
</span><span class="cx"> http/tests/loading/sizes/preload-image-sizes.html [ Failure ]
</span><del>-inspector-protocol/debugger/nested-inspectors.html [ Failure ]
-inspector-protocol/debugger/regress-133182.html [ Failure ]
-inspector-protocol/dom/getAccessibilityPropertiesForNode.html [ Failure ]
-inspector-protocol/page/javascriptDialogEvents.html [ Failure ]
</del><ins>+inspector/debugger/nested-inspectors.html [ Failure ]
+inspector/debugger/regress-133182.html [ Failure ]
+inspector/dom/getAccessibilityPropertiesForNode.html [ Failure ]
+inspector/page/javascriptDialogEvents.html [ Failure ]
</ins><span class="cx"> platform/ios-simulator/ios/fast/text/underline-scaling.html [ Failure ]
</span><span class="cx"> svg/custom/linking-uri-01-b.svg [ Failure ]
</span><span class="cx"> compositing/backgrounds/background-image-with-negative-zindex.html [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx"> storage/domstorage/localstorage/set-value-in-storage-after-window-close.html
</span><span class="cx"> storage/domstorage/localstorage/window-open.html
</span><span class="cx"> storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close.html
</span><del>-inspector-protocol
</del><ins>+inspector
</ins><span class="cx"> fast/loader/ping-error.html
</span><span class="cx"> fast/loader/stateobjects/popstate-fires-with-page-cache.html
</span><span class="cx"> fast/loader/stateobjects/replacestate-in-iframe.html
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -678,7 +678,7 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/119374 fast/workers/termination-early.html [ Pass Crash ]
</span><span class="cx">
</span><del>-webkit.org/b/110186 inspector-protocol/page/javascriptDialogEvents.html [ Skip ]
</del><ins>+webkit.org/b/110186 inspector/page/javascriptDialogEvents.html [ Skip ]
</ins><span class="cx">
</span><span class="cx"> # Need support for ResourceHandle::didChangePriority and DRT support
</span><span class="cx"> webkit.org/b/111016 http/tests/loading/promote-img-preload-priority.html [ Failure ]
</span><span class="lines">@@ -755,7 +755,7 @@
</span><span class="cx"> webkit.org/b/123369 svg/css/root-shadow-offscreen.svg [ Pass ImageOnlyFailure ]
</span><span class="cx">
</span><span class="cx"> # webkit.org/b/100846, webkit.org/b/136715
</span><del>-inspector-protocol/debugger
</del><ins>+inspector/debugger
</ins><span class="cx">
</span><span class="cx"> webkit.org/b/124311 compositing/regions/transform-transparent-positioned-video-inside-region.html [ ImageOnlyFailure ]
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/TestExpectations        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -507,7 +507,7 @@
</span><span class="cx">
</span><span class="cx"> media/video-background-tab-playback.html [ Pass Failure ]
</span><span class="cx">
</span><del>-webkit.org/b/138097 [ Yosemite ] inspector-protocol/debugger/setPauseOnExceptions-uncaught.html [ Pass Failure Timeout ]
</del><ins>+webkit.org/b/138097 [ Yosemite ] inspector/debugger/setPauseOnExceptions-uncaught.html [ Pass Failure Timeout ]
</ins><span class="cx">
</span><span class="cx"> webkit.org/b/139979 [ Yosemite+ ] fast/regions/layers/region-removed-during-animation.html [ Pass ImageOnlyFailure ]
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (188141 => 188142)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations        2015-08-07 18:27:16 UTC (rev 188141)
+++ trunk/LayoutTests/platform/win/TestExpectations        2015-08-07 18:33:16 UTC (rev 188142)
</span><span class="lines">@@ -2375,21 +2375,21 @@
</span><span class="cx"> inspector/dom/content-node-region-info.html [ Crash Pass Failure Timeout ]
</span><span class="cx">
</span><span class="cx"> # Inspector Protocol
</span><del>-webkit.org/b/140510 inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html [ Skip ] # Crashing
-inspector-protocol/debugger/pause-on-assert.html [ Skip ]
-inspector-protocol/debugger/regress-133182.html        [ Skip ] # Crashing
-[ Release ] inspector-protocol/debugger/setBreakpoint-actions.html [ Pass Timeout ]
-webkit.org/b/140520 inspector-protocol/debugger/setBreakpoint-dfg.html [ Skip ] # Crashing
-[ Release ] inspector-protocol/dom/focus.html [ Pass Timeout ]
-webkit.org/b/128979 [ Release ] inspector-protocol/dom/getAccessibilityPropertiesForNode.html [ Pass Failure ]
-[ Release ] inspector-protocol/dom/remove-multiple-nodes.html [ Pass Timeout ]
-[ Release ] inspector-protocol/layers/layers-blending-compositing-reasons.html [ Failure ]
-[ Debug ] inspector-protocol/layers/layers-blending-compositing-reasons.html [ Skip ]
-[ Release ] inspector-protocol/layers/layers-reflected-content.html [ Pass Timeout ]
-[ Release ] inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html [ Failure ]
-[ Debug ] inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html [ Skip ] # Debug Assertion
-inspector-protocol/debugger/removeBreakpoint.html [ Skip ] # Crashing
-inspector-protocol/debugger/searchInContent-linebreaks.html [ Pass Crash ] # Flaky
</del><ins>+webkit.org/b/140510 inspector/debugger/terminate-dedicated-worker-while-paused.html [ Skip ] # Crashing
+inspector/debugger/pause-on-assert.html [ Skip ]
+inspector/debugger/regress-133182.html [ Skip ] # Crashing
+[ Release ] inspector/debugger/setBreakpoint-actions.html [ Pass Timeout ]
+webkit.org/b/140520 inspector/debugger/setBreakpoint-dfg.html [ Skip ] # Crashing
+[ Release ] inspector/dom/focus.html [ Pass Timeout ]
+webkit.org/b/128979 [ Release ] inspector/dom/getAccessibilityPropertiesForNode.html [ Pass Failure ]
+[ Release ] inspector/dom/remove-multiple-nodes.html [ Pass Timeout ]
+[ Release ] inspector/layers/layers-blending-compositing-reasons.html [ Failure ]
+[ Debug ] inspector/layers/layers-blending-compositing-reasons.html [ Skip ]
+[ Release ] inspector/layers/layers-reflected-content.html [ Pass Timeout ]
+[ Release ] inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html [ Failure ]
+[ Debug ] inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html [ Skip ] # Debug Assertion
+inspector/debugger/removeBreakpoint.html [ Skip ] # Crashing
+inspector/debugger/searchInContent-linebreaks.html [ Pass Crash ] # Flaky
</ins><span class="cx">
</span><span class="cx"> ################################################################################
</span><span class="cx"> ################# End Inspector Issues ####################
</span><span class="lines">@@ -2535,7 +2535,7 @@
</span><span class="cx">
</span><span class="cx"> # Skip tests that fail only in Debug mode
</span><span class="cx"> [ Debug ] compositing [ Skip ]
</span><del>-[ Debug ] inspector-protocol [ Skip ]
</del><ins>+[ Debug ] inspector [ Skip ]
</ins><span class="cx"> [ Debug ] transforms/3d/hit-testing [ Skip ]
</span><span class="cx"> [ Debug ] transforms/3d/point-mapping [ Skip ]
</span><span class="cx">
</span><span class="lines">@@ -3108,11 +3108,11 @@
</span><span class="cx"> [ Release ] fast/text/international/float-as-only-child-of-isolate-crash.html [ Pass Failure ]
</span><span class="cx"> [ Release ] js/slow-stress/emscripten-memops.html [ Pass Failure ]
</span><span class="cx"> [ Release ] js/slow-stress/fold-strict-eq.html [ Skip ] # Crashes on EWS
</span><del>-[ Release ] inspector-protocol/layers/layers-anonymous.html [ Skip ] # Timeouts
-[ Release ] inspector-protocol/layers/layers-blending-compositing-reasons.html [ Skip ] # Timeouts
-[ Release ] inspector-protocol/layers/layers-compositing-reasons.html [ Skip ] # Timeouts
-[ Release ] inspector-protocol/layers/layers-for-node.html [ Skip ] # Timeouts
-[ Release ] inspector-protocol/layers/layers-generated-content.html [ Skip ] # Timeouts
</del><ins>+[ Release ] inspector/layers/layers-anonymous.html [ Skip ] # Timeouts
+[ Release ] inspector/layers/layers-blending-compositing-reasons.html [ Skip ] # Timeouts
+[ Release ] inspector/layers/layers-compositing-reasons.html [ Skip ] # Timeouts
+[ Release ] inspector/layers/layers-for-node.html [ Skip ] # Timeouts
+[ Release ] inspector/layers/layers-generated-content.html [ Skip ] # Timeouts
</ins><span class="cx">
</span><span class="cx"> # Windows doesn't have API for disabling meta refresh
</span><span class="cx"> loader/meta-refresh-disabled.html [ Skip ]
</span></span></pre>
</div>
</div>
</body>
</html>