~osomon/oxide/non-ime-initiated-text-edit

« back to all changes in this revision

Viewing changes to qt/tests/qmltests/api/tst_WebView_webProcessStatus.qml

  • Committer: Olivier Tilloy
  • Date: 2015-05-18 14:31:37 UTC
  • mfrom: (1022.1.58 oxide)
  • Revision ID: olivier.tilloy@canonical.com-20150518143137-omciv1buwk0t5r6o
Merge the latest changes from trunk and resolve a couple of conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
import QtTest 1.0
 
3
import com.canonical.Oxide 1.8
 
4
import com.canonical.Oxide.Testing 1.0
 
5
 
 
6
TestWebView {
 
7
  id: webView
 
8
  focus: true
 
9
  width: 200
 
10
  height: 200
 
11
 
 
12
  TestCase {
 
13
    name: "WebView_webProcessStatus"
 
14
    when: windowShown
 
15
 
 
16
    function test_WebView_webProcessStatus_data() {
 
17
      return [
 
18
        { signal: 9, status: WebView.WebProcessKilled },
 
19
        { signal: 11, status: WebView.WebProcessCrashed }
 
20
      ];
 
21
    }
 
22
 
 
23
    function test_WebView_webProcessStatus(data) {
 
24
      webView.url = "http://testsuite/empty.html";
 
25
      verify(webView.waitForLoadSucceeded(),
 
26
             "Timed out waiting for successful load");
 
27
      compare(webView.webProcessStatus, WebView.WebProcessRunning);
 
28
 
 
29
      OxideTestingUtils.killWebProcesses(data.signal);
 
30
      tryCompare(webView, "webProcessStatus", data.status);
 
31
 
 
32
      webView.reload();
 
33
      verify(webView.waitForLoadSucceeded(),
 
34
             "Timed out waiting for successful load");
 
35
      compare(webView.webProcessStatus, WebView.WebProcessRunning);
 
36
    }
 
37
  }
 
38
}