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

Unified Diff: third_party/WebKit/LayoutTests/inspector/console/console-xpath.html

Issue 1894723002: [DevTools] Fix console-xpath.html test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+ }
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698