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

Unified Diff: LayoutTests/fast/dom/Range/deleteContents-doctype.html

Issue 451403002: Range.deleteContents shouldn't throw HierarchyRequestError on doctype (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take review comment into consideration Created 6 years, 4 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/fast/dom/Range/deleteContents-doctype-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/Range/deleteContents-doctype.html
diff --git a/LayoutTests/fast/dom/Range/deleteContents-doctype.html b/LayoutTests/fast/dom/Range/deleteContents-doctype.html
new file mode 100644
index 0000000000000000000000000000000000000000..bab8c2aaa5d3322bd687b92bdf3b45c982164832
--- /dev/null
+++ b/LayoutTests/fast/dom/Range/deleteContents-doctype.html
@@ -0,0 +1,32 @@
+<html>
yosin_UTC9 2014/08/12 01:00:43 For this test, we should have <!DOCTYPE html>. I t
yosin_UTC9 2014/08/12 01:00:44 nit: We don't need to have html, head, and body ma
kangil_ 2014/08/12 01:08:28 I will check and get back to you with result.
kangil_ 2014/08/12 02:41:34 Done.
kangil_ 2014/08/12 02:41:34 Done.
+<head>
+</head>
+<body>
+<div id='test'>
yosin_UTC9 2014/08/12 01:00:43 This test doesn't use these id's and this test doe
kangil_ 2014/08/12 02:41:34 Done.
+ <p id='start'>start</p>
+ <p id='end'>end</p>
+</div>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function generatePassMessage() {
+ var html = document.createElement('html');
yosin_UTC9 2014/08/12 01:00:43 document.write('PASS') is shortest.
kangil_ 2014/08/12 02:41:34 Done.
+ var body = document.createElement('body');
+ body.innerHTML = '<p>PASS</p>';
+ html.appendChild(body);
+ document.appendChild(html);
+}
+
+var range = document.createRange();
+range.setStart(document, 0);
+range.setEnd(document, 1);
+
+try {
yosin_UTC9 2014/08/12 01:00:43 We don't need to have try block. Since, range.dele
kangil_ 2014/08/12 02:41:34 Done.
+ range.deleteContents();
+ generatePassMessage();
+} catch (e) {
+}
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/deleteContents-doctype-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698