зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1312417 - Remove test_orientation_sandbox_no_lock.html and friends as they aren't used and have invalid js. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D8211 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8a6814c2df
Коммит
ac7d1838b5
|
@ -1,14 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<script src="orientationcommon.js"></script>
|
|
||||||
<script>
|
|
||||||
window.addEventListener("message", function(event) {
|
|
||||||
var p = specialPowersLock(event.data);
|
|
||||||
p.then(function() {
|
|
||||||
event.source.postMessage("success", "*");
|
|
||||||
}).catch(function(err) {
|
|
||||||
event.source.postMessage("error", "*");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
|
@ -147,7 +147,6 @@ support-files =
|
||||||
file_htmlserializer_2_basic.html
|
file_htmlserializer_2_basic.html
|
||||||
file_htmlserializer_ipv6.html
|
file_htmlserializer_ipv6.html
|
||||||
file_htmlserializer_ipv6_out.html
|
file_htmlserializer_ipv6_out.html
|
||||||
file_lock_orientation.html
|
|
||||||
file_mozfiledataurl_img.jpg
|
file_mozfiledataurl_img.jpg
|
||||||
file_record_orientation.html
|
file_record_orientation.html
|
||||||
file_restrictedEventSource.sjs
|
file_restrictedEventSource.sjs
|
||||||
|
@ -181,7 +180,6 @@ support-files =
|
||||||
formReset.html
|
formReset.html
|
||||||
invalid_accesscontrol.resource
|
invalid_accesscontrol.resource
|
||||||
invalid_accesscontrol.resource^headers^
|
invalid_accesscontrol.resource^headers^
|
||||||
orientationcommon.js
|
|
||||||
plugin.js
|
plugin.js
|
||||||
script-1_bug597345.sjs
|
script-1_bug597345.sjs
|
||||||
script-2_bug597345.js
|
script-2_bug597345.js
|
||||||
|
@ -728,14 +726,6 @@ tags = audiochannel
|
||||||
[test_open_null_features.html]
|
[test_open_null_features.html]
|
||||||
[test_openDialogChromeOnly.html]
|
[test_openDialogChromeOnly.html]
|
||||||
tags = openwindow
|
tags = openwindow
|
||||||
[test_orientation_alternate.html]
|
|
||||||
skip-if = true # bug 1312417
|
|
||||||
[test_orientation_frame.html]
|
|
||||||
skip-if = true # bug 1312417
|
|
||||||
[test_orientation_frame_lock.html]
|
|
||||||
skip-if = true # bug 1312417
|
|
||||||
[test_orientation_sandbox_no_lock.html]
|
|
||||||
skip-if = true # bug 1312417
|
|
||||||
[test_plugin_freezing.html]
|
[test_plugin_freezing.html]
|
||||||
skip-if = toolkit == 'android' #CLICK_TO_PLAY
|
skip-if = toolkit == 'android' #CLICK_TO_PLAY
|
||||||
[test_pluginAudioNotification.html]
|
[test_pluginAudioNotification.html]
|
||||||
|
@ -810,8 +800,6 @@ tags = audiochannel
|
||||||
[test_window_indexing.html]
|
[test_window_indexing.html]
|
||||||
[test_window_keys.html]
|
[test_window_keys.html]
|
||||||
[test_window_named_frame_enumeration.html]
|
[test_window_named_frame_enumeration.html]
|
||||||
[test_window_orientation.html]
|
|
||||||
skip-if = true # bug 1312417
|
|
||||||
[test_window_own_props.html]
|
[test_window_own_props.html]
|
||||||
[test_window_proto.html]
|
[test_window_proto.html]
|
||||||
[test_writable-replaceable.html]
|
[test_writable-replaceable.html]
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
function specialPowersLock(orientation) {
|
|
||||||
return SpecialPowers.pushPrefEnv({
|
|
||||||
'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
|
|
||||||
}).then(function() => {
|
|
||||||
var p = screen.orientation.lock(orientation);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function specialPowersUnlock() {
|
|
||||||
return SpecialPowers.pushPrefEnv({
|
|
||||||
'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
|
|
||||||
}).then(function() {
|
|
||||||
screen.orientation.unlock();
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Test for ScreenOrientation API</title>
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="orientationcommon.js"></script>
|
|
||||||
<div id="log"></div>
|
|
||||||
<script>
|
|
||||||
async_test(function(t) {
|
|
||||||
var originalOrientation = screen.orientation.type;
|
|
||||||
var alternateOrientation = originalOrientation == "portrait-primary" ?
|
|
||||||
"landscape-primary" : "portrait-primary";
|
|
||||||
var p = specialPowersLock(alternateOrientation);
|
|
||||||
p.then(function() {
|
|
||||||
t.step(function() { assert_equals(screen.orientation.type, alternateOrientation); });
|
|
||||||
return specialPowersLock(originalOrientation);
|
|
||||||
}).then(function() {
|
|
||||||
t.step(function() { assert_equals(screen.orientation.type, originalOrientation); });
|
|
||||||
return specialPowersUnlock();
|
|
||||||
}).then(function() {
|
|
||||||
t.done();
|
|
||||||
}).catch(t.step_func(function(err) {
|
|
||||||
assert_unreached("Error setting orientation: " + err);
|
|
||||||
t.done();
|
|
||||||
}));
|
|
||||||
}, "Test locking and unlocking orientation.");
|
|
||||||
</script>
|
|
|
@ -1,37 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Test for ScreenOrientation API</title>
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="orientationcommon.js"></script>
|
|
||||||
<div id="log"></div>
|
|
||||||
<iframe id="frame"></iframe>
|
|
||||||
<script>
|
|
||||||
async_test(function(t) {
|
|
||||||
var originalOrientation = screen.orientation.type;
|
|
||||||
var alternateOrientation = originalOrientation == "portrait-primary" ?
|
|
||||||
"landscape-primary" : "portrait-primary";
|
|
||||||
|
|
||||||
window.addEventListener("message", function(event) {
|
|
||||||
t.step(function() { assert_array_equals(event.data, [alternateOrientation, originalOrientation]); });
|
|
||||||
t.done();
|
|
||||||
});
|
|
||||||
|
|
||||||
var frame = document.getElementById("frame");
|
|
||||||
frame.src = "file_record_orientation.html";
|
|
||||||
|
|
||||||
frame.onload = function() {
|
|
||||||
var p = specialPowersLock(alternateOrientation);
|
|
||||||
p.then(function() {
|
|
||||||
return specialPowersLock(originalOrientation);
|
|
||||||
}).then(function() {
|
|
||||||
return specialPowersUnlock();
|
|
||||||
}).then(function() {
|
|
||||||
frame.contentWindow.postMessage("report", "*");
|
|
||||||
}).catch(t.step_func(function(err) {
|
|
||||||
assert_unreached("Error setting orientation: " + err);
|
|
||||||
t.done();
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}, "Test orientation change event in frame.");
|
|
||||||
</script>
|
|
|
@ -1,46 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Test for ScreenOrientation API</title>
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="orientationcommon.js"></script>
|
|
||||||
<div id="log"></div>
|
|
||||||
<iframe sandbox="allow-scripts allow-orientation-lock" id="frame"></iframe>
|
|
||||||
<script>
|
|
||||||
async_test(function(t) {
|
|
||||||
var originalOrientation = screen.orientation.type;
|
|
||||||
var alternateOrientation = originalOrientation == "portrait-primary" ?
|
|
||||||
"landscape-primary" : "portrait-primary";
|
|
||||||
|
|
||||||
var orientationChanges = [];
|
|
||||||
window.screen.orientation.onchange = function() {
|
|
||||||
orientationChanges.push(screen.orientation.type);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.addEventListener("message", function(event) {
|
|
||||||
t.step(function() {
|
|
||||||
assert_equals(event.data, "success");
|
|
||||||
assert_array_equals(orientationChanges, [ alternateOrientation ]);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Return the orientation to its original settings.
|
|
||||||
var p = specialPowersLock(originalOrientation);
|
|
||||||
p.then(function() {
|
|
||||||
return specialPowersUnlock();
|
|
||||||
}).then(function() {
|
|
||||||
t.done();
|
|
||||||
}).catch(t.step_func(function(err) {
|
|
||||||
assert_unreached("Error setting orientation: " + err);
|
|
||||||
t.done();
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
|
|
||||||
var frame = document.getElementById("frame");
|
|
||||||
frame.src = "http://example.com/tests/dom/base/test/file_lock_orientation.html";
|
|
||||||
|
|
||||||
frame.onload = function() {
|
|
||||||
assert_array_equals(orientationChanges, []);
|
|
||||||
frame.contentWindow.postMessage(alternateOrientation, "*");
|
|
||||||
};
|
|
||||||
}, "Test orientation lock from within a frame with sandbox permission.");
|
|
||||||
</script>
|
|
|
@ -1,36 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Test for ScreenOrientation API</title>
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="orientationcommon.js"></script>
|
|
||||||
<div id="log"></div>
|
|
||||||
<iframe sandbox="allow-scripts" id="frame"></iframe>
|
|
||||||
<script>
|
|
||||||
async_test(function(t) {
|
|
||||||
var originalOrientation = screen.orientation.type;
|
|
||||||
var alternateOrientation = originalOrientation == "portrait-primary" ?
|
|
||||||
"landscape-primary" : "portrait-primary";
|
|
||||||
|
|
||||||
var orientationChanges = [];
|
|
||||||
window.screen.orientation.onchange = function() {
|
|
||||||
orientationChanges.push(screen.orientation.type);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.addEventListener("message", function(event) {
|
|
||||||
t.step(function() {
|
|
||||||
assert_equals(event.data, "error");
|
|
||||||
assert_array_equals(orientationChanges, []);
|
|
||||||
t.done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
var frame = document.getElementById("frame");
|
|
||||||
frame.src = "http://example.com/tests/dom/base/test/file_lock_orientation.html";
|
|
||||||
|
|
||||||
frame.onload = function() {
|
|
||||||
assert_array_equals(orientationChanges, []);
|
|
||||||
frame.contentWindow.postMessage(alternateOrientation, "*");
|
|
||||||
};
|
|
||||||
}, "Test orientation lock from within a frame without sandbox permission.");
|
|
||||||
</script>
|
|
|
@ -1,33 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Test for window.orientation</title>
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="orientationcommon.js"></script>
|
|
||||||
<div id="log"></div>
|
|
||||||
<script>
|
|
||||||
async_test(function(t) {
|
|
||||||
var originalOrientation = screen.orientation.type;
|
|
||||||
var alternateOrientation = originalOrientation == "portrait-primary" ?
|
|
||||||
"landscape-primary" : "portrait-primary";
|
|
||||||
|
|
||||||
var originalWindowOrientation = window.orientation;
|
|
||||||
window.onorientationchange = function() {
|
|
||||||
t.step(function() { assert_not_equals(window.orientation, originalWindowOrientation); });
|
|
||||||
|
|
||||||
var p2 = specialPowersUnlock();
|
|
||||||
p2.then(function() {
|
|
||||||
t.done();
|
|
||||||
}).catch(t.step_func(function(err) {
|
|
||||||
assert_unreached("Error unlocking orientation: " + err);
|
|
||||||
t.done();
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
var p1 = specialPowersLock(alternateOrientation);
|
|
||||||
p1.catch(t.step_func(function(err) {
|
|
||||||
assert_unreached("Error locking orientation: " + err);
|
|
||||||
t.done();
|
|
||||||
}));
|
|
||||||
}, "Test window.orientation and orientationchange.");
|
|
||||||
</script>
|
|
Загрузка…
Ссылка в новой задаче