~ubuntu-branches/ubuntu/saucy/webbrowser-app/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/unittests/commandline-parser/tst_CommandLineParserTests.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Alexandre Abreu, Olivier Tilloy, Ubuntu daily release
  • Date: 2013-09-19 15:52:17 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20130919155217-tu7k7o4inckuh1hm
Tags: 0.22+13.10.20130919.3-0ubuntu1
[ Alexandre Abreu ]
* Add a 'maximized' command line parameter mostly to enhance the
  control for webapps launch.

[ Olivier Tilloy ]
* Use the value of APP_ID to set the application name. This ensures
  that webapps (which run with a unique app ID) will write their data
  where they ought to, and that they won’t have access to other apps’
  cache and cookies. (LP: #1226085)
* Add a unity action to clear the navigation history.
* Override the UA string for facebook.com to ensure we’re getting
  touch-enabled content. Without this override, we were getting
  unstyled mobile content from the 90s. Impersonating an iphone or
  android would offer to install the respective applications when
  logging in. The 'Firefox' token gets us the right content (and
  pretending to be AppleWebKit seems to be necessary too, otherwise
  the layout is busted). (LP: #1215002)

[ Ubuntu daily release ]
* Automatic snapshot from revision 318

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
        QCOMPARE(CommandLineParser(args).webappName(), webappName);
206
206
    }
207
207
 
 
208
    void shouldBeMaximized_data()
 
209
    {
 
210
        QTest::addColumn<QStringList>("args");
 
211
        QTest::addColumn<bool>("maximized");
 
212
 
 
213
        QString BINARY("webbrowser-app");
 
214
 
 
215
        QTest::newRow("no switch") << (QStringList() << BINARY) << false;
 
216
        QTest::newRow("maximized switch") << (QStringList() << BINARY << "--maximized") << true;
 
217
        QTest::newRow("switch with typo") << (QStringList() << BINARY << "--maxidmized") << false;
 
218
    }
 
219
 
 
220
    void shouldBeMaximized()
 
221
    {
 
222
        QFETCH(QStringList, args);
 
223
        QFETCH(bool, maximized);
 
224
        QCOMPARE(CommandLineParser(args).maximized(), maximized);
 
225
    }
208
226
 
209
227
    void shouldUseWebappsModelSearchPath_data()
210
228
    {