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

Unified Diff: LayoutTests/fast/css/style-scoped/changing-scoped-attribute-asan-crash.html

Issue 317143002: Revert of Remove scoped styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: LayoutTests/fast/css/style-scoped/changing-scoped-attribute-asan-crash.html
diff --git a/LayoutTests/fast/css/style-scoped/changing-scoped-attribute-asan-crash.html b/LayoutTests/fast/css/style-scoped/changing-scoped-attribute-asan-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..6d0e471ca122d97a90197a1603b01af3efa7f2aa
--- /dev/null
+++ b/LayoutTests/fast/css/style-scoped/changing-scoped-attribute-asan-crash.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<html>
+<head>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+</script>
+</head>
+<body onload="onLoad()">><p id="scopingNode"><style scoped></style>
+></p>
+<style>
+</style>
+<script>
+document.body.contentEditable = "true";
+
+function onLoad() {
+ var style = document.getElementsByTagName("style")[0];
+ style.scoped = false;
+ setTimeout("runTest()", 0);
+}
+
+function invokeEditingCommand() {
+ if (!window.eventSender)
+ return;
+ for (var i = 0; i < 8; i++)
+ eventSender.keyDown("\t", []);
+ for (var i = 0; i < 5; i++)
+ eventSender.keyDown("X");
+ for (var i = 0; i < 6; i++)
+ eventSender.keyDown("\t", []);
+ eventSender.keyDown("\r", []);
+
+ document.body.innerHTML = 'PASS';
+ testRunner.notifyDone();
+}
+
+function runTest() {
+ document.adoptNode(scopingNode);
+ gc();
+ setTimeout('invokeEditingCommand();', 0);
+}
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698