Commit 4f2d3015 authored by mlamouri@chromium.org's avatar mlamouri@chromium.org

Flakyness: fix webmidi/send-messages.html

This is using the new PermissionsHelper.setPermission() method that
prevents race conditions when trying to use testRunner.setPermission.

BUG=519008

Review URL: https://codereview.chromium.org/1314763003

git-svn-id: svn://svn.chromium.org/blink/trunk@201150 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent ce940f7f
...@@ -124,7 +124,6 @@ crbug.com/519001 storage/indexeddb/pending-version-change-stuck-works-with-termi ...@@ -124,7 +124,6 @@ crbug.com/519001 storage/indexeddb/pending-version-change-stuck-works-with-termi
crbug.com/519002 storage/indexeddb/pending-version-change-stuck.html [ Pass Timeout ] crbug.com/519002 storage/indexeddb/pending-version-change-stuck.html [ Pass Timeout ]
crbug.com/519003 [ Mac ] svg/batik/text/xmlSpace.svg [ Failure Pass ] crbug.com/519003 [ Mac ] svg/batik/text/xmlSpace.svg [ Failure Pass ]
crbug.com/519005 webaudio/stereopannernode-no-glitch.html [ Pass Timeout ] crbug.com/519005 webaudio/stereopannernode-no-glitch.html [ Pass Timeout ]
crbug.com/519008 webmidi/send-messages.html [ Pass Timeout ]
crbug.com/410949 http/tests/security/local-image-from-remote-whitelisted.html [ Failure Pass ] crbug.com/410949 http/tests/security/local-image-from-remote-whitelisted.html [ Failure Pass ]
crbug.com/463358 [ Linux Mac Debug ] transforms/2d/hindi-rotated.html [ ImageOnlyFailure ] crbug.com/463358 [ Linux Mac Debug ] transforms/2d/hindi-rotated.html [ ImageOnlyFailure ]
crbug.com/356828 fast/dom/gc-dom-tree-lifetime.html [ Pass Timeout ] crbug.com/356828 fast/dom/gc-dom-tree-lifetime.html [ Pass Timeout ]
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<html> <html>
<head> <head>
<script src="../resources/js-test.js"></script> <script src="../resources/js-test.js"></script>
<script src="../resources/permissions-helper.js"></script>
</head> </head>
<body> <body>
<script> <script>
...@@ -13,9 +14,9 @@ shouldBeDefined("navigator.requestMIDIAccess"); ...@@ -13,9 +14,9 @@ shouldBeDefined("navigator.requestMIDIAccess");
window.jsTestIsAsync = true; window.jsTestIsAsync = true;
testRunner.setPermission('midi-sysex', 'granted', location.origin, location.origin); PermissionsHelper.setPermission('midi-sysex', 'granted').then(function() {
return navigator.requestMIDIAccess({sysex: true});
navigator.requestMIDIAccess({sysex: true}).then(function (a) { }).then(function(a) {
output = a.outputs.values().next().value; output = a.outputs.values().next().value;
// Note on(off). // Note on(off).
...@@ -98,7 +99,7 @@ navigator.requestMIDIAccess({sysex: true}).then(function (a) { ...@@ -98,7 +99,7 @@ navigator.requestMIDIAccess({sysex: true}).then(function (a) {
shouldThrow('output.send(new Uint8Array(), Infinity)'); shouldThrow('output.send(new Uint8Array(), Infinity)');
finishJSTest(); finishJSTest();
}, function () { }).catch(function () {
testFailed("requestMIDIAccess() return an error."); testFailed("requestMIDIAccess() return an error.");
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment