Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Bug 816288 - page-mod ignores the any include rules for `contentStyle` after "*" #690

Merged
merged 2 commits into from

2 participants

@ZER0
Owner

Fixed old regression, that stop the iteration of include rules for content style after a "*" rule

@erikvold
Owner

@zer0 we should add a test if possible

@ZER0
Owner

@erikvold I updated the unit test to reflect the issue described in Bug 816288.

@erikvold erikvold merged commit 94d4173 into mozilla:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 15, 2012
  1. @ZER0

    Fixed old regression, that stop the iteration of include rules for co…

    ZER0 authored
    …ntent style after a "*" rule
Commits on Dec 20, 2012
  1. @ZER0

    Updated unit test

    ZER0 authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 4 deletions.
  1. +1 −3 lib/sdk/page-mod.js
  2. +1 −1  test/test-page-mod.js
View
4 lib/sdk/page-mod.js
@@ -287,10 +287,8 @@ const PageMod = Loader.compose(EventEmitter, {
documentRules.push("domain(" + pattern.domain + ")");
else if (pattern.urlPrefix)
documentRules.push("url-prefix(" + pattern.urlPrefix + ")");
- else if (pattern.anyWebPage) {
+ else if (pattern.anyWebPage)
documentRules.push("regexp(\"^(https?|ftp)://.*?\")");
- break;
- }
}
let uri = "data:text/css;charset=utf-8,";
View
2  test/test-page-mod.js
@@ -654,7 +654,7 @@ exports.testContentScriptOptionsOption = function(test) {
exports.testPageModCss = function(test) {
let [pageMod] = testPageMod(test,
'data:text/html;charset=utf-8,<div style="background: silver">css test</div>', [{
- include: "data:*",
+ include: ["*", "data:*"],
contentStyle: "div { height: 100px; }",
contentStyleFile:
require("sdk/self").data.url("pagemod-css-include-file.css")
Something went wrong with that request. Please try again.