~phablet-team/webbrowser-app/trunk

« back to all changes in this revision

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

  • Committer: CI Train Bot
  • Author(s): Olivier Tilloy
  • Date: 2015-03-31 15:17:08 UTC
  • mfrom: (940.1.1 webbrowser-app)
  • Revision ID: ci-train-bot@canonical.com-20150331151708-rnlxz1tzrk7vykqe
Rewrite URLs with an uppercase scheme. Fixes: #1436312

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
            compare(addressBar.requestedUrl, data.requestedUrl)
186
186
        }
187
187
 
 
188
        function test_uppercaseSchemeShouldBeRewritten_data() {
 
189
            return [
 
190
                {text: "HTTP://WWW.UBUNTU.COM", requestedUrl: "http://www.ubuntu.com"},
 
191
                {text: "HTTP://www.ubuntu.com", requestedUrl: "http://www.ubuntu.com"},
 
192
                {text: "HTTPS://www.ubuntu.com", requestedUrl: "https://www.ubuntu.com"},
 
193
                {text: "FILE:///usr/share/doc/ubuntu-online-tour/index.html", requestedUrl: "file:///usr/share/doc/ubuntu-online-tour/index.html"},
 
194
                {text: "FTP://ubuntu.com", requestedUrl: "ftp://ubuntu.com"},
 
195
            ]
 
196
        }
 
197
 
 
198
        function test_uppercaseSchemeShouldBeRewritten(data) {
 
199
            typeString(data.text)
 
200
            compare(addressBar.text, data.text)
 
201
            keyClick(Qt.Key_Return)
 
202
            validatedSpy.wait()
 
203
            compare(addressBar.requestedUrl, data.requestedUrl)
 
204
        }
 
205
 
188
206
        function test_urlShouldBeSimplifiedWhenUnfocused_data() {
189
207
            return [
190
208
                {input: "http://www.ubuntu.com",