Personal tools

Blocklisting/Testing

From MozillaWiki

Jump to: navigation, search

Contents

Testing Staged Blocklist

To test a staged block:

  1. Go to about:config, find the extensions.blocklist.url pref and change the addons.mozilla.org part of the value to addons-dev.allizom.org

Forcing a Blocklist Ping

  1. In Firefox 30 and above, you must first enable chrome debugging
    • Open the debugging tools (Tools Menu > Web Developer > Web Console) on Windows -> ALT key to expose the menu bar.
    • Open the Options Panel (Gear icon on the developer tools toolbar, left of the Console Tab)
    • Find and check Advanced Settings > Enabled chrome debugging
  2. Open Browser Console (Tools > Web Developer > Browser Console)
  3. Paste and run this snippet:
 Components.classes["@mozilla.org/extensions/blocklist;1"].getService(Components.interfaces.nsITimerCallback).notify(null);

Testing Graphics Blocklist entries

(Note: this only applies to Windows.)

  1. If the blocklist entry is on staging, see above for testing a staged blocklist first.
  2. Ensure you're currently hardware accelerated by opening about:support and looking at the Graphics section. Check that you have:
    1. Direct2D true (if on Windows 7 or Vista with the platform update)
    2. Hardware accelerated windows 1/1 Direct3D 9 (or 10)
  3. Force a blocklist ping, as above.
  4. Wait 5 seconds.
  5. Restart your browser.
  6. Open about:support and look at the Graphics section again. Ensure that:
    1. Direct2D is false
    2. Hardware accelerated windows 0/1

Quickly Checking Features

In addition to the above section, features can also be checked for disabled/enabled status by the following:

Feature Enabled Disabled
Direct2D (Windows) about:support will show "Direct2D Enabled: true" about:support will show "Direct2D Enabled: false"
Direct3D 9 Layers (Windows) about:support will show "GPU Accelerated Windows: 2/2 Direct3D 9" *if it says Direct3D 10, this is not possible to test on this setup about:support will show "GPU Accelerated Windows: 0/2" and will not list the rendering API
Direct3D 10 Layers (Windows) about:support will show "GPU Accelerated Windows: 2/2 Direct3D 10" *if it says Direct3D 9, this is not possible to test on this setup about:support will show "GPU Accelerated Windows: 0/2" and will not list the rendering API
Direct3D 10.1 Layers (Windows) about:support will show "GPU Accelerated Windows: 2/2 Direct3D 10" *if it says Direct3D 9, this is not possible to test on this setup about:support will show "GPU Accelerated Windows: 0/2" and will not list the rendering API
OpenGL Layers (Android, Linux, Mac) about:support will show "GPU Accelerated Windows: 1/1 OpenGL" about:support will show "GPU Accelerated Windows: 0/1" and will not list the rendering API
WebGL, OpenGL Variant (Android, Linux, Mac, sometimes Windows) about:support will show "WebGL Renderer: <your renderer>" and it will not contain anything about being blocked for a driver version or similar messages *NOTE: if it contains the word "ANGLE" on windows, it is NOT using OpenGL, even if after that it says "OpenGL ES 2.0" or some such about:support will show "WebGL Renderer: <some error>" which contains some information about why the renderer is blocked
WebGL, ANGLE Variant (Windows) about:support will show "WebGL Renderer: ANGLE( <your render> )" and will not contain anything about being blocked for a driver version or similar messages. *NOTE: DO NOT assume that if it says "OpenGL ES 2.0" or some such that it is using OpenGL; the only important thing is that it says "ANGLE" about:support will show "WebGL Renderer: <some error>" which contains some information about why the renderer is blocked
WebGL MSAA Go to https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/demos/mozilla/spore/index.html and compare the model to this reference; if it looks like the left image, MSAA is enabled. Go to https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/demos/mozilla/spore/index.html and compare the model to this reference; if it looks like the right image, MSAA is disabled. *NOTE: this is not a scientific test. MSAA may be disabled but you cannot be certain that it's blocked. the card could simply not support it. the best way to be sure is to download a utility that checks your GPU's available extensions and if antialiasing is not in that list, it is simply not supported
  • NOTE: Direct3D 10 and Direct3D 10.1 are impossible to distinguish visually.

Spoofing Hardware Details for Blocklist Testing

Sometimes you don't have hardware or software available to test a given blocklist entry. On Windows, you can spoof your hardware and software details to the graphics blacklist using environment variables.

r
Environment Variable Sample Value(s)Meaning
MOZ_GFX_SPOOF_DRIVER_VERSION 8.17.18.2563 The version of the driver you want to spoof.
MOZ_GFX_SPOOF_VENDOR_ID 0x1002 The PCI vendor ID of the card you want to spoof.
MOZ_GFX_SPOOF_DEVICE_ID 0x3245 The PCI device ID of the card you want to spoof.
MOZ_GFX_SPOOF_WINDOWS_VERSION
Windows 20000x50000
Windows XP0x50001
Windows Server 20030x50002
Windows Vista0x60000
Windows 70x60001
The numeric ID of the Windows version you want to spoof.

Testing on Android

Testing on Android is somewhat different than other platforms, especially for the downloadable blocklist. There's no way to force a ping, so the best way to do it is to set the automatic ping interval very low and wait. Here are some settings you should use which are set in about:config:

  1. "Reset" app.update.lastUpdateTime.blocklist-background-update-timer
  2. Make sure extensions.blocklist.enabled is true (should default this way)
  3. Set extensions.blocklist.interval to 10
  4. "Reset" extensions.blocklist.pingCountTotal
  5. "Reset" extensions.blocklist.pingCountVersion
  6. Set extensions.blocklist.url to the following to block Nexus S devices from using WebGL: http://people.mozilla.org/~dsherk/blocklist-nexus_s.xml *NOTE: this is just a way to test it. To test blocking on other devices, you will have to write up your own xml file.

Note that, even though the interval is set to 10, it can take several minutes for it to ping. I've found that closing Fennec (by opening the menu and hitting Quit, not just hitting the Home button) and re-opening it makes it ping shortly after start.

Upgrade Testing

Check when the blocklist was implemented and which version it was implemented. Verify that upgrading to the newest version will not cause an issue. [ outcome from bug 838845 ]