Bug 1035091 - Add a reftest to ensure @-moz-document works with user sheets. r=cam
☠☠ backed out by b9e8df505dd4 ☠ ☠
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sat, 17 Dec 2016 11:07:36 +0900
changeset 326884 84ba5ac23266
parent 326883 9174d825a6ee
child 326885 ebb038350129
push id85062
push userVYV03354@nifty.ne.jp
push dateThu, 22 Dec 2016 11:26:30 +0000
treeherdermozilla-inbound@84ba5ac23266 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscam
bugs1035091
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1035091 - Add a reftest to ensure @-moz-document works with user sheets. r=cam MozReview-Commit-ID: DJWlDO0cODd
layout/reftests/usercss/usercss-ref.html
layout/reftests/usercss/usercss.html
layout/tools/reftest/chrome/userContent.css
--- a/layout/reftests/usercss/usercss-ref.html
+++ b/layout/reftests/usercss/usercss-ref.html
@@ -1,10 +1,12 @@
 <!DOCTYPE html>
 <html>
 <head>
 <style>p { background-color: lime; }</style>
 </head>
 <body>
 <p>This paragraph should have a green background.</p>
 <p>This paragraph should have a green background, too.</p>
+<p>@-moz-document rules should be applied.</p>
+<p>@-moz-document rules should not be applied.</p>
 </body>
 </html>
--- a/layout/reftests/usercss/usercss.html
+++ b/layout/reftests/usercss/usercss.html
@@ -1,10 +1,19 @@
 <!DOCTYPE html>
 <html class="reftest-wait">
 <head>
-<style>p { background-color: red; }</style>
+<style>
+p {
+  background-color: red;
+}
+.reftest-xdomain {
+  background: lime;
+}
+</style>
 </head>
 <body>
 <p class="reftest-usercss">This paragraph should have a green background.</p>
 <p class="reftest-userxbl">This paragraph should have a green background, too.</p>
+<p class="reftest-domain">@-moz-document rules should be applied.</p>
+<p class="reftest-xdomain">@-moz-document rules should not be applied.</p>
 </body>
 </html>
--- a/layout/tools/reftest/chrome/userContent.css
+++ b/layout/tools/reftest/chrome/userContent.css
@@ -1,6 +1,17 @@
 .reftest-usercss {
   background: lime !important;
 }
 .reftest-userxbl {
   -moz-binding: url("binding.xml#reftest-userxbl") !important;
 }
+/* file: URLs have an empty domain */
+@-moz-document domain() {
+  .reftest-domain {
+    background: lime !important;
+  }
+}
+@-moz-document domain(example.invalid) {
+  .reftest-xdomain {
+    background: red !important;
+  }
+}