~ubuntu-branches/debian/jessie/qtdeclarative-opensource-src/jessie

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp

  • Committer: Package Import Robot
  • Author(s): Lisandro Damián Nicanor Pérez Meyer, Lisandro Damián Nicanor Pérez Meyer
  • Date: 2013-08-30 22:09:43 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130830220943-en0u2dm8cfxpi53o
Tags: 5.1.1-1
[ Lisandro Damián Nicanor Pérez Meyer ]
* New upstream release.
* Update symbols file with buildds' logs.
* Remove fix_systemdialogs_path, applied upstream.
* Adjust examples install file.
* Update symbols files with current build.
* Tighten Qt 5 build dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
    void removeProvider_data();
72
72
    void removeProvider();
73
73
 
 
74
    void imageProviderId_data();
 
75
    void imageProviderId();
 
76
 
74
77
    void threadTest();
75
78
 
76
79
private:
372
375
    delete obj;
373
376
}
374
377
 
 
378
void tst_qquickimageprovider::imageProviderId_data()
 
379
{
 
380
    QTest::addColumn<QString>("providerId");
 
381
 
 
382
    QTest::newRow("lowercase") << QStringLiteral("imageprovider");
 
383
    QTest::newRow("CamelCase") << QStringLiteral("ImageProvider");
 
384
    QTest::newRow("UPPERCASE") << QStringLiteral("IMAGEPROVIDER");
 
385
}
 
386
 
 
387
void tst_qquickimageprovider::imageProviderId()
 
388
{
 
389
    QFETCH(QString, providerId);
 
390
 
 
391
    QQmlEngine engine;
 
392
 
 
393
    bool deleteWatch = false;
 
394
    TestQImageProvider *provider = new TestQImageProvider(&deleteWatch);
 
395
 
 
396
    engine.addImageProvider(providerId, provider);
 
397
    QVERIFY(engine.imageProvider(providerId) != 0);
 
398
 
 
399
    engine.removeImageProvider(providerId);
 
400
    QVERIFY(deleteWatch);
 
401
}
 
402
 
375
403
class TestThreadProvider : public QQuickImageProvider
376
404
{
377
405
    public: