summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlxmlhttprequest/data/setRequestHeader_unsent.qml
blob: 30bc93e1295a2dd65ad649b8ac1b950677cf462d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import Qt 4.6

QtObject {
    property bool test: false

    Component.onCompleted: {
        var x = new XMLHttpRequest;

        try {
            x.setRequestHeader("Test-header", "value");
        } catch (e) {
            if (e.code == DOMException.INVALID_STATE_ERR)
                test = true;
        }
    }
}