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

Unified Diff: LayoutTests/editing/surrounding-text/surrounding-text-detached-no-crash.html

Issue 1237093003: Robustify window.internals.textSurroundingNode(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | LayoutTests/editing/surrounding-text/surrounding-text-detached-no-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/surrounding-text/surrounding-text-detached-no-crash.html
diff --git a/LayoutTests/editing/surrounding-text/surrounding-text-detached-no-crash.html b/LayoutTests/editing/surrounding-text/surrounding-text-detached-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..9e6d72642ca552b43171779b5cdf63cf5725c0aa
--- /dev/null
+++ b/LayoutTests/editing/surrounding-text/surrounding-text-detached-no-crash.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<script>
+description('Calling textSurroundingNode() on a detached node without crashing');
+
+if (window.internals) {
+ var node = document.createElement("p");
+ shouldBeEmptyString('window.internals.textSurroundingNode(node, 0, 0, 0)');
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/editing/surrounding-text/surrounding-text-detached-no-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698