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

Unified Diff: third_party/WebKit/LayoutTests/inspector/elements/hide-shortcut.html

Issue 2207163002: [DevTools] Removed InspectorTest.invokePageFunctionPromise (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 4 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 | « third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/elements/hide-shortcut.html
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/hide-shortcut.html b/third_party/WebKit/LayoutTests/inspector/elements/hide-shortcut.html
index 5a18711f2d292eb7ef9bee4cf038af32c4198184..cabdc0afa43b930c854efc4f9ab07dfcfa5b6460 100644
--- a/third_party/WebKit/LayoutTests/inspector/elements/hide-shortcut.html
+++ b/third_party/WebKit/LayoutTests/inspector/elements/hide-shortcut.html
@@ -4,16 +4,16 @@
<script src="../../http/tests/inspector/elements-test.js"></script>
<script>
-function pseudoVisibility(resolve, reject, pseudo)
+function pseudoVisibility(pseudo)
{
var parentNode = document.getElementById("parent-node");
- resolve(getComputedStyle(parentNode, ":" + pseudo).visibility);
+ return getComputedStyle(parentNode, ":" + pseudo).visibility;
}
-function pseudoIframeVisibility(resolve, reject)
+function pseudoIframeVisibility()
{
var parentNode = frames[0].document.getElementById("frame-node");
- resolve(getComputedStyle(parentNode).visibility);
+ return getComputedStyle(parentNode).visibility;
}
function test()
@@ -125,10 +125,10 @@ function test()
function callback()
{
- InspectorTest.invokePageFunctionPromise("pseudoIframeVisibility", []).then(function(result) {
+ InspectorTest.evaluateInPagePromise("pseudoIframeVisibility()").then(function(result) {
InspectorTest.addResult("=== Added hide shortcut in frame ===");
InspectorTest.addResult("=== Frame node is hidden ===");
- InspectorTest.addResult("visibility: " + result + ";");
+ InspectorTest.addResult("visibility: " + result.value + ";");
next();
});
}
@@ -145,8 +145,9 @@ function test()
treeOutline.toggleHideElement(pseudoNode, callback);
function callback()
{
- InspectorTest.invokePageFunctionPromise("pseudoVisibility", [pseudoNode.pseudoType()]).then(function(result) {
- InspectorTest.addResult("::" + pseudoNode.pseudoType() + " node visibility: '" + result + "'");
+ var pseudoNodeTypeArg = pseudoNode.pseudoType() ? ("\"" + pseudoNode.pseudoType() + "\"") : "undefined";
+ InspectorTest.evaluateInPagePromise("pseudoVisibility(" + pseudoNodeTypeArg + ")").then(function(result) {
+ InspectorTest.addResult("::" + pseudoNode.pseudoType() + " node visibility: '" + result.value + "'");
next();
});
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698