W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > January 2011

Re: does mobile checker from CVS correspond to the source of the actual dev manual?

From: Francois Daoust <fd@w3.org>
Date: Tue, 11 Jan 2011 13:27:03 +0100
Message-ID: <4D2C4C97.5020406@w3.org>
To: matteo.bertamini@studenti.unitn.it
CC: public-mobileok-checker@w3.org
Hi Matteo,

Thanks for your interest! See below for some answers.

On 01/10/2011 05:21 PM, Matteo Bertamini wrote:
> Hello,
> I'm trying to work with the last code of Mobile Checker (updated through
> CVS) and I'm trying to learn how to use it by following the dev guide.

The dev guide is quite outdated and hasn't been updated to account for changes made between v1.0 and v1.1, and the most impacted section is section 5... Any help to update the guide would be most appreciated!

The CVS description for the project contains a note to warn people against that, but it can easily be missed, for sure:
  http://dev.w3.org/cvsweb/2007/mobileok-ref/
  "NB: User/Developer guides at the root folder are currently out of date."

  
> In an example about setting optional headers (sect. 5.2) there's a
> snippet that does not work with my code. In particular:
> ------------------------------------------------------------------
> Map<String,Object>  configMap = new HashMap<String,Object>();
> configMap.put(TesterConfiguration.HTTP_REQUEST_HEADER_OVERRIDES_KEY,
> myAdditionalHeaders);
> ------------------------------------------------------------------
>
> can't work because the variable (or constant)
> TesterConfiguration.HTTP_REQUEST_HEADER_OVERRIDES_KEY does not exist.
> The online javadoc says the same thing: that variable does not exist.

The online Javadoc should be accurate. It contains a few hints to extend the mobileOK Checker to your liking:
http://dev.w3.org/2007/mobileok-ref/docs/org/w3c/mwi/mobileok/basic/package-summary.html#package_description

See in particular sub-section "Changing the HTTP headers sent in HTTP requests". In your case, if you want to add more HTTP headers, you should use HttpResourceRetriever.CONFIG_HTTP_ADDITIONAL_HEADERS:
http://dev.w3.org/2007/mobileok-ref/docs/org/w3c/mwi/mobileok/basic/HttpResourceRetriever.html#CONFIG_HTTP_ADDITIONAL_HEADERS



> And the following:
> ------------------------------------------------------------------
>   TesterConfiguration config = new TesterConfiguration(configMap);
> ------------------------------------------------------------------
>
> does not work as well, because a constructor with that kind of parameter
> does not exist!
>
> So, what's wrong? Where can I find updated information about this?

See above, the Javadoc should be accurate.

For the TesterConfiguration class:
http://dev.w3.org/2007/mobileok-ref/docs/org/w3c/mwi/mobileok/basic/TesterConfiguration.html

The TesterConfiguration has been generalized and now expects more parameters. You may check the MobileOKConfiguration for an example of usage (this class generates the appropriate TesterConfiguration for mobileOK tests).

Thanks,
Francois.
Received on Tuesday, 11 January 2011 12:27:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 12:27:32 GMT