<!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>[188579] trunk</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/188579">188579</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-08-17 23:33:51 -0700 (Mon, 17 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/188539">r188539</a>, <a href="http://trac.webkit.org/projects/webkit/changeset/188544">r188544</a>, <a href="http://trac.webkit.org/projects/webkit/changeset/188552">r188552</a>, and
<a href="http://trac.webkit.org/projects/webkit/changeset/188564">r188564</a>.
https://bugs.webkit.org/show_bug.cgi?id=148122
Broke tests and some build styles (Requested by ap on
#webkit).
Reverted changesets:
"Web Inspector: load ProtocolTestStub from the WebInspectorUI
bundle"
https://bugs.webkit.org/show_bug.cgi?id=147955
http://trac.webkit.org/changeset/188539
"Web Inspector: split TestStub.js into multiple files and
modernize it"
https://bugs.webkit.org/show_bug.cgi?id=148077
http://trac.webkit.org/changeset/188544
"Web Inspector: InspectorTest should be a subclass of
TestHarness"
https://bugs.webkit.org/show_bug.cgi?id=148079
http://trac.webkit.org/changeset/188552
"Unreviewed internal build fix attempt after <a href="http://trac.webkit.org/projects/webkit/changeset/188539">r188539</a>."
http://trac.webkit.org/changeset/188564</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="#trunkLayoutTestshttptestsinspectordebuggerdebuggertestjs">trunk/LayoutTests/http/tests/inspector/debugger/debugger-test.js</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectordomresourcesInspectorDOMListenerjs">trunk/LayoutTests/http/tests/inspector/dom/resources/InspectorDOMListener.js</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectordomshapestestjs">trunk/LayoutTests/http/tests/inspector/dom/shapes-test.js</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectorreplayreplaytestjs">trunk/LayoutTests/http/tests/inspector/replay/replay-test.js</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectorresourcesconsoletestjs">trunk/LayoutTests/http/tests/inspector/resources/console-test.js</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectorresourcesinspectortestjs">trunk/LayoutTests/http/tests/inspector/resources/inspector-test.js</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectorresourcesprobetestjs">trunk/LayoutTests/http/tests/inspector/resources/probe-test.js</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectorresourcesprotocoltestjs">trunk/LayoutTests/http/tests/inspector/resources/protocol-test.js</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><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="#trunkLayoutTestsinspectordebuggerbreakpointactionevalhtml">trunk/LayoutTests/inspector/debugger/breakpoint-action-eval.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerdidSampleProbemultipleprobeshtml">trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesbreakonexceptiontestsjs">trunk/LayoutTests/inspector/debugger/resources/break-on-exception-tests.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerresourcesscriptforbreakpointactionsjs">trunk/LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersearchscriptshtml">trunk/LayoutTests/inspector/debugger/search-scripts.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointactionshtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-actions.html</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersetBreakpointoptionsexceptionhtml">trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception.html</a></li>
<li><a href="#trunkLayoutTestsinspectordomdomsearchexpectedtxt">trunk/LayoutTests/inspector/dom/dom-search-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="#trunkLayoutTestsinspectordomresourcesdomsearchqueriesjs">trunk/LayoutTests/inspector/dom/resources/dom-search-queries.js</a></li>
<li><a href="#trunkLayoutTestsinspectorreplaywindownavigatorpluginsmemoizedhtml">trunk/LayoutTests/inspector/replay/window-navigator-plugins-memoized.html</a></li>
<li><a href="#trunkLayoutTestsinspectortimelinedebuggerpausedwhilerecordinghtml">trunk/LayoutTests/inspector/timeline/debugger-paused-while-recording.html</a></li>
<li><a href="#trunkLayoutTestsinspectortimelineexceptionininjectedscriptwhilerecordinghtml">trunk/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html</a></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="#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="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTesthtml">trunk/Source/WebInspectorUI/UserInterface/Test.html</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeTestRunnercpp">trunk/Tools/DumpRenderTree/TestRunner.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreeTestRunnerh">trunk/Tools/DumpRenderTree/TestRunner.h</a></li>
<li><a href="#trunkToolsDumpRenderTreemacTestRunnerMacmm">trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreewinTestRunnerWincpp">trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleeflTestRunnerEflcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundlegtkTestRunnerGtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundlemacTestRunnerMacmm">trunk/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsinspectorresourcesProtocolTestStubhtml">trunk/LayoutTests/http/tests/inspector/resources/ProtocolTestStub.html</a></li>
<li><a href="#trunkLayoutTestshttptestsinspectorresourcesProtocolTestStubjs">trunk/LayoutTests/http/tests/inspector/resources/ProtocolTestStub.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseTestjs">trunk/Source/WebInspectorUI/UserInterface/Base/Test.js</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li>trunk/Source/WebInspectorUI/UserInterface/Test/</li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTestStubhtml">trunk/Source/WebInspectorUI/UserInterface/TestStub.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/ChangeLog        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-08-17 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r188539, r188544, r188552, and
+ r188564.
+ https://bugs.webkit.org/show_bug.cgi?id=148122
+
+ Broke tests and some build styles (Requested by ap on
+ #webkit).
+
+ Reverted changesets:
+
+ "Web Inspector: load ProtocolTestStub from the WebInspectorUI
+ bundle"
+ https://bugs.webkit.org/show_bug.cgi?id=147955
+ http://trac.webkit.org/changeset/188539
+
+ "Web Inspector: split TestStub.js into multiple files and
+ modernize it"
+ https://bugs.webkit.org/show_bug.cgi?id=148077
+ http://trac.webkit.org/changeset/188544
+
+ "Web Inspector: InspectorTest should be a subclass of
+ TestHarness"
+ https://bugs.webkit.org/show_bug.cgi?id=148079
+ http://trac.webkit.org/changeset/188552
+
+ "Unreviewed internal build fix attempt after r188539."
+ http://trac.webkit.org/changeset/188564
+
</ins><span class="cx"> 2015-08-17 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Outline with auto style leaves bits behind when the the box is moved.
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/TestExpectations        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -94,9 +94,6 @@
</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>-# These tests will be rewritten, just skip them until that time.
-webkit.org/b/148036 http/tests/inspector/ [ Skip ]
-
</del><span class="cx"> webkit.org/b/129639 inspector/dom/dom-search-crash.html [ Skip ]
</span><span class="cx">
</span><span class="cx"> webkit.org/b/133761 inspector/debugger/breakpoint-action-detach.html [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectordebuggerdebuggertestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector/debugger/debugger-test.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/debugger/debugger-test.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/http/tests/inspector/debugger/debugger-test.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-TestPage.registerInitializer(function() {
</del><ins>+InspectorTestProxy.registerInitializer(function() {
</ins><span class="cx">
</span><span class="cx"> InspectorTest.startTracingBreakpoints = function()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectordomresourcesInspectorDOMListenerjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector/dom/resources/InspectorDOMListener.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/dom/resources/InspectorDOMListener.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/http/tests/inspector/dom/resources/InspectorDOMListener.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -27,9 +27,7 @@
</span><span class="cx"> * SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-TestPage.registerInitializer(function(){
-
-window.createDOMListener = function()
</del><ins>+function createDOMListener()
</ins><span class="cx"> {
</span><span class="cx"> var nodesById = {};
</span><span class="cx">
</span><span class="lines">@@ -103,5 +101,3 @@
</span><span class="cx"> collectNode: collectNode
</span><span class="cx"> };
</span><span class="cx"> }
</span><del>-
-});
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectordomshapestestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector/dom/shapes-test.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/dom/shapes-test.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/http/tests/inspector/dom/shapes-test.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-TestPage.registerInitializer(function() {
</del><ins>+InspectorTestProxy.registerInitializer(function() {
</ins><span class="cx">
</span><span class="cx"> InspectorTest.Shapes = {
</span><span class="cx"> getShapeOutsideInfoForSelector: function(selector, callback)
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorreplayreplaytestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector/replay/replay-test.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/replay/replay-test.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/http/tests/inspector/replay/replay-test.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-TestPage.registerInitializer(function() {
</del><ins>+InspectorTestProxy.registerInitializer(function() {
</ins><span class="cx">
</span><span class="cx"> InspectorTest.Replay = {};
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorresourcesProtocolTestStubhtmlfromrev188578trunkSourceWebInspectorUIUserInterfaceTestStubhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/http/tests/inspector/resources/ProtocolTestStub.html (from rev 188578, trunk/Source/WebInspectorUI/UserInterface/TestStub.html) (0 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/resources/ProtocolTestStub.html         (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/resources/ProtocolTestStub.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+<!--
+Copyright (C) 2012 Samsung Electronics. All rights reserved.
+Copyright (C) 2015 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<html>
+<head>
+ <script type="text/javascript" src="ProtocolTestStub.js"></script>
+</head>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorresourcesProtocolTestStubjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/inspector/resources/ProtocolTestStub.js (0 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/resources/ProtocolTestStub.js         (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/resources/ProtocolTestStub.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -0,0 +1,498 @@
</span><ins>+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+InspectorFrontendAPI = {};
+
+InjectedTestHarness = class InjectedTestHarness
+{
+ constructor()
+ {
+ this._logCount = 0;
+ this.forceSyncDebugLogging = false;
+ }
+
+ completeTest()
+ {
+ throw new Error("Must be implemented by subclasses.");
+ }
+
+ addResult()
+ {
+ throw new Error("Must be implemented by subclasses.");
+ }
+
+ debugLog()
+ {
+ throw new Error("Must be implemented by subclasses.");
+ }
+
+ evaluateInPage(string, callback)
+ {
+ throw new Error("Must be implemented by subclasses.");
+ }
+
+ createAsyncSuite(name)
+ {
+ return new InjectedTestHarness.AsyncTestSuite(this, name);
+ }
+
+ createSyncSuite(name)
+ {
+ return new InjectedTestHarness.SyncTestSuite(this, name);
+ }
+
+ importScript(scriptName)
+ {
+ var xhr = new XMLHttpRequest();
+ var isAsyncRequest = false;
+ xhr.open("GET", scriptName, isAsyncRequest);
+ xhr.send(null);
+ if (xhr.status !== 0 && xhr.status !== 200)
+ throw new Error("Invalid script URL: " + scriptName);
+ var script = `// From InjectedTestHarness.importScript(${scriptName})
+try {
+ ${xhr.responseText}
+} catch (e) {
+ alert(${JSON.stringify("Error in: " + scriptName)});
+ throw e;
+}`;
+ window.eval(script);
+ }
+
+ get logCount()
+ {
+ return this._logCount;
+ }
+
+ log(message)
+ {
+ ++this._logCount;
+
+ if (this.forceSyncDebugLogging)
+ this.debugLog(message);
+ else
+ this.addResult(message);
+ }
+
+ assert(condition, message)
+ {
+ if (condition)
+ return;
+
+ let stringifiedMessage = typeof message !== "object" ? message : JSON.stringify(message);
+ this.addResult("ASSERT: " + stringifiedMessage);
+ }
+
+ expectThat(condition, message)
+ {
+ let prefix = condition ? "PASS" : "FAIL";
+ let stringifiedMessage = typeof message !== "object" ? message : JSON.stringify(message);
+ this.addResult(prefix + ": " + stringifiedMessage);
+ }
+}
+
+InjectedTestHarness.AsyncTestSuite = class AsyncTestSuite
+{
+ constructor(harness, name) {
+ if (!(harness instanceof InjectedTestHarness))
+ throw new Error("Must pass the test's harness as the first argument.");
+
+ if (!name || typeof name !== "string")
+ throw new Error("Tried to create AsyncTestSuite without string suite name.");
+
+ this.name = name;
+ this._harness = harness;
+
+ this.testcases = [];
+ this.runCount = 0;
+ this.failCount = 0;
+ }
+
+ get passCount()
+ {
+ return this.runCount - this.failCount;
+ }
+
+ get skipCount()
+ {
+ if (this.failCount)
+ return this.testcases.length - this.runCount;
+ else
+ return 0;
+ }
+
+ addTestCase(testcase)
+ {
+ if (!testcase || !(testcase instanceof Object))
+ throw new Error("Tried to add non-object test case.");
+
+ if (typeof testcase.name !== "string")
+ throw new Error("Tried to add test case without a name.");
+
+ if (typeof testcase.test !== "function")
+ throw new Error("Tried to add test case without `test` function.");
+
+ this.testcases.push(testcase);
+ }
+
+ // Use this if the test file only has one suite, and no handling
+ // of the promise returned by runTestCases() is needed.
+ runTestCasesAndFinish()
+ {
+ function finish() {
+ this._harness.completeTest();
+ }
+
+ this.runTestCases()
+ .then(finish.bind(this))
+ .catch(finish.bind(this));
+ }
+
+ runTestCases()
+ {
+ if (!this.testcases.length)
+ throw new Error("Tried to call runTestCases() for suite with no test cases");
+ if (this._startedRunning)
+ throw new Error("Tried to call runTestCases() more than once.");
+
+ this._startedRunning = true;
+
+ this._harness.log("");
+ this._harness.log("== Running test suite: " + this.name);
+
+ // Avoid adding newlines if nothing was logged.
+ var priorLogCount = this._harness.logCount;
+ var suite = this;
+ var result = this.testcases.reduce(function(chain, testcase, i) {
+ return chain.then(function() {
+ if (i > 0 && priorLogCount + 1 < suite._harness.logCount)
+ suite._harness.log("");
+
+ priorLogCount = suite._harness.logCount;
+ suite._harness.log("-- Running test case: " + testcase.name);
+ suite.runCount++;
+ return new Promise(testcase.test);
+ });
+ }, Promise.resolve());
+
+ return result.catch(function(e) {
+ suite.failCount++;
+ var message = e;
+ if (e instanceof Error)
+ message = e.message;
+
+ if (typeof message !== "string")
+ message = JSON.stringify(message);
+
+ suite._harness.log("!! EXCEPTION: " + message);
+ throw e; // Reject this promise by re-throwing the error.
+ });
+ }
+}
+
+InjectedTestHarness.SyncTestSuite = class SyncTestSuite
+{
+ constructor(harness, name) {
+ if (!(harness instanceof InjectedTestHarness))
+ throw new Error("Must pass the test's harness as the first argument.");
+
+ if (!name || typeof name !== "string")
+ throw new Error("Tried to create SyncTestSuite without string suite name.");
+
+ this.name = name;
+ this._harness = harness;
+
+ this.testcases = [];
+ this.runCount = 0;
+ this.failCount = 0;
+ }
+
+ get passCount()
+ {
+ return this.runCount - this.failCount;
+ }
+
+ get skipCount()
+ {
+ if (this.failCount)
+ return this.testcases.length - this.runCount;
+ else
+ return 0;
+ }
+
+ addTestCase(testcase)
+ {
+ if (!testcase || !(testcase instanceof Object))
+ throw new Error("Tried to add non-object test case.");
+
+ if (typeof testcase.name !== "string")
+ throw new Error("Tried to add test case without a name.");
+
+ if (typeof testcase.test !== "function")
+ throw new Error("Tried to add test case without `test` function.");
+
+ this.testcases.push(testcase);
+ }
+
+ // Use this if the test file only has one suite.
+ runTestCasesAndFinish()
+ {
+ this.runTestCases();
+ this._harness.completeTest();
+ }
+
+ runTestCases()
+ {
+ if (!this.testcases.length)
+ throw new Error("Tried to call runTestCases() for suite with no test cases");
+ if (this._startedRunning)
+ throw new Error("Tried to call runTestCases() more than once.");
+
+ this._startedRunning = true;
+
+ this._harness.log("");
+ this._harness.log("== Running test suite: " + this.name);
+
+ var priorLogCount = this._harness.logCount;
+ var suite = this;
+ for (var i = 0; i < this.testcases.length; i++) {
+ var testcase = this.testcases[i];
+ if (i > 0 && priorLogCount + 1 < this._harness.logCount)
+ this._harness.log("");
+
+ priorLogCount = this._harness.logCount;
+
+ this._harness.log("-- Running test case: " + testcase.name);
+ suite.runCount++;
+ try {
+ var result = testcase.test.call(null);
+ if (result === false) {
+ suite.failCount++;
+ return false;
+ }
+ } catch (e) {
+ suite.failCount++;
+ var message = e;
+ if (e instanceof Error)
+ message = e.message;
+ else
+ e = new Error(e);
+
+ if (typeof message !== "string")
+ message = JSON.stringify(message);
+
+ this._harness.log("!! EXCEPTION: " + message);
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
+
+class ProtocolTestHarness extends InjectedTestHarness
+{
+ // InjectedTestHarness Overrides
+
+ completeTest()
+ {
+ this.evaluateInPage("closeTest();");
+ }
+
+ addResult(message)
+ {
+ // Unfortunately, every string argument must be escaped because tests are not consistent
+ // with respect to escaping with single or double quotes. Some exceptions use single quotes.
+ var stringifiedMessage = typeof message !== "string" ? JSON.stringify(message) : message;
+ this.evaluateInPage("log(unescape('" + escape(stringifiedMessage) + "'));");
+ }
+
+ debugLog(message)
+ {
+ var stringifiedMessage = typeof message !== "string" ? JSON.stringify(message) : message;
+ this.evaluateInPage("debugLog(unescape('" + escape(stringifiedMessage) + "'));")
+ }
+
+ evaluateInPage(expression, callback)
+ {
+ let args = {
+ method: "Runtime.evaluate",
+ params: {expression}
+ }
+
+ if (typeof callback === "function")
+ InspectorProtocol.sendCommand(args, callback);
+ else
+ return InspectorProtocol.awaitCommand(args);
+ }
+}
+
+window.ProtocolTest = new ProtocolTestHarness();
+
+InspectorProtocol = {};
+InspectorProtocol._dispatchTable = [];
+InspectorProtocol._requestId = -1;
+InspectorProtocol.eventHandler = {};
+
+InspectorProtocol.dumpInspectorProtocolMessages = false;
+
+InspectorProtocol.sendCommand = function(methodOrObject, params, handler)
+{
+ // Allow new-style arguments object, as in awaitCommand.
+ var method = methodOrObject;
+ if (typeof methodOrObject === "object")
+ var {method, params, handler} = methodOrObject;
+
+ this._dispatchTable[++this._requestId] = handler;
+ var messageObject = {method, params, "id": this._requestId};
+ this.sendMessage(messageObject);
+
+ return this._requestId;
+}
+
+InspectorProtocol.awaitCommand = function(args)
+{
+ var {method, params} = args;
+ return new Promise(function(resolve, reject) {
+ this._dispatchTable[++this._requestId] = {resolve, reject};
+ var messageObject = {method, params, "id": this._requestId};
+ this.sendMessage(messageObject);
+ }.bind(this));
+}
+
+InspectorProtocol.awaitEvent = function(args)
+{
+ var {event} = args;
+ if (typeof event !== "string")
+ throw new Error("Event must be a string.");
+
+ return new Promise(function(resolve, reject) {
+ InspectorProtocol.eventHandler[event] = function(message) {
+ InspectorProtocol.eventHandler[event] = undefined;
+ resolve(message);
+ }
+ });
+}
+
+InspectorProtocol.addEventListener = function(eventTypeOrObject, listener)
+{
+ var event = eventTypeOrObject;
+ if (typeof eventTypeOrObject === "object")
+ var {event, listener} = eventTypeOrObject;
+
+ if (typeof event !== "string")
+ throw new Error("Event name must be a string.");
+
+ if (typeof listener !== "function")
+ throw new Error("Event listener must be callable.");
+
+ // Convert to an array of listeners.
+ var listeners = InspectorProtocol.eventHandler[event];
+ if (!listeners)
+ listeners = InspectorProtocol.eventHandler[event] = [];
+ else if (typeof listeners === "function")
+ listeners = InspectorProtocol.eventHandler[event] = [listeners];
+
+ // Prevent registering multiple times.
+ if (listeners.includes(listener))
+ throw new Error("Cannot register the same listener more than once.");
+
+ listeners.push(listener);
+}
+
+InspectorProtocol.sendMessage = function(messageObject)
+{
+ // This matches the debug dumping in InspectorBackend, which is bypassed
+ // by InspectorProtocol. Return messages should be dumped by InspectorBackend.
+ if (InspectorProtocol.dumpInspectorProtocolMessages)
+ console.log("frontend: " + JSON.stringify(messageObject));
+
+ InspectorFrontendHost.sendMessageToBackend(JSON.stringify(messageObject));
+}
+
+InspectorProtocol.checkForError = function(responseObject)
+{
+ if (responseObject.error) {
+ ProtocolTest.log("PROTOCOL ERROR: " + JSON.stringify(responseObject.error));
+ ProtocolTest.completeTest();
+ throw "PROTOCOL ERROR";
+ }
+}
+
+InspectorFrontendAPI.dispatchMessageAsync = function(messageObject)
+{
+ // This matches the debug dumping in InspectorBackend, which is bypassed
+ // by InspectorProtocol. Return messages should be dumped by InspectorBackend.
+ if (InspectorProtocol.dumpInspectorProtocolMessages)
+ console.log("backend: " + JSON.stringify(messageObject));
+
+ // If the message has an id, then it is a reply to a command.
+ var messageId = messageObject["id"];
+ if (typeof messageId === "number") {
+ var handler = InspectorProtocol._dispatchTable[messageId];
+ if (!handler)
+ return;
+
+ if (typeof handler === "function")
+ handler(messageObject);
+ else if (typeof handler === "object") {
+ var {resolve, reject} = handler;
+ if ("error" in messageObject)
+ reject(messageObject.error.message);
+ else
+ resolve(messageObject.result);
+ }
+ // Otherwise, it is an event.
+ } else {
+ var eventName = messageObject["method"];
+ var handler = InspectorProtocol.eventHandler[eventName];
+ if (!handler)
+ return;
+
+ if (typeof handler === "function")
+ handler(messageObject);
+ else if (handler instanceof Array) {
+ handler.map(function(listener) {
+ listener.call(null, messageObject);
+ });
+ } else if (typeof handler === "object") {
+ var {resolve, reject} = handler;
+ if ("error" in messageObject)
+ reject(messageObject.error.message);
+ else
+ resolve(messageObject.result);
+ }
+ }
+}
+
+window.addEventListener("message", function(event) {
+ try {
+ eval(event.data);
+ } catch (e) {
+ alert(e.stack);
+ ProtocolTest.completeTest();
+ throw e;
+ }
+});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorresourcesconsoletestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector/resources/console-test.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/resources/console-test.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/http/tests/inspector/resources/console-test.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><del>-TestPage.registerInitializer(function() {
-
</del><span class="cx"> ProtocolTest.Console = {};
</span><span class="cx">
</span><span class="cx"> ProtocolTest.Console.sanitizeConsoleMessage = function(messageObject)
</span><span class="lines">@@ -34,7 +32,7 @@
</span><span class="cx">
</span><span class="cx"> ProtocolTest.Console.addTestCase = function(suite, args)
</span><span class="cx"> {
</span><del>- if (!(suite instanceof AsyncTestSuite))
</del><ins>+ if (!(suite instanceof InjectedTestHarness.AsyncTestSuite))
</ins><span class="cx"> throw new Error("Console test cases must be added to an async test suite.");
</span><span class="cx">
</span><span class="cx"> var {name, description, expression, expected} = args;
</span><span class="lines">@@ -75,5 +73,3 @@
</span><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx"> }
</span><del>-
-});
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorresourcesinspectortestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector/resources/inspector-test.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/resources/inspector-test.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/http/tests/inspector/resources/inspector-test.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -24,13 +24,13 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> // This namespace is injected into every test page. Its functions are invoked by
</span><del>-// InspectorTest methods on the inspector page via a TestHarness subclass.
-TestPage = {};
-TestPage._initializers = [];
</del><ins>+// InspectorTest methods on the inspector page via RuntimeAgent.evaluate() calls.
+InspectorTestProxy = {};
+InspectorTestProxy._initializers = [];
</ins><span class="cx">
</span><span class="cx"> // Helper scripts like `debugger-test.js` must register their initialization
</span><span class="cx"> // function with this method so it will be marshalled to the inspector page.
</span><del>-TestPage.registerInitializer = function(initializer)
</del><ins>+InspectorTestProxy.registerInitializer = function(initializer)
</ins><span class="cx"> {
</span><span class="cx"> if (typeof initializer === "function")
</span><span class="cx"> this._initializers.push(initializer.toString());
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- var codeStringToEvaluate = "(" + runInitializationMethodsInFrontend.toString() + ")([" + TestPage._initializers + "]);";
</del><ins>+ var codeStringToEvaluate = "(" + runInitializationMethodsInFrontend.toString() + ")([" + InspectorTestProxy._initializers + "]);";
</ins><span class="cx"> testRunner.evaluateInWebInspector(codeStringToEvaluate);
</span><span class="cx">
</span><span class="cx"> // `test` refers to a function defined in global scope in the test HTML page.
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> testRunner.evaluateInWebInspector(codeStringToEvaluate);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TestPage.completeTest = function()
</del><ins>+InspectorTestProxy.completeTest = function()
</ins><span class="cx"> {
</span><span class="cx"> // Don't try to use testRunner if running through the browser.
</span><span class="cx"> if (!window.testRunner)
</span><span class="lines">@@ -112,13 +112,13 @@
</span><span class="cx">
</span><span class="cx"> // Logs message to unbuffered process stdout, avoiding timeouts.
</span><span class="cx"> // only be used to debug tests and not to produce normal test output.
</span><del>-TestPage.debugLog = function(message)
</del><ins>+InspectorTestProxy.debugLog = function(message)
</ins><span class="cx"> {
</span><span class="cx"> window.alert(message);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Add and clear test output from the results window.
</span><del>-TestPage.addResult = function(text)
</del><ins>+InspectorTestProxy.addResult = function(text)
</ins><span class="cx"> {
</span><span class="cx"> // For early errors triggered when loading the test page, write to stderr.
</span><span class="cx"> if (!document.body) {
</span><span class="lines">@@ -135,11 +135,11 @@
</span><span class="cx"> this._resultElement.append(text, document.createElement("br"));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TestPage.needToSanitizeUncaughtExceptionURLs = false;
</del><ins>+InspectorTestProxy.needToSanitizeUncaughtExceptionURLs = false;
</ins><span class="cx">
</span><del>-TestPage.reportUncaughtException = function(message, url, lineNumber)
</del><ins>+InspectorTestProxy.reportUncaughtException = function(message, url, lineNumber)
</ins><span class="cx"> {
</span><del>- if (TestPage.needToSanitizeUncaughtExceptionURLs) {
</del><ins>+ if (InspectorTestProxy.needToSanitizeUncaughtExceptionURLs) {
</ins><span class="cx"> if (typeof url == "string") {
</span><span class="cx"> var lastSlash = url.lastIndexOf("/");
</span><span class="cx"> var lastBackSlash = url.lastIndexOf("\\");
</span><span class="lines">@@ -150,9 +150,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> var result = "Uncaught exception in test page: " + message + " [" + url + ":" + lineNumber + "]";
</span><del>- TestPage.addResult(result);
- TestPage.completeTest();
</del><ins>+ InspectorTestProxy.addResult(result);
+ InspectorTestProxy.completeTest();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Catch syntax errors, type errors, and other exceptions. Run this before loading other files.
</span><del>-window.onerror = TestPage.reportUncaughtException;
</del><ins>+window.onerror = InspectorTestProxy.reportUncaughtException;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorresourcesprobetestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector/resources/probe-test.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/resources/probe-test.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/http/tests/inspector/resources/probe-test.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,5 +1,3 @@
</span><del>-TestPage.registerInitializer(function() {
-
</del><span class="cx"> ProtocolTest.Probe = {};
</span><span class="cx">
</span><span class="cx"> ProtocolTest.Probe.sanitizeProbeSample = function(messageObject)
</span><span class="lines">@@ -127,5 +125,3 @@
</span><span class="cx"> InspectorTest.log("Probe set's probe count: " + probeSet.probes.length);
</span><span class="cx"> });
</span><span class="cx"> }
</span><del>-
-});
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsinspectorresourcesprotocoltestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/inspector/resources/protocol-test.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/inspector/resources/protocol-test.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/http/tests/inspector/resources/protocol-test.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -23,34 +23,27 @@
</span><span class="cx"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span class="cx"> * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><ins>+var outputElement;
</ins><span class="cx">
</span><del>-// This namespace is injected into every test page. Its functions are invoked by
-// ProtocolTest methods on the inspector page via a TestHarness subclass.
-TestPage = {};
-TestPage._initializers = [];
-
-// Helper scripts like `console-test.js` must register their initialization
-// function with this method so it will be marshalled to the inspector page.
-TestPage.registerInitializer = function(initializer)
</del><ins>+/**
+ * Logs message to process stdout via alert (hopefully implemented with immediate flush).
+ * @param {string} text
+ */
+function debugLog(text)
</ins><span class="cx"> {
</span><del>- if (typeof initializer === "function")
- this._initializers.push(initializer.toString());
-};
-
-let outputElement;
-
-TestPage.debugLog = window.debugLog = function(text)
-{
</del><span class="cx"> alert(text);
</span><del>-};
</del><ins>+}
</ins><span class="cx">
</span><del>-TestPage.log = window.log = function(text)
</del><ins>+/**
+ * @param {string} text
+ */
+function log(text)
</ins><span class="cx"> {
</span><span class="cx"> if (!outputElement) {
</span><del>- let intermediate = document.createElement("div");
</del><ins>+ var intermediate = document.createElement("div");
</ins><span class="cx"> document.body.appendChild(intermediate);
</span><span class="cx">
</span><del>- let intermediate2 = document.createElement("div");
</del><ins>+ var intermediate2 = document.createElement("div");
</ins><span class="cx"> intermediate.appendChild(intermediate2);
</span><span class="cx">
</span><span class="cx"> outputElement = document.createElement("div");
</span><span class="lines">@@ -61,9 +54,9 @@
</span><span class="cx"> }
</span><span class="cx"> outputElement.appendChild(document.createTextNode(text));
</span><span class="cx"> outputElement.appendChild(document.createElement("br"));
</span><del>-};
</del><ins>+}
</ins><span class="cx">
</span><del>-TestPage.closeTest = window.closeTest = function()
</del><ins>+function closeTest()
</ins><span class="cx"> {
</span><span class="cx"> window.internals.closeDummyInspectorFrontend();
</span><span class="cx">
</span><span class="lines">@@ -72,59 +65,39 @@
</span><span class="cx"> setTimeout(function() {
</span><span class="cx"> testRunner.notifyDone();
</span><span class="cx"> }, 0);
</span><del>-};
</del><ins>+}
</ins><span class="cx">
</span><del>-TestPage.runTest = window.runTest = function()
</del><ins>+function runTest()
</ins><span class="cx"> {
</span><span class="cx"> if (!window.testRunner) {
</span><del>- console.error("This test must be run via DumpRenderTree or WebKitTestRunner.");
</del><ins>+ console.error("This test requires DumpRenderTree");
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><del>-
</del><span class="cx"> testRunner.dumpAsText();
</span><span class="cx"> testRunner.waitUntilDone();
</span><span class="cx"> testRunner.setCanOpenWindows(true);
</span><span class="cx">
</span><del>- let testFunction = window.test;
- if (typeof testFunction !== "function") {
- alert("Failed to send test() because it is not a function.");
- testRunner.notifyDone();
- }
-
- let url = testRunner.inspectorTestStubURL;
- if (!url) {
- alert("Failed to obtain inspector test stub URL.");
- testRunner.notifyDone();
- }
-
- function runInitializationMethodsInFrontend(initializers)
- {
- for (let initializer of initializers) {
- try {
- initializer();
- } catch (e) {
- ProtocolTest.log("Exception in test initialization: " + e, e.stack || "(no stack trace)");
- ProtocolTest.completeTest();
- }
</del><ins>+ var scriptTags = document.getElementsByTagName("script");
+ var scriptUrlBasePath = "";
+ for (var i = 0; i < scriptTags.length; ++i) {
+ var index = scriptTags[i].src.lastIndexOf("/protocol-test.js");
+ if (index > -1 ) {
+ scriptUrlBasePath = scriptTags[i].src.slice(0, index);
+ break;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function runTestMethodInFrontend(testFunction)
- {
- try {
- testFunction();
- } catch (e) {
- ProtocolTest.log("Exception during test execution: " + e, e.stack || "(no stack trace)");
- ProtocolTest.completeTest();
- }
- }
-
- let inspectorFrontend = window.internals.openDummyInspectorFrontend(url);
</del><ins>+ var url = scriptUrlBasePath + "/ProtocolTestStub.html";
+ var inspectorFrontend = window.internals.openDummyInspectorFrontend(url);
</ins><span class="cx"> inspectorFrontend.addEventListener("load", function(event) {
</span><del>- let initializationCodeString = `(${runInitializationMethodsInFrontend.toString()})([${TestPage._initializers}]);`;
- let testFunctionCodeString = `(${runTestMethodInFrontend.toString()})(${testFunction.toString()});`;
-
- inspectorFrontend.postMessage(initializationCodeString, "*");
- inspectorFrontend.postMessage(testFunctionCodeString, "*");
</del><ins>+ // FIXME: rename this 'test' global field across all tests.
+ var testFunction = window.test;
+ if (typeof testFunction === "function") {
+ inspectorFrontend.postMessage("(" + testFunction.toString() +")();", "*");
+ return;
+ }
+ // Kill waiting process if failed to send.
+ alert("Failed to send test function");
+ testRunner.notifyDone();
</ins><span class="cx"> });
</span><del>-};
</del><ins>+}
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorconsoleconsolemessagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/console-message.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/console-message.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/console/console-message.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -2,7 +2,6 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script src="../../http/tests/inspector/resources/console-test.js"></script>
</del><span class="cx"> <script>
</span><span class="cx"> function generateSimpleConsoleMessages()
</span><span class="cx"> {
</span><span class="lines">@@ -15,6 +14,7 @@
</span><span class="cx">
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><ins>+ ProtocolTest.importScript("console-test.js");
</ins><span class="cx">
</span><span class="cx"> var suite = ProtocolTest.createAsyncSuite("Console.MessagesFromCommandLineAPI");
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolecsssourcelocationsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/css-source-locations-expected.txt (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/css-source-locations-expected.txt        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/console/css-source-locations-expected.txt        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><span class="cx"> Tests that CSS parser warnings from inline style tags and external stylesheets are sent to the console with correct line and column information.
</span><del>-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"css-source-locations.html:7:20"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"css-source-locations.html:8:14"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"css-source-locations.html:9:7"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"css-source-locations.html:11:8"}
</del><ins>+{"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"}
</ins><span class="cx"> {"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:1:7"}
</span><span class="cx"> {"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:1:29"}
</span><span class="cx"> {"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:4:5"}
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolecsssourcelocationshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/css-source-locations.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/css-source-locations.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/console/css-source-locations.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -2,7 +2,6 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script src="../../http/tests/inspector/resources/console-test.js"></script>
</del><span class="cx"> <link rel="stylesheet" href="resources/errors.css">
</span><span class="cx"> <style> div { * color: red; }</style>
</span><span class="cx"> <style>div { * color: red; }
</span><span class="lines">@@ -16,6 +15,8 @@
</span><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><ins>+ ProtocolTest.importScript("console-test.js");
+
</ins><span class="cx"> var consoleMessageCount = 0;
</span><span class="cx"> const expectedConsoleMessageCount = 7;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolejssourcelocationsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/js-source-locations-expected.txt (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/js-source-locations-expected.txt        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/console/js-source-locations-expected.txt        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -2,17 +2,17 @@
</span><span class="cx"> CONSOLE MESSAGE: line 1: warn script
</span><span class="cx"> CONSOLE MESSAGE: line 5: error script
</span><span class="cx"> CONSOLE MESSAGE: line 6: warn script
</span><del>-CONSOLE MESSAGE: line 7: TypeError: undefined is not an object (evaluating '[].x.x')
-CONSOLE MESSAGE: line 9: warn 1
-CONSOLE MESSAGE: line 9: error 1
-CONSOLE MESSAGE: line 10: error 2
</del><ins>+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
</ins><span class="cx"> Tests that JavaScript errors and warnings from inline script tags and external files are sent to the console with correct line and column information.
</span><span class="cx"> {"source":"console-api","level":"error","text":"error script","location":"errors.js:1:14","parameters":[{"type":"string"}]}
</span><span class="cx"> {"source":"console-api","level":"warning","text":"warn script","location":"errors.js:1:44","parameters":[{"type":"string"}]}
</span><span class="cx"> {"source":"console-api","level":"error","text":"error script","location":"errors.js:5:18","parameters":[{"type":"string"}]}
</span><span class="cx"> {"source":"console-api","level":"warning","text":"warn script","location":"errors.js:6:17","parameters":[{"type":"string"}]}
</span><del>-{"source":"javascript","level":"error","text":"TypeError: undefined is not an object (evaluating '[].x.x')","location":"js-source-locations.html:7:18"}
-{"source":"console-api","level":"warning","text":"warn 1","location":"js-source-locations.html:9:13","parameters":[{"type":"string"}]}
-{"source":"console-api","level":"error","text":"error 1","location":"js-source-locations.html:9:38","parameters":[{"type":"string"}]}
-{"source":"console-api","level":"error","text":"error 2","location":"js-source-locations.html:10:17","parameters":[{"type":"string"}]}
</del><ins>+{"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 class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolejssourcelocationshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/js-source-locations.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/js-source-locations.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/console/js-source-locations.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -2,7 +2,6 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script src="../../http/tests/inspector/resources/console-test.js"></script>
</del><span class="cx"> <script src="resources/errors.js"></script>
</span><span class="cx"> <script> [].x.x </script>
</span><span class="cx"> <script>
</span><span class="lines">@@ -12,6 +11,8 @@
</span><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><ins>+ ProtocolTest.importScript("console-test.js");
+
</ins><span class="cx"> var consoleMessageCount = 0;
</span><span class="cx"> const expectedConsoleMessageCount = 8;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolexframeoptionsmessageexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/x-frame-options-message-expected.txt (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/x-frame-options-message-expected.txt        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/console/x-frame-options-message-expected.txt        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 41: Refused to display 'x-frame-options-message.html' in a frame because it set 'X-Frame-Options' to 'deny'.
</del><ins>+CONSOLE MESSAGE: line 42: Refused to display 'x-frame-options-message.html' in a frame because it set 'X-Frame-Options' to 'deny'.
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> == Running test suite: Console.XFrameOptionsMessages
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorconsolexframeoptionsmessagehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/console/x-frame-options-message.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/console/x-frame-options-message.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/console/x-frame-options-message.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -2,10 +2,11 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script src="../../http/tests/inspector/resources/console-test.js"></script>
</del><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><ins>+ ProtocolTest.importScript("console-test.js");
+
</ins><span class="cx"> let suite = ProtocolTest.createAsyncSuite("Console.XFrameOptionsMessages");
</span><span class="cx">
</span><span class="cx"> ProtocolTest.Console.addTestCase(suite, {
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointactionevalhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/breakpoint-action-eval.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoint-action-eval.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-action-eval.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -13,8 +13,8 @@
</span><span class="cx">
</span><span class="cx"> function action(a, b)
</span><span class="cx"> {
</span><del>- TestPage.addResult("Breakpoint action evaluated. a:(" + a + ") b:(" + b + ")");
- TestPage.completeTest();
</del><ins>+ InspectorTestProxy.addResult("Breakpoint action evaluated. a:(" + a + ") b:(" + b + ")");
+ InspectorTestProxy.completeTest();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function test()
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerdidSampleProbemultipleprobeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/debugger/didSampleProbe-multiple-probes.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,11 +1,12 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script src="../../http/tests/inspector/resources/probe-test.js"></script>
</del><span class="cx"> <script src="resources/breakpoint.js"></script>
</span><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><ins>+ ProtocolTest.importScript("probe-test.js");
+
</ins><span class="cx"> InspectorProtocol.sendCommand("Debugger.enable", {});
</span><span class="cx">
</span><span class="cx"> var samples = [];
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesbreakonexceptiontestsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/resources/break-on-exception-tests.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/break-on-exception-tests.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/debugger/resources/break-on-exception-tests.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-TestPage.needToSanitizeUncaughtExceptionURLs = true;
</del><ins>+InspectorTestProxy.needToSanitizeUncaughtExceptionURLs = true;
</ins><span class="cx">
</span><span class="cx"> var arr = [ 1, 2, 3 ];
</span><span class="cx"> var mapData = [[ "a", arr ]];
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerresourcesscriptforbreakpointactionsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/debugger/resources/script-for-breakpoint-actions.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> function breakpointActions(a, b)
</span><span class="cx"> {
</span><span class="cx"> // Only preserve this message on the current test page load.
</span><del>- TestPage.addResult("inside breakpointActions a:(" + a + ") b:(" + b + ")");
</del><ins>+ InspectorTestProxy.addResult("inside breakpointActions a:(" + a + ") b:(" + b + ")");
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersearchscriptshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/search-scripts.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/search-scripts.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/debugger/search-scripts.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> });
</span><span class="cx"> });
</span><span class="cx">
</span><del>- InspectorTest.addEventListener(FrontendTestHarness.Event.TestPageDidLoad, function() {
</del><ins>+ InspectorTest.eventDispatcher.addEventListener(InspectorTest.EventDispatcher.Event.TestPageDidLoad, function() {
</ins><span class="cx"> InspectorTest.evaluateInPage("performEvals()");
</span><span class="cx"> });
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointactionshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/setBreakpoint-actions.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-actions.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-actions.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,12 +1,13 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script src="../../http/tests/inspector/resources/console-test.js"></script>
-<script src="../../http/tests/inspector/resources/probe-test.js"></script>
</del><span class="cx"> <script src="resources/breakpoint.js"></script>
</span><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><ins>+ ProtocolTest.importScript("console-test.js");
+ ProtocolTest.importScript("probe-test.js");
+
</ins><span class="cx"> InspectorProtocol.sendCommand("Console.enable", {});
</span><span class="cx"> InspectorProtocol.sendCommand("Debugger.enable", {});
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersetBreakpointoptionsexceptionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/debugger/setBreakpoint-options-exception.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,11 +1,12 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script src="../../http/tests/inspector/resources/console-test.js"></script>
</del><span class="cx"> <script src="resources/breakpoint.js"></script>
</span><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><ins>+ ProtocolTest.importScript("console-test.js");
+
</ins><span class="cx"> InspectorProtocol.sendCommand("Console.enable", {});
</span><span class="cx"> InspectorProtocol.sendCommand("Debugger.enable", {});
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/dom/dom-search-expected.txt (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search-expected.txt        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/dom/dom-search-expected.txt        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -48,13 +48,11 @@
</span><span class="cx"> === Query: ".body-inside-iframe" ===
</span><span class="cx"> Count: 0
</span><span class="cx"> === Query: "*" ===
</span><del>-Count: 14
</del><ins>+Count: 12
</ins><span class="cx"> html
</span><span class="cx"> head
</span><span class="cx"> script
</span><span class="cx"> script
</span><del>-script
-script
</del><span class="cx"> body.main-frame
</span><span class="cx"> p
</span><span class="cx"> iframe
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchwithcontexthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/dom/dom-search-with-context.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search-with-context.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/dom/dom-search-with-context.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,11 +1,11 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script type="text/javascript" src="../../http/tests/inspector/dom/resources/InspectorDOMListener.js"></script>
</del><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><span class="cx"> // Create a DOM listener to convert nodeIds to tag names.
</span><ins>+ ProtocolTest.importScript("../dom/resources/InspectorDOMListener.js");
</ins><span class="cx"> var dom = createDOMListener();
</span><span class="cx">
</span><span class="cx"> // Caching the output to avoid searching through the log.
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomdomsearchhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/dom/dom-search.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/dom-search.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/dom/dom-search.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,13 +1,14 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script>
</span><del>-<script type="text/javascript" src="../../http/tests/inspector/dom/resources/InspectorDOMListener.js"></script>
-<!-- Loading the queries from external file to avoid having them show up in the results. -->
-<script type="text/javascript" src="resources/dom-search-queries.js"></script>
</del><span class="cx"> <script>
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><ins>+ // Loading the queries from external file to avoid having them show up in the results.
+ ProtocolTest.importScript("../../../../inspector/dom/resources/dom-search-queries.js");
+
</ins><span class="cx"> // Create a DOM listener to convert nodeIds to tag names.
</span><ins>+ ProtocolTest.importScript("../dom/resources/InspectorDOMListener.js");
</ins><span class="cx"> var dom = createDOMListener();
</span><span class="cx">
</span><span class="cx"> // Caching the output to avoid searching through the log.
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomresourcesdomsearchqueriesjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/dom/resources/dom-search-queries.js (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/resources/dom-search-queries.js        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/dom/resources/dom-search-queries.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,8 +1,6 @@
</span><del>-TestPage.registerInitializer(function() {
-
</del><span class="cx"> // Having the queries in an external file, so that DOM search will not find the script when searching for values.
</span><span class="cx">
</span><del>-window.domSearchQueries = [
</del><ins>+var domSearchQueries = [
</ins><span class="cx"> "body",
</span><span class="cx"> "<body",
</span><span class="cx"> "body>",
</span><span class="lines">@@ -30,6 +28,4 @@
</span><span class="cx"> "/html/body",
</span><span class="cx"> "/html/body/@onload",
</span><span class="cx"> "/HTML/BODY"
</span><del>-];
-
-});
</del><span class="cx">\ No newline at end of file
</span><ins>+];
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorreplaywindownavigatorpluginsmemoizedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/replay/window-navigator-plugins-memoized.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/replay/window-navigator-plugins-memoized.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/replay/window-navigator-plugins-memoized.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -77,12 +77,12 @@
</span><span class="cx"> // These functions are called in the previous main frame prior to the initial
</span><span class="cx"> // navigation that begins capturing or replaying. Careful, heap state will be lost.
</span><span class="cx"> function setupPreCapture() {
</span><del>- TestPage.addResult("Enabling plugins before capture.");
</del><ins>+ InspectorTestProxy.addResult("Enabling plugins before capture.");
</ins><span class="cx"> testRunner.setPluginsEnabled(false);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function setupPreReplay() {
</span><del>- TestPage.addResult("Disabling plugins before replay.");
</del><ins>+ InspectorTestProxy.addResult("Disabling plugins before replay.");
</ins><span class="cx"> testRunner.setPluginsEnabled(true);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectortimelinedebuggerpausedwhilerecordinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/timeline/debugger-paused-while-recording.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/timeline/debugger-paused-while-recording.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/timeline/debugger-paused-while-recording.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -15,13 +15,13 @@
</span><span class="cx">
</span><span class="cx"> function add(a, b)
</span><span class="cx"> {
</span><del>- TestPage.addResult("Calling add(): " + a + " + " + b);
</del><ins>+ InspectorTestProxy.addResult("Calling add(): " + a + " + " + b);
</ins><span class="cx"> return a + b;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function mul(a, b)
</span><span class="cx"> {
</span><del>- TestPage.addResult("Calling mul(): " + a + " * " + b);
</del><ins>+ InspectorTestProxy.addResult("Calling mul(): " + a + " * " + b);
</ins><span class="cx"> return a * b;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectortimelineexceptionininjectedscriptwhilerecordinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/timeline/exception-in-injected-script-while-recording.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -15,13 +15,13 @@
</span><span class="cx">
</span><span class="cx"> function add(a, b)
</span><span class="cx"> {
</span><del>- TestPage.addResult("Calling add(): " + a + " + " + b);
</del><ins>+ InspectorTestProxy.addResult("Calling add(): " + a + " + " + b);
</ins><span class="cx"> return a + b;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function mul(a, b)
</span><span class="cx"> {
</span><del>- TestPage.addResult("Calling mul(): " + a + " * " + b);
</del><ins>+ InspectorTestProxy.addResult("Calling mul(): " + a + " * " + b);
</ins><span class="cx"> return a * b;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsasynctestsuiteexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/unit-tests/async-test-suite-expected.txt (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/async-test-suite-expected.txt        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/unit-tests/async-test-suite-expected.txt        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,11 +1,9 @@
</span><span class="cx"> PASS: instantiating AsyncTestSuite requires name argument.
</span><span class="cx"> PASS: instantiating AsyncTestSuite requires string name argument.
</span><del>-PASS: instantiating AsyncTestSuite requires non-whitespace name argument.
</del><span class="cx"> PASS: instantiating AsyncTestSuite requires test harness argument.
</span><span class="cx"> PASS: should not be able to add empty test case.
</span><span class="cx"> PASS: should not be able to add non-object test case.
</span><span class="cx"> PASS: test case should require string name.
</span><del>-PASS: test case should require non-whitespace name.
</del><span class="cx"> PASS: test case should require test function.
</span><span class="cx"> PASS: should not be able to run empty test suite.
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsasynctestsuitehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/unit-tests/async-test-suite.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/async-test-suite.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/unit-tests/async-test-suite.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -6,34 +6,27 @@
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><span class="cx"> try {
</span><del>- let result = new AsyncTestSuite(this);
</del><ins>+ let result = new InjectedTestHarness.AsyncTestSuite(this);
</ins><span class="cx"> ProtocolTest.log("FAIL: instantiating AsyncTestSuite requires name argument.");
</span><span class="cx"> } catch (e) {
</span><span class="cx"> ProtocolTest.log("PASS: instantiating AsyncTestSuite requires name argument.");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> try {
</span><del>- let result = new AsyncTestSuite(this, {});
</del><ins>+ let result = new InjectedTestHarness.AsyncTestSuite(this, {});
</ins><span class="cx"> ProtocolTest.log("FAIL: instantiating AsyncTestSuite requires string name argument.");
</span><span class="cx"> } catch (e) {
</span><span class="cx"> ProtocolTest.log("PASS: instantiating AsyncTestSuite requires string name argument.");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> try {
</span><del>- let result = new AsyncTestSuite(this, " ");
- ProtocolTest.log("FAIL: instantiating AsyncTestSuite requires non-whitespace name argument.");
- } catch (e) {
- ProtocolTest.log("PASS: instantiating AsyncTestSuite requires non-whitespace name argument.");
- }
-
- try {
- let result = new AsyncTestSuite("something", {});
</del><ins>+ let result = new InjectedTestHarness.AsyncTestSuite("something", {});
</ins><span class="cx"> ProtocolTest.log("FAIL: instantiating AsyncTestSuite requires test harness argument.");
</span><span class="cx"> } catch (e) {
</span><span class="cx"> ProtocolTest.log("PASS: instantiating AsyncTestSuite requires test harness argument.");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- let badArgsSuite = ProtocolTest.createAsyncSuite("dummy");
</del><ins>+ var badArgsSuite = ProtocolTest.createAsyncSuite("dummy");
</ins><span class="cx"> try {
</span><span class="cx"> badArgsSuite.addTestCase();
</span><span class="cx"> ProtocolTest.log("FAIL: should not be able to add empty test case.");
</span><span class="lines">@@ -57,15 +50,6 @@
</span><span class="cx"> }
</span><span class="cx"> try {
</span><span class="cx"> badArgsSuite.addTestCase({
</span><del>- name: " ",
- test: function() {},
- });
- ProtocolTest.log("FAIL: test case should require non-whitespace name.");
- } catch (e) {
- ProtocolTest.log("PASS: test case should require non-whitespace name.");
- }
- try {
- badArgsSuite.addTestCase({
</del><span class="cx"> name: "foo",
</span><span class="cx"> test: null,
</span><span class="cx"> });
</span><span class="lines">@@ -74,7 +58,7 @@
</span><span class="cx"> ProtocolTest.log("PASS: test case should require test function.");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- let runEmptySuite = ProtocolTest.createAsyncSuite("AsyncTestSuite.RunEmptySuite");
</del><ins>+ var runEmptySuite = ProtocolTest.createAsyncSuite("AsyncTestSuite.RunEmptySuite");
</ins><span class="cx"> try {
</span><span class="cx"> runEmptySuite.runTestCases();
</span><span class="cx"> ProtocolTest.log("FAIL: should not be able to run empty test suite.");
</span><span class="lines">@@ -82,7 +66,7 @@
</span><span class="cx"> ProtocolTest.log("PASS: should not be able to run empty test suite.");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- let runTwiceSuite = ProtocolTest.createAsyncSuite("AsyncTestSuite.RunTwiceSuite");
</del><ins>+ var runTwiceSuite = ProtocolTest.createAsyncSuite("AsyncTestSuite.RunTwiceSuite");
</ins><span class="cx"> runTwiceSuite.addTestCase({
</span><span class="cx"> name: "DummyTest0",
</span><span class="cx"> description: "Check that a suite can't run more than once.",
</span><span class="lines">@@ -91,7 +75,7 @@
</span><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx">
</span><del>- let result = runTwiceSuite.runTestCases();
</del><ins>+ var result = runTwiceSuite.runTestCases();
</ins><span class="cx"> try {
</span><span class="cx"> // Test cases won't run in this event loop; this call should still throw.
</span><span class="cx"> // Later tests are chained to this suite to avoid nondeterminism.
</span><span class="lines">@@ -101,10 +85,10 @@
</span><span class="cx"> ProtocolTest.log("PASS: should not be able to run a test suite twice.");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- let rejectToken = {"token": 666};
- let thrownError = new Error(rejectToken);
</del><ins>+ var rejectToken = {"token": 666};
+ var thrownError = new Error(rejectToken);
</ins><span class="cx">
</span><del>- let sequentialExecutionSuite = ProtocolTest.createAsyncSuite("AsyncTestSuite.SequentialExecution");
</del><ins>+ var sequentialExecutionSuite = ProtocolTest.createAsyncSuite("AsyncTestSuite.SequentialExecution");
</ins><span class="cx"> sequentialExecutionSuite.addTestCase({
</span><span class="cx"> name: "DummyTest1",
</span><span class="cx"> description: "Check test case execution order.",
</span><span class="lines">@@ -134,7 +118,7 @@
</span><span class="cx"> }
</span><span class="cx"> });
</span><span class="cx">
</span><del>- let abortOnFailureSuite = ProtocolTest.createAsyncSuite("AsyncTestSuite.AbortOnFailure");
</del><ins>+ var abortOnFailureSuite = ProtocolTest.createAsyncSuite("AsyncTestSuite.AbortOnFailure");
</ins><span class="cx"> abortOnFailureSuite.addTestCase({
</span><span class="cx"> name: "PassingTest5",
</span><span class="cx"> description: "This test is a dummy.",
</span><span class="lines">@@ -158,7 +142,7 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> result = result.then(function() {
</span><del>- let promise = sequentialExecutionSuite.runTestCases();
</del><ins>+ var promise = sequentialExecutionSuite.runTestCases();
</ins><span class="cx"> ProtocolTest.expectThat(result instanceof Promise, "AsyncTestSuite.RunTestCases() should return a Promise.");
</span><span class="cx"> return promise;
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestssynctestsuiteexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/unit-tests/sync-test-suite-expected.txt (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/sync-test-suite-expected.txt        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/unit-tests/sync-test-suite-expected.txt        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,11 +1,9 @@
</span><span class="cx"> PASS: instantiating SyncTestSuite requires name argument.
</span><span class="cx"> PASS: instantiating SyncTestSuite requires string name argument.
</span><del>-PASS: instantiating AsyncTestSuite requires non-whitespace name argument.
</del><span class="cx"> PASS: instantiating SyncTestSuite requires test harness argument.
</span><span class="cx"> PASS: should not be able to add empty test case.
</span><span class="cx"> PASS: should not be able to add non-object test case.
</span><span class="cx"> PASS: test case should require string name.
</span><del>-PASS: test case should require non-whitespace name.
</del><span class="cx"> PASS: test case should require test function.
</span><span class="cx"> PASS: should not be able to run empty test suite.
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestssynctestsuitehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/unit-tests/sync-test-suite.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/sync-test-suite.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/LayoutTests/inspector/unit-tests/sync-test-suite.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -6,34 +6,27 @@
</span><span class="cx"> function test()
</span><span class="cx"> {
</span><span class="cx"> try {
</span><del>- let result = new SyncTestSuite(this);
</del><ins>+ let result = new ProtocolTest.SyncTestSuite(this);
</ins><span class="cx"> ProtocolTest.log("FAIL: instantiating SyncTestSuite requires name argument.");
</span><span class="cx"> } catch (e) {
</span><span class="cx"> ProtocolTest.log("PASS: instantiating SyncTestSuite requires name argument.");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> try {
</span><del>- let result = new SyncTestSuite(this, {});
</del><ins>+ let result = new ProtocolTest.SyncTestSuite(this, {});
</ins><span class="cx"> ProtocolTest.log("FAIL: instantiating SyncTestSuite requires string name argument.");
</span><span class="cx"> } catch (e) {
</span><span class="cx"> ProtocolTest.log("PASS: instantiating SyncTestSuite requires string name argument.");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> try {
</span><del>- let result = new syncTestSuite(this, " ");
- ProtocolTest.log("FAIL: instantiating AsyncTestSuite requires non-whitespace name argument.");
- } catch (e) {
- ProtocolTest.log("PASS: instantiating AsyncTestSuite requires non-whitespace name argument.");
- }
-
- try {
- let result = new SyncTestSuite("something", {});
</del><ins>+ let result = new ProtocolTest.SyncTestSuite("something", {});
</ins><span class="cx"> ProtocolTest.log("FAIL: instantiating SyncTestSuite requires test harness argument.");
</span><span class="cx"> } catch (e) {
</span><span class="cx"> ProtocolTest.log("PASS: instantiating SyncTestSuite requires test harness argument.");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- let badArgsSuite = ProtocolTest.createSyncSuite("dummy");
</del><ins>+ var badArgsSuite = ProtocolTest.createSyncSuite("dummy");
</ins><span class="cx"> try {
</span><span class="cx"> badArgsSuite.addTestCase();
</span><span class="cx"> ProtocolTest.log("FAIL: should not be able to add empty test case.");
</span><span class="lines">@@ -57,15 +50,6 @@
</span><span class="cx"> }
</span><span class="cx"> try {
</span><span class="cx"> badArgsSuite.addTestCase({
</span><del>- name: " ",
- test: function() {},
- });
- ProtocolTest.log("FAIL: test case should require non-whitespace name.");
- } catch (e) {
- ProtocolTest.log("PASS: test case should require non-whitespace name.");
- }
- try {
- badArgsSuite.addTestCase({
</del><span class="cx"> name: "foo",
</span><span class="cx"> test: null,
</span><span class="cx"> });
</span><span class="lines">@@ -74,7 +58,7 @@
</span><span class="cx"> ProtocolTest.log("PASS: test case should require test function.");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- let runEmptySuite = ProtocolTest.createSyncSuite("SyncTestSuite.RunEmptySuite");
</del><ins>+ var runEmptySuite = ProtocolTest.createSyncSuite("SyncTestSuite.RunEmptySuite");
</ins><span class="cx"> try {
</span><span class="cx"> runEmptySuite.runTestCases();
</span><span class="cx"> ProtocolTest.log("FAIL: should not be able to run empty test suite.");
</span><span class="lines">@@ -82,7 +66,7 @@
</span><span class="cx"> ProtocolTest.log("PASS: should not be able to run empty test suite.");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- let runTwiceSuite = ProtocolTest.createSyncSuite("SyncTestSuite.RunTwiceSuite");
</del><ins>+ var runTwiceSuite = ProtocolTest.createSyncSuite("SyncTestSuite.RunTwiceSuite");
</ins><span class="cx"> runTwiceSuite.addTestCase({
</span><span class="cx"> name: "DummyTest0",
</span><span class="cx"> description: "Check that a suite can't run more than once.",
</span><span class="lines">@@ -90,7 +74,7 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> try {
</span><del>- let result = runTwiceSuite.runTestCases();
</del><ins>+ var result = runTwiceSuite.runTestCases();
</ins><span class="cx"> ProtocolTest.expectThat(result === true, "Return value of runTwiceSuite.runTestCases() should be true when all tests pass.");
</span><span class="cx">
</span><span class="cx"> runTwiceSuite.runTestCases(); // Try to trigger an error.
</span><span class="lines">@@ -99,9 +83,9 @@
</span><span class="cx"> ProtocolTest.log("PASS: should not be able to run a test suite twice.");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- let thrownError = new Error({"token": 666});
</del><ins>+ var thrownError = new Error({"token": 666});
</ins><span class="cx">
</span><del>- let sequentialExecutionSuite = ProtocolTest.createSyncSuite("SyncTestSuite.SequentialExecution");
</del><ins>+ var sequentialExecutionSuite = ProtocolTest.createSyncSuite("SyncTestSuite.SequentialExecution");
</ins><span class="cx"> sequentialExecutionSuite.addTestCase({
</span><span class="cx"> name: "DummyTest1",
</span><span class="cx"> description: "Check test case execution order.",
</span><span class="lines">@@ -123,14 +107,14 @@
</span><span class="cx"> test: function() { throw thrownError; }
</span><span class="cx"> });
</span><span class="cx">
</span><del>- let result = sequentialExecutionSuite.runTestCases();
</del><ins>+ var result = sequentialExecutionSuite.runTestCases();
</ins><span class="cx"> ProtocolTest.expectThat(result === false, "Return value of sequentialExecutionSuite.runTestCases() should be false when a test case fails.");
</span><span class="cx"> ProtocolTest.expectThat(sequentialExecutionSuite.runCount === 4, "sequentialExecutionSuite should have executed four tests.");
</span><span class="cx"> ProtocolTest.expectThat(sequentialExecutionSuite.passCount === 3, "sequentialExecutionSuite should have passed three tests.");
</span><span class="cx"> ProtocolTest.expectThat(sequentialExecutionSuite.failCount === 1, "sequentialExecutionSuite should have failed 1 test.");
</span><span class="cx"> ProtocolTest.expectThat(sequentialExecutionSuite.skipCount === 0, "sequentialExecutionSuite should have skipped zero tests.");
</span><span class="cx">
</span><del>- let abortOnFailureSuite = ProtocolTest.createSyncSuite("SyncTestSuite.AbortOnFailure");
</del><ins>+ var abortOnFailureSuite = ProtocolTest.createSyncSuite("SyncTestSuite.AbortOnFailure");
</ins><span class="cx"> abortOnFailureSuite.addTestCase({
</span><span class="cx"> name: "PassingTest5",
</span><span class="cx"> description: "This test is a dummy.",
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-08-17 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r188539, r188544, r188552, and
+ r188564.
+ https://bugs.webkit.org/show_bug.cgi?id=148122
+
+ Broke tests and some build styles (Requested by ap on
+ #webkit).
+
+ Reverted changesets:
+
+ "Web Inspector: load ProtocolTestStub from the WebInspectorUI
+ bundle"
+ https://bugs.webkit.org/show_bug.cgi?id=147955
+ http://trac.webkit.org/changeset/188539
+
+ "Web Inspector: split TestStub.js into multiple files and
+ modernize it"
+ https://bugs.webkit.org/show_bug.cgi?id=148077
+ http://trac.webkit.org/changeset/188544
+
+ "Web Inspector: InspectorTest should be a subclass of
+ TestHarness"
+ https://bugs.webkit.org/show_bug.cgi?id=148079
+ http://trac.webkit.org/changeset/188552
+
+ "Unreviewed internal build fix attempt after r188539."
+ http://trac.webkit.org/changeset/188564
+
</ins><span class="cx"> 2015-08-17 Nikita Vasilyev <nvasilyev@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Allow typing command when a console message is selected
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseTestjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Base/Test.js (0 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Test.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Test.js        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -0,0 +1,279 @@
</span><ins>+/*
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.DebuggableType = {
+ Web: "web",
+ JavaScript: "javascript"
+};
+
+WebInspector.loaded = function()
+{
+ this.debuggableType = WebInspector.DebuggableType.Web;
+ this.hasExtraDomains = false;
+
+ // Register observers for events from the InspectorBackend.
+ // The initialization order should match the same in Main.js.
+ InspectorBackend.registerInspectorDispatcher(new WebInspector.InspectorObserver);
+ InspectorBackend.registerPageDispatcher(new WebInspector.PageObserver);
+ InspectorBackend.registerConsoleDispatcher(new WebInspector.ConsoleObserver);
+ InspectorBackend.registerDOMDispatcher(new WebInspector.DOMObserver);
+ InspectorBackend.registerNetworkDispatcher(new WebInspector.NetworkObserver);
+ InspectorBackend.registerDebuggerDispatcher(new WebInspector.DebuggerObserver);
+ InspectorBackend.registerTimelineDispatcher(new WebInspector.TimelineObserver);
+ InspectorBackend.registerCSSDispatcher(new WebInspector.CSSObserver);
+ InspectorBackend.registerRuntimeDispatcher(new WebInspector.RuntimeObserver);
+ if (InspectorBackend.registerReplayDispatcher)
+ InspectorBackend.registerReplayDispatcher(new WebInspector.ReplayObserver);
+
+ // Instantiate controllers used by tests.
+ this.frameResourceManager = new WebInspector.FrameResourceManager;
+ this.domTreeManager = new WebInspector.DOMTreeManager;
+ this.cssStyleManager = new WebInspector.CSSStyleManager;
+ this.logManager = new WebInspector.LogManager;
+ this.issueManager = new WebInspector.IssueManager;
+ this.runtimeManager = new WebInspector.RuntimeManager;
+ this.timelineManager = new WebInspector.TimelineManager;
+ this.debuggerManager = new WebInspector.DebuggerManager;
+ this.probeManager = new WebInspector.ProbeManager;
+ this.replayManager = new WebInspector.ReplayManager;
+
+ // Global controllers.
+ this.quickConsole = {executionContextIdentifier: undefined};
+
+ document.addEventListener("DOMContentLoaded", this.contentLoaded.bind(this));
+
+ // Enable agents.
+ InspectorAgent.enable();
+ ConsoleAgent.enable();
+
+ // Perform one-time tasks.
+ WebInspector.CSSCompletions.requestCSSCompletions();
+
+ // Global settings.
+ this.showShadowDOMSetting = new WebInspector.Setting("show-shadow-dom", true);
+}
+
+WebInspector.contentLoaded = function()
+{
+ // Signal that the frontend is now ready to receive messages.
+ InspectorFrontendAPI.loadCompleted();
+
+ // Tell the InspectorFrontendHost we loaded, which causes the window to display
+ // and pending InspectorFrontendAPI commands to be sent.
+ InspectorFrontendHost.loaded();
+}
+
+WebInspector.UIString = function(string)
+{
+ return string;
+}
+
+// Add stubs that are called by the frontend API.
+WebInspector.updateDockedState = function() {};
+WebInspector.updateDockingAvailability = function() {};
+
+// InspectorTest contains extra methods that are only available to test code running
+// in the Web Inspector page. They rely on equivalents in the actual test page
+// which are provided by `inspector-test.js`.
+InspectorTest = {};
+
+// This is useful for debugging Inspector tests by synchronously logging messages.
+InspectorTest.dumpMessagesToConsole = false;
+
+// This is a workaround for the fact that it would be hard to set up a constructor,
+// prototype, and prototype chain for the singleton InspectorTest.
+InspectorTest.EventDispatcher = class EventDispatcher extends WebInspector.Object
+{
+ dispatchEvent(event)
+ {
+ this.dispatchEventToListeners(event);
+ }
+};
+
+InspectorTest.EventDispatcher.Event = {
+ TestPageDidLoad: "inspector-test-test-page-did-load"
+};
+
+InspectorTest.eventDispatcher = new InspectorTest.EventDispatcher;
+
+// Note: Additional InspectorTest methods are included on a per-test basis from
+// files like `debugger-test.js`.
+
+// Appends a log message in the test document.
+InspectorTest.log = function(message)
+{
+ var stringifiedMessage = typeof message !== "object" ? message : JSON.stringify(message);
+ InspectorTest.addResult(stringifiedMessage);
+}
+
+// Appends a message in the test document only if the condition is false.
+InspectorTest.assert = function(condition, message)
+{
+ if (condition)
+ return;
+
+ var stringifiedMessage = typeof message !== "object" ? message : JSON.stringify(message);
+ InspectorTest.addResult("ASSERT: " + stringifiedMessage);
+}
+
+// Appends a message in the test document whether the condition is true or not.
+InspectorTest.expectThat = function(condition, message)
+{
+ var prefix = condition ? "PASS" : "FAIL";
+ var stringifiedMessage = typeof message !== "object" ? message : JSON.stringify(message);
+ InspectorTest.addResult(prefix + ": " + stringifiedMessage);
+}
+
+// This function should only be used to debug tests and not to produce normal test output.
+InspectorTest.debugLog = function(message)
+{
+ if (InspectorTest.dumpMessagesToConsole)
+ InspectorFrontendHost.unbufferedLog("debugLog: " + message);
+
+ this.evaluateInPage("InspectorTestProxy.debugLog(unescape('" + escape(JSON.stringify(message)) + "'))");
+}
+
+// Appends a message in the test document if there was an error, and attempts to complete the test.
+InspectorTest.expectNoError = function(error)
+{
+ if (error) {
+ InspectorTest.log("PROTOCOL ERROR: " + error);
+ InspectorTest.completeTest();
+ throw "PROTOCOL ERROR";
+ }
+}
+
+InspectorTest.completeTest = function()
+{
+ if (InspectorTest.dumpMessagesToConsole)
+ InspectorFrontendHost.unbufferedLog("InspectorTest.completeTest()");
+
+ // Wait for results to be resent before requesting completeTest(). Otherwise, messages will be
+ // queued after pending dispatches run to zero and the test page will quit before processing them.
+ if (this._testPageIsReloading) {
+ this._completeTestAfterReload = true;
+ return;
+ }
+
+ InspectorBackend.runAfterPendingDispatches(this.evaluateInPage.bind(this, "InspectorTestProxy.completeTest()"));
+}
+
+InspectorTest.evaluateInPage = function(codeString, callback)
+{
+ // If we load this page outside of the inspector, or hit an early error when loading
+ // the test frontend, then defer evaluating the commands (indefinitely in the former case).
+ if (!window.RuntimeAgent) {
+ this._originalConsoleMethods["error"]("Tried to evaluate in test page, but connection not yet established:", codeString);
+ return;
+ }
+
+ RuntimeAgent.evaluate.invoke({expression: codeString, objectGroup: "test", includeCommandLineAPI: false}, callback);
+}
+
+InspectorTest.addResult = function(text)
+{
+ this._results.push(text);
+
+ if (InspectorTest.dumpMessagesToConsole)
+ InspectorFrontendHost.unbufferedLog("addResult: " + text);
+
+ if (!this._testPageIsReloading)
+ this.evaluateInPage("InspectorTestProxy.addResult(unescape('" + escape(text) + "'))");
+}
+
+InspectorTest._resendResults = function()
+{
+ console.assert(this._shouldResendResults);
+ this._shouldResendResults = false;
+
+ for (var result of this._results)
+ this.evaluateInPage("InspectorTestProxy.addResult(unescape('" + escape(result) + "'))");
+}
+
+InspectorTest.testPageDidLoad = function()
+{
+ this._testPageIsReloading = false;
+ this._resendResults();
+
+ this.eventDispatcher.dispatchEvent(InspectorTest.EventDispatcher.Event.TestPageDidLoad);
+
+ if (this._completeTestAfterReload)
+ InspectorTest.completeTest();
+}
+
+InspectorTest.reloadPage = function(shouldIgnoreCache)
+{
+ console.assert(!this._testPageIsReloading);
+ console.assert(!this._testPageReloadedOnce);
+
+ this._testPageIsReloading = true;
+
+ return PageAgent.reload(!!shouldIgnoreCache)
+ .then(function() {
+ this._shouldResendResults = true;
+ this._testPageReloadedOnce = true;
+
+ return Promise.resolve(null);
+ }.bind(this));
+}
+
+InspectorTest.reportUncaughtException = function(message, url, lineNumber)
+{
+ var result = "Uncaught exception in inspector page: " + message + " [" + url + ":" + lineNumber + "]";
+
+ // If the connection to the test page is not set up, then just dump to console and give up.
+ // Errors encountered this early can be debugged by loading Test.html in a normal browser page.
+ if (!InspectorFrontendHost || !InspectorBackend) {
+ this._originalConsoleMethods["error"](result);
+ return false;
+ }
+
+ this.addResult(result);
+ this.completeTest();
+ // Stop default handler so we can empty InspectorBackend's message queue.
+ return true;
+}
+
+// Initialize reporting mechanisms before loading the rest of the inspector page.
+InspectorTest._results = [];
+InspectorTest._shouldResendResults = true;
+InspectorTest._originalConsoleMethods = {};
+
+// Catch syntax errors, type errors, and other exceptions.
+window.onerror = InspectorTest.reportUncaughtException.bind(InspectorTest);
+
+// Redirect frontend console methods to log messages into the test result.
+(function() {
+ function createProxyConsoleHandler(type) {
+ return function() {
+ InspectorTest.addResult(type + ": " + Array.from(arguments).join(" "));
+ };
+ }
+
+ for (var type of ["log", "error", "info"]) {
+ InspectorTest._originalConsoleMethods[type] = console[type].bind(console);
+ console[type] = createProxyConsoleHandler(type.toUpperCase());
+ }
+})();
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTesthtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Test.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Test.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Source/WebInspectorUI/UserInterface/Test.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -32,12 +32,8 @@
</span><span class="cx"> <script src="Base/WebInspector.js"></script>
</span><span class="cx"> <script src="Base/Object.js"></script>
</span><span class="cx">
</span><del>- <script src="Test/TestHarness.js"></script>
- <script src="Test/FrontendTestHarness.js"></script>
- <script src="Test/TestSuite.js"></script>
</del><ins>+ <script src="Base/Test.js"></script>
</ins><span class="cx">
</span><del>- <script src="Test/Test.js"></script>
-
</del><span class="cx"> <script src="Base/DOMUtilities.js"></script>
</span><span class="cx"> <script src="Base/EventListener.js"></script>
</span><span class="cx"> <script src="Base/EventListenerSet.js"></script>
</span><span class="lines">@@ -146,12 +142,6 @@
</span><span class="cx">
</span><span class="cx"> <script type="text/javascript">
</span><span class="cx"> WebInspector.loaded();
</span><del>-
- // Not reliable unless console messages are dumped to stderr. See wiki for details.
- InspectorBackend.dumpInspectorProtocolMessages = false;
-
- // Synchronous logging may produce more output prior to a timeout.
- InspectorTest.forceSyncDebugLogging = false;
</del><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTestStubhtml"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebInspectorUI/UserInterface/TestStub.html (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/TestStub.html        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Source/WebInspectorUI/UserInterface/TestStub.html        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,50 +0,0 @@
</span><del>-<!--
-Copyright (C) 2015 Apple Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <!--
- These resources should match the order and groups used in Main.html and Test.html.
- -->
- <script src="Base/WebInspector.js"></script>
- <script src="Base/Object.js"></script>
-
- <script src="Test/TestSuite.js"></script>
- <script src="Test/TestHarness.js"></script>
- <script src="Test/ProtocolTestHarness.js"></script>
-
- <script src="Test/InspectorProtocol.js"></script>
-
- <script src="Test/TestStub.js"></script>
- <script>
- // Not reliable unless console messages are dumped to console. See wiki for details.
- ProtocolTest.dumpInspectorProtocolMessages = false;
-
- // Synchronous logging may produce more output prior to a timeout.
- ProtocolTest.forceSyncDebugLogging = false;
- </script>
-</head>
-</html>
</del></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/ChangeLog        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-08-17 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r188539, r188544, r188552, and
+ r188564.
+ https://bugs.webkit.org/show_bug.cgi?id=148122
+
+ Broke tests and some build styles (Requested by ap on
+ #webkit).
+
+ Reverted changesets:
+
+ "Web Inspector: load ProtocolTestStub from the WebInspectorUI
+ bundle"
+ https://bugs.webkit.org/show_bug.cgi?id=147955
+ http://trac.webkit.org/changeset/188539
+
+ "Web Inspector: split TestStub.js into multiple files and
+ modernize it"
+ https://bugs.webkit.org/show_bug.cgi?id=148077
+ http://trac.webkit.org/changeset/188544
+
+ "Web Inspector: InspectorTest should be a subclass of
+ TestHarness"
+ https://bugs.webkit.org/show_bug.cgi?id=148079
+ http://trac.webkit.org/changeset/188552
+
+ "Unreviewed internal build fix attempt after r188539."
+ http://trac.webkit.org/changeset/188564
+
</ins><span class="cx"> 2015-08-17 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> [OS X] Remove support for composite fonts
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestRunner.cpp        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1790,13 +1790,6 @@
</span><span class="cx"> return JSValueMakeString(context, titleDirection.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static JSValueRef getInspectorTestStubURLCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
-{
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- JSRetainPtr<JSStringRef> url(Adopt, controller->inspectorTestStubURL());
- return JSValueMakeString(context, url.get());
-}
-
</del><span class="cx"> static bool setGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
</span><span class="cx"> {
</span><span class="cx"> TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
</span><span class="lines">@@ -1990,7 +1983,6 @@
</span><span class="cx"> { "titleTextDirection", getTitleTextDirectionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "databaseDefaultQuota", getDatabaseDefaultQuotaCallback, setDatabaseDefaultQuotaCallback, kJSPropertyAttributeNone },
</span><span class="cx"> { "databaseMaxQuota", getDatabaseMaxQuotaCallback, setDatabaseMaxQuotaCallback, kJSPropertyAttributeNone },
</span><del>- { "inspectorTestStubURL", getInspectorTestStubURLCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</del><span class="cx"> { 0, 0, 0, 0 }
</span><span class="cx"> };
</span><span class="cx"> return staticValues;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/TestRunner.h (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestRunner.h        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/DumpRenderTree/TestRunner.h        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -308,8 +308,6 @@
</span><span class="cx"> void showWebInspector();
</span><span class="cx"> void closeWebInspector();
</span><span class="cx"> void evaluateInWebInspector(JSStringRef script);
</span><del>- JSStringRef inspectorTestStubURL();
-
</del><span class="cx"> void evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script);
</span><span class="cx"> void evaluateScriptInIsolatedWorldAndReturnValue(unsigned worldID, JSObjectRef globalObject, JSStringRef script);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacTestRunnerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> #import <JavaScriptCore/JSStringRef.h>
</span><span class="cx"> #import <JavaScriptCore/JSStringRefCF.h>
</span><span class="cx"> #import <WebCore/GeolocationPosition.h>
</span><del>-#import <WebCore/SoftLinking.h>
</del><span class="cx"> #import <WebKit/DOMDocument.h>
</span><span class="cx"> #import <WebKit/DOMElement.h>
</span><span class="cx"> #import <WebKit/DOMHTMLInputElementPrivate.h>
</span><span class="lines">@@ -89,8 +88,6 @@
</span><span class="cx"> #import <WebKit/WebDOMOperationsPrivate.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
-
</del><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> @interface CommandValidationTarget : NSObject <NSValidatedUserInterfaceItem>
</span><span class="cx"> {
</span><span class="lines">@@ -783,23 +780,6 @@
</span><span class="cx"> [[[mainFrame webView] inspector] evaluateInFrontend:nil script:scriptNS];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-JSStringRef TestRunner::inspectorTestStubURL()
-{
- // Call the soft link framework function to dlopen it, then CFBundleGetBundleWithIdentifier will work.
- WebInspectorUILibrary();
-
- CFBundleRef inspectorBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebInspectorUI"));
- if (!inspectorBundle)
- return nullptr;
-
- RetainPtr<CFURLRef> url = adoptCF(CFBundleCopyResourceURL(inspectorBundle, CFSTR("TestStub"), CFSTR("html"), NULL));
- if (!url)
- return nullptr;
-
- CFStringRef urlString = CFURLGetString(url.get());
- return JSStringCreateWithCFString(urlString);
-}
-
</del><span class="cx"> typedef HashMap<unsigned, RetainPtr<WebScriptWorld> > WorldMap;
</span><span class="cx"> static WorldMap& worldMap()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinTestRunnerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -1093,15 +1093,6 @@
</span><span class="cx"> inspectorPrivate->evaluateInFrontend(bstrT(script).GetBSTR());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-JSStringRef TestRunner::inspectorTestStubURL()
-{
- // FIXME: Implement this to support Web Inspector tests using `protocol-test.js`.
- // See https://bugs.webkit.org/show_bug.cgi?id=148025.
- printf("ERROR: TestRunner::inspectorTestStubURL() not implemented\n");
-
- return nullptr;
-}
-
</del><span class="cx"> typedef HashMap<unsigned, COMPtr<IWebScriptWorld> > WorldMap;
</span><span class="cx"> static WorldMap& worldMap()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -125,7 +125,6 @@
</span><span class="cx"> void showWebInspector();
</span><span class="cx"> void closeWebInspector();
</span><span class="cx"> void evaluateInWebInspector(DOMString script);
</span><del>- readonly attribute DOMString inspectorTestStubURL;
</del><span class="cx">
</span><span class="cx"> void setPOSIXLocale(DOMString locale);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -199,7 +199,6 @@
</span><span class="cx"> void showWebInspector();
</span><span class="cx"> void closeWebInspector();
</span><span class="cx"> void evaluateInWebInspector(JSStringRef script);
</span><del>- JSRetainPtr<JSStringRef> inspectorTestStubURL();
</del><span class="cx">
</span><span class="cx"> void setPOSIXLocale(JSStringRef);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleeflTestRunnerEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -23,9 +23,7 @@
</span><span class="cx"> #include "InjectedBundle.h"
</span><span class="cx"> #include <Ecore.h>
</span><span class="cx"> #include <JavaScriptCore/OpaqueJSString.h>
</span><del>-#include <WebCore/EflInspectorUtilities.h>
</del><span class="cx"> #include <wtf/text/CString.h>
</span><del>-#include <wtf/text/StringBuilder.h>
</del><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace WTR {
</span><span class="lines">@@ -84,14 +82,4 @@
</span><span class="cx"> return JSStringCreateWithUTF8CString(fullPathToUrl.utf8().data());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL()
-{
- StringBuilder builder;
- builder.append("file://");
- builder.append(WebCore::inspectorResourcePath());
- builder.appendLiteral("/TestStub.html");
-
- return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
-}
-
</del><span class="cx"> } // namespace WTR
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundlegtkTestRunnerGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -67,9 +67,4 @@
</span><span class="cx"> return JSStringCreateWithUTF8CString(testURI.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL()
-{
- return JSStringCreateWithUTF8CString("resource:///org/webkitgtk/inspector/UserInterface/TestStub.html");
-}
-
</del><span class="cx"> } // namespace WTR
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundlemacTestRunnerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm (188578 => 188579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm        2015-08-18 06:28:11 UTC (rev 188578)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm        2015-08-18 06:33:51 UTC (rev 188579)
</span><span class="lines">@@ -23,15 +23,10 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#include "config.h"
</del><span class="cx"> #include "TestRunner.h"
</span><span class="cx">
</span><span class="cx"> #include "InjectedBundle.h"
</span><del>-#include <JavaScriptCore/JSStringRefCF.h>
-#include <WebCore/SoftLinking.h>
</del><span class="cx">
</span><del>-SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
-
</del><span class="cx"> namespace WTR {
</span><span class="cx">
</span><span class="cx"> void TestRunner::platformInitialize()
</span><span class="lines">@@ -67,21 +62,4 @@
</span><span class="cx"> return JSStringRetain(url); // Do nothing on mac.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL()
-{
- // Call the soft link framework function to dlopen it, then CFBundleGetBundleWithIdentifier will work.
- WebInspectorUILibrary();
-
- CFBundleRef inspectorBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebInspectorUI"));
- if (!inspectorBundle)
- return nullptr;
-
- RetainPtr<CFURLRef> url = adoptCF(CFBundleCopyResourceURL(inspectorBundle, CFSTR("TestStub"), CFSTR("html"), NULL));
- if (!url)
- return nullptr;
-
- CFStringRef urlString = CFURLGetString(url.get());
- return adopt(JSStringCreateWithCFString(urlString));
-}
-
</del><span class="cx"> } // namespace WTR
</span></span></pre>
</div>
</div>
</body>
</html>