| Index: third_party/WebKit/LayoutTests/inspector/console/console-xpath.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-xpath.html b/third_party/WebKit/LayoutTests/inspector/console/console-xpath.html
|
| index 3575cf750fb1d8c1769428b4f9ab8e683f04494c..8ec0d777f61d0c0c0efb1ff7adf0ffcdf5fb4755 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector/console/console-xpath.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector/console/console-xpath.html
|
| @@ -6,7 +6,8 @@
|
|
|
| function test()
|
| {
|
| - InspectorTest.addConsoleViewSniffer(addMessageSniffer, true);
|
| + InspectorTest.addSniffer(WebInspector.ConsoleViewMessage.prototype, "_formattedParameterAsNodeForTest", formattedParameter);
|
| + InspectorTest.addConsoleViewSniffer(messageSniffer, true);
|
|
|
| InspectorTest.evaluateInConsole("$x('42')"); // number
|
| InspectorTest.evaluateInConsole("$x('name(/html)')"); // string
|
| @@ -15,22 +16,28 @@ function test()
|
| InspectorTest.evaluateInConsole("$x('//a/@href')[0]"); // href, should not throw
|
| InspectorTest.evaluateInPage("console.log('complete')"); // node iterator
|
|
|
| - function addMessageSniffer(uiMessage)
|
| + var completeMessageReceived = false;
|
| + function messageSniffer(uiMessage)
|
| {
|
| if (uiMessage.toString().indexOf("complete") !== -1) {
|
| - InspectorTest.expandConsoleMessages(waitForObjects);
|
| + completeMessageReceived = true;
|
| + maybeCompleteTest();
|
| }
|
| }
|
|
|
| - function waitForObjects()
|
| + var parameterFormatted = false;
|
| + function formattedParameter()
|
| {
|
| - InspectorTest.waitForRemoteObjectsConsoleMessages(dumpConsoleMessages);
|
| + parameterFormatted = true;
|
| + maybeCompleteTest();
|
| }
|
|
|
| - function dumpConsoleMessages()
|
| + function maybeCompleteTest()
|
| {
|
| - InspectorTest.dumpConsoleMessages();
|
| - InspectorTest.completeTest();
|
| + if (parameterFormatted && completeMessageReceived) {
|
| + InspectorTest.dumpConsoleMessages();
|
| + InspectorTest.completeTest();
|
| + }
|
| }
|
| }
|
|
|
|
|