2
* Copyright 2015 Canonical Ltd.
4
* This file is part of unity-webapps-qml.
6
* unity-webapps-qml is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* unity-webapps-qml is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
import com.canonical.Oxide 1.0 as Oxide
23
import Ubuntu.UnityWebApps 0.1
29
name: "LaunchEmbeddedUIApiTest"
34
signalName: "visibleChanged"
41
function test_invoke_shareRequestedCallback() {
44
webview.url = "tst_api_launchEmbeddedUI.html"
46
evaluateCode("var e = new CustomEvent('launchEmbeddedUI', { bubbles: true }); document.dispatchEvent(e);")
49
// compare(spy.count, 1, "Should have had 1 messageReceived signal");
55
injectExtraUbuntuApis: true
56
injectExtraContentShareCapabilities: true
59
function evaluateCode(code, wrap) {
60
webview.rootFrame.sendMessageNoReply(
64
wrap: wrap === undefined ? false : wrap });
79
context: "oxide://test-ui/"
80
url: Qt.resolvedUrl("tst_api_launchEmbeddedUI.js")
81
incognitoEnabled: true
87
function getUnityWebappsProxies() {
88
return UnityWebAppsUtils.makeProxiesForWebViewBindee(webview);