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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.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/HTMLElement/insertAdjacentHTML-errors.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.html
index 8e5b7fd16dc26a3450eff5095f633c94910d1ce3..3d8ba740ab083fa1d7ca571dfd62aab284c95f5b 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.html
@@ -4,6 +4,16 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/insertAdjacentHTML-errors.js"></script>
+<script>
+description('Test insertAdjacentHTML exceptions to make sure they match HTML5');
+
+var div = document.createElement("div");
+
+shouldThrow("div.insertAdjacentHTML('beforeBegin', 'text')", '"NoModificationAllowedError: Failed to execute \'insertAdjacentHTML\' on \'Element\': The element has no parent."');
+shouldThrow("div.insertAdjacentHTML('afterEnd', 'text')", '"NoModificationAllowedError: Failed to execute \'insertAdjacentHTML\' on \'Element\': The element has no parent."');
+
+shouldThrow("div.insertAdjacentHTML('FOO', 'text')", '"SyntaxError: Failed to execute \'insertAdjacentHTML\' on \'Element\': The value provided (\'FOO\') is not one of \'beforeBegin\', \'afterBegin\', \'beforeEnd\', or \'afterEnd\'."');
+shouldThrow("document.documentElement.insertAdjacentHTML('afterEnd', 'text')", '"NoModificationAllowedError: Failed to execute \'insertAdjacentHTML\' on \'Element\': The element has no parent."');
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698