[jbosstools-issues] [JBoss JIRA] (JBIDE-9539) Browsersim app for testing mobile/desktop web apps
Yahor Radtsevich (Issue Comment Edited) (JIRA)
jira-events at lists.jboss.org
Tue Nov 15 14:39:40 EST 2011
[ https://issues.jboss.org/browse/JBIDE-9539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643054#comment-12643054 ]
Yahor Radtsevich edited comment on JBIDE-9539 at 11/15/11 2:38 PM:
-------------------------------------------------------------------
*Note for self*
Working snippets demonstrating changing of the User-Agent header in XULRunner:
{code:java}
nsIServiceManager serviceManager = Mozilla.getInstance().getServiceManager();
nsIPrefService prefService =
(nsIPrefService) serviceManager.getServiceByContractID(
"@mozilla.org/preferences-service;1", nsIPrefService.NS_IPREFSERVICE_IID);
nsIPrefBranch prefBranch = prefService.getBranch("general.useragent.");
prefBranch.setCharPref("override", "my custom user-agent");
{code}
or
{code:java}
nsIPrefBranch rootPrefBranch =
(nsIPrefBranch) serviceManager.getServiceByContractID(
"@mozilla.org/preferences-service;1", nsIPrefBranch.NS_IPREFBRANCH_IID);
rootPrefBranch.setCharPref("general.useragent.override", "my custom user-agent");
{code}
See https://developer.mozilla.org/en/Code_snippets/Preferences#XPCOM_interfaces_for_preferences_system
was (Author: yradtsevich):
*Note for self*
Working snippet demonstrating changing of the User-Agent header in XULRunner:
{code:java}
nsIServiceManager serviceManager = Mozilla.getInstance().getServiceManager();
nsIPrefService prefService =
(nsIPrefService) serviceManager.getServiceByContractID(
"@mozilla.org/preferences-service;1", nsIPrefService.NS_IPREFSERVICE_IID);
nsIPrefBranch prefBranch = prefService.getBranch("general.useragent");
prefBranch.setCharPref("override", "my custom user-agent");
{code}
> Browsersim app for testing mobile/desktop web apps
> --------------------------------------------------
>
> Key: JBIDE-9539
> URL: https://issues.jboss.org/browse/JBIDE-9539
> Project: Tools (JBoss Tools)
> Issue Type: Feature Request
> Components: Visual Page Editor core
> Affects Versions: 3.3.0.M2
> Reporter: Yahor Radtsevich
> Assignee: Yahor Radtsevich
> Labels: new_and_noteworthy
> Fix For: 3.3.0.Beta1
>
> Attachments: Browsersim mockup.bmml, Browsersim mockup.bmml, Browsersim mockup.png, browsersim-frame-screenshot1.png
>
>
> Make possible to preview the rendering of web pages for different devices.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list