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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html

Issue 2882193002: [devtools] Add DOMSnapshot domain for dom+layout+style snapshots. (Closed)
Patch Set: move aux properties back to node type Created 3 years, 6 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
Index: third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html
new file mode 100644
index 0000000000000000000000000000000000000000..c914938e56b16ee6d55a82beedea04a2f1949919
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom-snapshot/dom-snapshot-getSnapshot.html
@@ -0,0 +1,63 @@
+<html>
+<head>
+<style>
+@font-face {
+ font-family: 'ahem';
+ src: url(../../resources/Ahem.ttf);
+}
+</style>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+
+async function test() {
+ function stabilize(key, value) {
+ var unstableKeys = ["documentURL", "baseURL", "frameId"];
+ if (unstableKeys.indexOf(key) !== -1)
+ return "<" + typeof(value) + ">";
+ return value;
+ }
+
+ var whitelist = ["transform", "transform-origin", "height", "width", "display", "outline-color", "color"];
+ var response = await InspectorTest.sendCommandOrDie("DOMSnapshot.getSnapshot", {"computedStyleWhitelist": whitelist});
+ InspectorTest.log(JSON.stringify(response, stabilize, 2));
+ InspectorTest.completeTest();
+}
+
+</script>
+<template id="shadow-template">
+<style>
+:host {
+ color: red;
+}
+</style>
+<div style="font-family: ahem;"><h1>Hi!</h1></div>
+</template>
+</head>
+<body class="body-class">
+<div style="font-family: ahem;">
+ <div class="class1">Some Text</div> And More Text
+ <div style="display:inline-block; width: 200px">
+ <p>
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem.
+ Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et
+ ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodales ac lectus sed,
+ hendrerit efficitur est. Quisque gravida facilisis viverra.
+ </p>
+ <ul class="class3">
+ <li class="class4"></li>
+ <span>Lets have a span</span>
+ </ul>
+ </div>
+ <div style="transform: rotateZ(90deg); width: 200px">Rotated text!</div>
+ <iframe src="../dom/resources/simple-iframe.html" width="400" height="200"></iframe>
+ <div id="shadow-host"></div>
+ <script type="text/javascript">
+ var host = document.querySelector("#shadow-host").createShadowRoot();
+ var template = document.querySelector("#shadow-template");
+ host.appendChild(template.content);
+ template.remove();
+ window.onload = runTest;
+ </script>
+</div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698