/* * Copyright 2000-2016 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.vaadin.tests.contextclick; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.Point; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.remote.DesiredCapabilities; import com.vaadin.testbench.elements.AbstractComponentElement; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.parallel.BrowserUtil; import com.vaadin.testbench.parallel.TestCategory; import com.vaadin.tests.tb3.MultiBrowserTest; @TestCategory("contextclick") public abstract class AbstractContextClickTest extends MultiBrowserTest { private Pattern defaultLog = Pattern .compile("[0-9]+. ContextClickEvent: [(]([0-9]+), ([0-9]+)[)]"); @Override protected boolean useNativeEventsForIE() { return false; } @Override public List getBrowsersToTest() { return getBrowsersSupportingContextMenu(); } @Before public void setUp() { openTestURL(); } @Test public void testDefaultListener() { addOrRemoveDefaultListener(); assertDefaultContextClickListener(1); } protected void assertNoContextClickHandler() { AbstractComponentElement component = $(AbstractComponentElement.class) .id("testComponent"); String log = getLogRow(0); contextClick(component); assertEquals("Log entry without a context click listener.", log, getLogRow(0)); } protected void assertDefaultContextClickListener(int index) { AbstractComponentElement component = $(AbstractComponentElement.class) .id("testComponent"); int x = 20; int y = 20; contextClick(component, x, y); Point l = component.getLocation(); Matcher matcher = defaultLog.matcher(getLogRow(0)); assertTrue("Log row content did not match default listener output: " + getLogRow(0), matcher.find()); int xCoord = Integer.parseInt(matcher.group(1)); int yCoord = Integer.parseInt(matcher.group(2)); int xExpected = l.getX() + x; int yExpected = l.getY() + y; assertTrue( "X Coordinate differs too much from expected. Expected: " + xExpected + ", actual: " + xCoord, Math.abs(xExpected - xCoord) <= 1); assertTrue( "Y Coordinate differs too much from expected. Expected: " + yExpected + ", actual: " + yCoord, Math.abs(yExpected - yCoord) <= 1); } protected void addOrRemoveDefaultListener() { $(ButtonElement.class).caption("Add/Remove default listener").first() .click(); } protected void addOrRemoveTypedListener() { $(ButtonElement.class).caption("Add/Remove typed listener").first() .click(); } /** * Performs a context click on given element at coordinates 10, 10 followed * by a regular click. This prevents browser context menu from blocking * future operations. * * @param e * web element */ protected void contextClick(WebElement e) { contextClick(e, 10, 10); } /** * Performs a context click on given element at given coordinates followed * by a regular click. This prevents browser context menu from blocking * future operations. * * @param e * web element * @param xCoord * x coordinate relative to the top-left corner of the element * @param yCoord * y coordinate relative to the top-left corner of the element */ protected void contextClick(WebElement e, int xCoord, int yCoord) { if (BrowserUtil.isFirefox(getDesiredCapabilities())) { // Workaround for Selenium/TB and Firefox 45 issue int x = e.getLocation().getX() + xCoord; int y = e.getLocation().getY() + yCoord; getCommandExecutor().executeScript( "var ev = document.createEvent('MouseEvents'); ev.initMouseEvent('contextmenu', true, true, document.defaultView, 1, arguments[1], arguments[2], arguments[1], arguments[2], false, false, false, false, 2, null); arguments[0].dispatchEvent(ev);", e, x, y); // make sure browser context menu does not block the test getCommandExecutor().executeScript( "var ev = document.createEvent('MouseEvents'); ev.initMouseEvent('click', true, true, document.defaultView, 1, arguments[1]-5, arguments[2]-5, arguments[1]-5, arguments[2]-5, false, false, false, false, 1, null); arguments[0].dispatchEvent(ev);", e, x, y); } else { new Actions(getDriver()).moveToElement(e, xCoord, yCoord) .contextClick().moveByOffset(-5, -5).click().perform(); } } } n value='artonge/feat/implement_custom_updater_for_object_storage'>artonge/feat/implement_custom_updater_for_object_storage Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/dist/settings-vue-settings-admin-security.js.license
blob: 89aa9c26770b516607f3d1a4609c81e68b46b16e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
SPDX-License-Identifier: MIT
SPDX-License-Identifier: ISC
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-License-Identifier: BSD-3-Clause
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: (MPL-2.0 OR Apache-2.0)
SPDX-FileCopyrightText: inherits developers
SPDX-FileCopyrightText: escape-html developers
SPDX-FileCopyrightText: debounce developers
SPDX-FileCopyrightText: atomiks
SPDX-FileCopyrightText: Varun A P
SPDX-FileCopyrightText: Tobias Koppers @sokra
SPDX-FileCopyrightText: Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)
SPDX-FileCopyrightText: T. Jameson Little <t.jameson.little@gmail.com>
SPDX-FileCopyrightText: Roman Shtylman <shtylman@gmail.com>
SPDX-FileCopyrightText: Roeland Jago Douma
SPDX-FileCopyrightText: Paul Vorbach <paul@vorba.ch> (http://paul.vorba.ch)
SPDX-FileCopyrightText: Paul Vorbach <paul@vorb.de> (http://vorb.de)
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Matt Zabriskie
SPDX-FileCopyrightText: Joyent
SPDX-FileCopyrightText: John-David Dalton <john.david.dalton@gmail.com>
SPDX-FileCopyrightText: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
SPDX-FileCopyrightText: Jeff Sagal <sagalbot@gmail.com>
SPDX-FileCopyrightText: Jacob Clevenger<https://github.com/wheatjs>
SPDX-FileCopyrightText: Guillaume Chau <guillaume.b.chau@gmail.com>
SPDX-FileCopyrightText: GitHub Inc.
SPDX-FileCopyrightText: Feross Aboukhadijeh
SPDX-FileCopyrightText: Evan You
SPDX-FileCopyrightText: Eugene Sharygin <eush77@gmail.com>
SPDX-FileCopyrightText: Eric Norris (https://github.com/ericnorris)
SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <mario@cure53.de> (https://cure53.de/)
SPDX-FileCopyrightText: David Clark
SPDX-FileCopyrightText: Christoph Wurst
SPDX-FileCopyrightText: Anthony Fu <https://github.com/antfu>
SPDX-FileCopyrightText: @nextcloud/dialogs developers


This file is generated from multiple sources. Included packages:
- @floating-ui/core
	- version: 1.6.5
	- license: MIT
- @floating-ui/utils
	- version: 0.2.5
	- license: MIT
- @nextcloud/auth
	- version: 2.4.0
	- license: GPL-3.0-or-later
- @nextcloud/axios
	- version: 2.5.1
	- license: GPL-3.0-or-later
- @nextcloud/browser-storage
	- version: 0.4.0
	- license: GPL-3.0-or-later
- @nextcloud/capabilities
	- version: 1.2.0
	- license: GPL-3.0-or-later
- @nextcloud/dialogs
	- version: 6.1.1
	- license: AGPL-3.0-or-later
- semver
	- version: 7.6.3
	- license: ISC
- @nextcloud/event-bus
	- version: 3.3.1
	- license: GPL-3.0-or-later
- @nextcloud/initial-state
	- version: 2.2.0
	- license: GPL-3.0-or-later
- @nextcloud/l10n
	- version: 3.2.0
	- license: GPL-3.0-or-later
- @nextcloud/logger
	- version: 3.0.2
	- license: GPL-3.0-or-later
- @nextcloud/password-confirmation
	- version: 5.3.1
	- license: MIT
- @nextcloud/router
	- version: 3.0.1
	- license: GPL-3.0-or-later
- @nextcloud/vue-select
	- version: 3.25.1
	- license: MIT
- @nextcloud/vue
	- version: 8.23.1
	- license: AGPL-3.0-or-later
- @vueuse/components
	- version: 11.1.0
	- license: MIT
- @vueuse/core
	- version: 11.1.0
	- license: MIT
- @vueuse/shared
	- version: 11.1.0
	- license: MIT
- axios
	- version: 1.7.9
	- license: MIT
- base64-js
	- version: 1.5.1
	- license: MIT
- charenc
	- version: 0.0.2
	- license: BSD-3-Clause
- crypt
	- version: 0.0.2
	- license: BSD-3-Clause
- css-loader
	- version: 7.1.2
	- license: MIT
- debounce
	- version: 2.2.0
	- license: MIT
- dompurify
	- version: 3.2.4
	- license: (MPL-2.0 OR Apache-2.0)
- escape-html
	- version: 1.0.3
	- license: MIT
- floating-vue
	- version: 1.0.0-beta.19
	- license: MIT
- focus-trap
	- version: 7.6.0
	- license: MIT
- ieee754
	- version: 1.2.1
	- license: BSD-3-Clause
- is-buffer
	- version: 1.1.6
	- license: MIT
- lodash
	- version: 4.17.21
	- license: MIT
- md5
	- version: 2.3.0
	- license: BSD-3-Clause
- buffer
	- version: 6.0.3
	- license: MIT
- inherits
	- version: 2.0.3
	- license: ISC
- util
	- version: 0.10.4
	- license: MIT
- path
	- version: 0.12.7
	- license: MIT
- process
	- version: 0.11.10
	- license: MIT
- striptags
	- version: 3.2.0
	- license: MIT
- style-loader
	- version: 4.0.0
	- license: MIT
- tabbable
	- version: 6.2.0
	- license: MIT
- toastify-js
	- version: 1.12.0
	- license: MIT
- unist-builder
	- version: 4.0.0
	- license: MIT
- unist-util-is
	- version: 6.0.0
	- license: MIT
- unist-util-visit-parents
	- version: 6.0.1
	- license: MIT
- unist-util-visit
	- version: 5.0.0
	- license: MIT
- vue-loader
	- version: 15.11.1
	- license: MIT
- vue
	- version: 2.7.16
	- license: MIT
- vuex
	- version: 3.6.2
	- license: MIT
- webpack
	- version: 5.94.0
	- license: MIT
- nextcloud
	- version: 1.0.0
	- license: AGPL-3.0-or-later