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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/bindings/shadowdom-bindings.html

Issue 2777633002: DevTools: add bindings tests to fixate shadowDOM behavior. (Closed)
Patch Set: Created 3 years, 9 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/http/tests/inspector/bindings/shadowdom-bindings.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/bindings/shadowdom-bindings.html b/third_party/WebKit/LayoutTests/http/tests/inspector/bindings/shadowdom-bindings.html
new file mode 100644
index 0000000000000000000000000000000000000000..29ddaa4b7b16c6c41315e0fdb40dd5288df7591e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/bindings/shadowdom-bindings.html
@@ -0,0 +1,70 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="./bindings-test.js"></script>
+
+<script>
+
+async function test()
+{
+ InspectorTest.markStep('dumpInitialWorkspace');
+ var snapshot = InspectorTest.dumpWorkspace();
+
+ InspectorTest.markStep('attachShadow1');
+ await Promise.all([
+ InspectorTest.attachShadowDOM('shadow1', '#template', '_test_attachShadow1.js'),
+ InspectorTest.waitForSourceMap('sourcemap-script.js.map'),
+ InspectorTest.waitForSourceMap('sourcemap-style.css.map'),
+ ]);
+ snapshot = InspectorTest.dumpWorkspace(snapshot);
+
+ InspectorTest.markStep('attachShadow2');
+ await Promise.all([
+ InspectorTest.attachShadowDOM('shadow2', '#template', '_test_attachShadow2.js'),
+ InspectorTest.waitForSourceMap('sourcemap-script.js.map'),
+ InspectorTest.waitForSourceMap('sourcemap-style.css.map'),
+ ]);
+ snapshot = InspectorTest.dumpWorkspace(snapshot);
+
+ InspectorTest.markStep('detachShadow1');
+ await Promise.all([
+ InspectorTest.detachShadowDOM('shadow1', '_test_detachShadow1.js'),
+ InspectorTest.waitForStyleSheetRemoved('sourcemap-style.css'),
+ ]);
+ snapshot = InspectorTest.dumpWorkspace(snapshot);
+
+ InspectorTest.markStep('detachShadow2');
+ await Promise.all([
+ InspectorTest.detachShadowDOM('shadow2', '_test_detachShadow2.js'),
+ InspectorTest.waitForStyleSheetRemoved('sourcemap-style.css'),
+ ]);
+ snapshot = InspectorTest.dumpWorkspace(snapshot);
+
+ InspectorTest.completeTest();
+
+}
+
+</script>
+
+</head>
+<body onload="runTest()">
+<p>
+Verify that UISourceCodes are added and removed as shadow dom styles and scripts are added and removed.
+</p>
+
+<template id='template'>
+<style>div {
+ color: blue;
+}
+/*# sourceURL=sourcemap-style.css */
+/*# sourceMappingURL=resources/sourcemap-style.css.map */
+</style>
+<script>window.foo = console.log.bind(console, 'foo');
+//# sourceURL=sourcemap-script.js
+//# sourceMappingURL=resources/sourcemap-script.js.map
+</script>
+<p>Hi! I'm ShadowDOM v1!</p>
+</template>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698