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

« back to all changes in this revision

Viewing changes to tests/unittests/favicon-fetcher/tst_FaviconFetcherTests.cpp

  • Committer: Package Import Robot
  • Author(s): CI Train Bot
  • Date: 2015-06-02 14:26:50 UTC
  • mto: This revision was merged to the branch mainline in revision 150.
  • Revision ID: package-import@ubuntu.com-20150602142650-6a2m68sh2uyep4b5
Tags: upstream-0.23+15.10.20150602
ImportĀ upstreamĀ versionĀ 0.23+15.10.20150602

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2014 Canonical Ltd.
 
2
 * Copyright 2014-2015 Canonical Ltd.
3
3
 *
4
4
 * This file is part of webbrowser-app.
5
5
 *
220
220
        QVERIFY(serverSpy->isEmpty());
221
221
    }
222
222
 
 
223
    void shouldNotCacheIcon()
 
224
    {
 
225
        fetcher->setShouldCache(false);
 
226
        QUrl url(server->baseURL() + "/favicon1.ico");
 
227
        fetcher->setUrl(url);
 
228
        QCOMPARE(fetcher->url(), url);
 
229
        QVERIFY(fetcherSpy->wait());
 
230
        QCOMPARE(serverSpy->count(), 1);
 
231
        QUrl icon = fetcher->localUrl();
 
232
        QVERIFY(!icon.isLocalFile());
 
233
        QCOMPARE(icon.scheme(), QString("data"));
 
234
        QVERIFY(icon.path().startsWith("image/png;base64,"));
 
235
    }
 
236
 
223
237
    void shouldHandleRedirections()
224
238
    {
225
239
        QUrl url(server->baseURL() + "/redirect/3/favicon1.ico");