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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/javascript-url-exception-isolation.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/javascript-url-exception-isolation.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/javascript-url-exception-isolation.html b/third_party/WebKit/LayoutTests/fast/dom/javascript-url-exception-isolation.html
index e79c6f5689427a7597cba7b88cdac4628b3848b3..fb0e0d50258360d13ebe246a207ee1cccba02a45 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/javascript-url-exception-isolation.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/javascript-url-exception-isolation.html
@@ -4,6 +4,29 @@
<script src="../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/javascript-url-exception-isolation.js"></script>
+<script>
+description("Exceptions thrown in javascript URLs should not propagate to the main script.")
+
+var subframe = document.createElement("iframe");
+document.body.appendChild(subframe);
+
+var caughtException = false;
+
+// Runtime exception.
+try {
+ subframe.src = 'javascript:throw 42';
+} catch(e) {
+ caughtException = true;
+}
+shouldBeFalse('caughtException');
+
+// Compile-time exception.
+try {
+ subframe.src = 'javascript:<html></html>';
+} catch(e) {
+ caughtException = true;
+}
+shouldBeFalse('caughtException');
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698