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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Range/31684.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 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/fast/dom/Range/31684.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Range/31684.html b/third_party/WebKit/LayoutTests/fast/dom/Range/31684.html
index 26031870960951f4eb39a297b8ae79834a759ebd..045f55a6373caa6fd8f06d910af007e28734fc17 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/Range/31684.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/Range/31684.html
@@ -4,6 +4,17 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/31684.js"></script>
+<script>
+description(
+ "This test checks an orphan text node cannot be surrounded by the range. (bug31684)"
+);
+
+var range = document.createRange();
+var text = document.createTextNode('hello');
+var element = document.createElement("div");
+range.selectNodeContents(text);
+
+shouldThrow("range.surroundContents(element)", '"HierarchyRequestError: Failed to execute \'surroundContents\' on \'Range\': The container node is a detached character data node; no parent node is available for insertion."');
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698