~mandel/ubuntu-download-manager/use-apparmor

« back to all changes in this revision

Viewing changes to ubuntu-download-manager-tests/test_downloads_db.cpp

  • Committer: Manuel de la Pena
  • Date: 2013-09-09 16:05:49 UTC
  • Revision ID: manuel@canonical.com-20130909160549-6h8v9iza3dfeuxmq
Changed download factory to use apparmor to build the dbus paths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
    QFETCH(QVariantMap, metadata);
175
175
    QFETCH(StringMap, headers);
176
176
 
177
 
    FakeSystemNetworkInfo* networkInfo = new FakeSystemNetworkInfo();
178
 
    FakeRequestFactory* nam = new FakeRequestFactory();
179
 
    ProcessFactory* processFactory = new FakeProcessFactory();
 
177
    QSharedPointer<SystemNetworkInfo> networkInfo =
 
178
        QSharedPointer<SystemNetworkInfo>(new FakeSystemNetworkInfo());
 
179
    QSharedPointer<RequestFactory> nam =
 
180
        QSharedPointer<RequestFactory>(new FakeRequestFactory());
 
181
    QSharedPointer<ProcessFactory> processFactory =
 
182
        QSharedPointer<ProcessFactory>(new FakeProcessFactory());
180
183
 
181
184
    FakeDownload* download = new FakeDownload(id, path, url, hash,
182
185
        HashAlgorithm::getHashAlgo(hashAlgoString), metadata, headers,
269
272
    QFETCH(QVariantMap, metadata);
270
273
    QFETCH(StringMap, headers);
271
274
 
272
 
    FakeSystemNetworkInfo* networkInfo = new FakeSystemNetworkInfo();
273
 
    FakeRequestFactory* nam = new FakeRequestFactory();
274
 
    ProcessFactory* processFactory = new FakeProcessFactory();
 
275
    QSharedPointer<SystemNetworkInfo> networkInfo =
 
276
        QSharedPointer<SystemNetworkInfo>(new FakeSystemNetworkInfo());
 
277
    QSharedPointer<RequestFactory> nam =
 
278
        QSharedPointer<RequestFactory>(new FakeRequestFactory());
 
279
    QSharedPointer<ProcessFactory> processFactory =
 
280
        QSharedPointer<ProcessFactory>(new FakeProcessFactory());
275
281
 
276
282
    FakeDownload* download = new FakeDownload(id, path, url, hash,
277
283
        HashAlgorithm::getHashAlgo(hashAlgoString), metadata, headers,