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

« back to all changes in this revision

Viewing changes to tests/unittests/history-model/tst_HistoryModelTests.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:
197
197
        model->setDatabasePath(fileName);
198
198
        QCOMPARE(model->rowCount(), 2);
199
199
    }
 
200
 
 
201
    void shouldClearAll()
 
202
    {
 
203
        QSignalSpy spyReset(model, SIGNAL(modelReset()));
 
204
        model->add(QUrl("http://example.org/"), "Example Domain", QUrl());
 
205
        model->add(QUrl("http://example.com/"), "Example Domain", QUrl());
 
206
        QCOMPARE(model->rowCount(), 2);
 
207
        QVERIFY(spyReset.isEmpty());
 
208
        model->clearAll();
 
209
        QCOMPARE(spyReset.count(), 1);
 
210
        QCOMPARE(model->rowCount(), 0);
 
211
        model->clearAll();
 
212
        QCOMPARE(spyReset.count(), 1);
 
213
    }
200
214
};
201
215
 
202
216
QTEST_MAIN(HistoryModelTests)