diff --git a/dom/base/test/bug704320.sjs b/dom/base/test/bug704320.sjs
new file mode 100644
index 000000000000..0a41ca9a4732
--- /dev/null
+++ b/dom/base/test/bug704320.sjs
@@ -0,0 +1,246 @@
+var BASE_URL = 'example.com/tests/dom/base/test/bug704320.sjs';
+
+function createTestUrl(schemeFrom, schemeTo, policy, action, type) {
+ return schemeTo + '://' + BASE_URL + '?' +
+ 'action=' + action + '&' +
+ 'scheme=' + schemeFrom + '-to-' + schemeTo + '&' +
+ 'policy=' + policy + '&' +
+ 'type=' + type;
+}
+
+function create2ndLevelIframeUrl(schemeFrom, schemeTo, policy, type) {
+ return schemeFrom + '://' + BASE_URL + '?' +
+ 'action=create-2nd-level-iframe&' +
+ 'scheme-from=' + schemeFrom + '&' +
+ 'scheme-to=' + schemeTo + '&' +
+ 'policy=' + policy + '&' +
+ 'type=' + type;
+}
+
+// Creates the following test cases for the specified scheme and referrer
+// policy combination:
+//
+// @import
+// font-face
+// bg-url
+// \n\
+ \n\
+ \n\
+ \n\
+ \n\
+ \n\
+ \n\
+ \n\
+ \n\
+ \n\
+ \n\
+