summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/test/xpcshell/data/file_stylesheet_cache_2.html
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/extensions/test/xpcshell/data/file_stylesheet_cache_2.html')
-rw-r--r--toolkit/components/extensions/test/xpcshell/data/file_stylesheet_cache_2.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/toolkit/components/extensions/test/xpcshell/data/file_stylesheet_cache_2.html b/toolkit/components/extensions/test/xpcshell/data/file_stylesheet_cache_2.html
new file mode 100644
index 0000000000..07a4324c44
--- /dev/null
+++ b/toolkit/components/extensions/test/xpcshell/data/file_stylesheet_cache_2.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<meta charset=utf-8>
+<!-- The first one should hit the cache, the second one should not. -->
+<link rel=stylesheet href=file_stylesheet_cache.css>
+<script>
+ "use strict";
+ // This script guarantees that the load of the above stylesheet has happened
+ // by now.
+ //
+ // Now we can go ahead and load the other one programmatically. It's
+ // important that we don't just throw a <link> in the markup below to
+ // guarantee
+ // that the load happens afterwards (that is, to cheat the parser's speculative
+ // load mechanism).
+ const link = document.createElement("link");
+ link.rel = "stylesheet";
+ link.href = "file_stylesheet_cache.css?2";
+ document.head.appendChild(link);
+</script>