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

Unified Diff: LayoutTests/http/tests/loading/preload-ignore-invalid-base.html

Issue 1044133002: HTMLPreloadScanner should only use valid <base> urls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: r Created 5 years, 9 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: LayoutTests/http/tests/loading/preload-ignore-invalid-base.html
diff --git a/LayoutTests/http/tests/loading/preload-ignore-invalid-base.html b/LayoutTests/http/tests/loading/preload-ignore-invalid-base.html
new file mode 100644
index 0000000000000000000000000000000000000000..c8c9ff77963aff38415c61a1071ead6db91a2c23
--- /dev/null
+++ b/LayoutTests/http/tests/loading/preload-ignore-invalid-base.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<script src="/js-test-resources/js-test.js"></script>
+<script>
+window.fail = false;
+</script>
+<base href="gopher:???:"></base>
+<script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=100"></script>
+<!-- The resource should not be read, as the baseUrl is now set to empty from reading invalid url -->
+<script src="resources/fail.js"></script>
+<script>
+shouldBeFalse("internals.isPreloaded('resources/fail.js');");
Yoav Weiss 2015/04/02 08:10:27 The script testing for isPreloaded should run inli
+shouldBeFalse('window.fail')
+</script>

Powered by Google App Engine
This is Rietveld 408576698