~bfiller/webbrowser-app/restrict-arches

« back to all changes in this revision

Viewing changes to tests/unittests/qml/tst_UbuntuWebView02.qml

  • Committer: Olivier Tilloy
  • Date: 2014-03-17 22:16:59 UTC
  • mfrom: (468.1.18 with-oxide-api)
  • Revision ID: olivier.tilloy@canonical.com-20140317221659-b2jao4k44upufd2n
Version the new UbuntuWebView API as 0.2 (oxide).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import QtQuick 2.0
20
20
import QtTest 1.0
21
 
import Ubuntu.Components.Extras.Browser 0.1
 
21
import Ubuntu.Components.Extras.Browser 0.2
22
22
 
23
23
TestCase {
24
24
    name: "UbuntuWebView"
25
25
 
26
26
    function test_custom_UA_override() {
27
27
        compare(webview1.getUAString(), undefined)
28
 
        // passing a 'url' parameter to getUAString()
29
 
        // (as was the API before) shouldn’t hurt:
30
 
        compare(webview1.getUAString("http://example.com"), undefined)
31
28
        verify(webview1.context.userAgent !== undefined)
32
29
        compare(webview2.context.userAgent, "custom UA")
33
30
    }