Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/shapedetection/shapedetection-cross-origin.html

Issue 2857803002: Shape Detection: reconnect LayoutTests (Closed)
Patch Set: Removed expectation files and corrected shapedetection-empty-input test Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src=../../../../resources/testharness.js></script> 2 <script src=../../../../resources/testharness.js></script>
3 <script src=../../../../resources/testharnessreport.js></script> 3 <script src=../../../../resources/testharnessreport.js></script>
4 <script> 4 <script>
5 5
6 // http:// resources are considered cross-origin from the current file://. 6 // http:// resources are considered cross-origin from the current file://.
7 const IMAGE_URL = "http://localhost:8080/security/resources/abe.png"; 7 const IMAGE_URL = "http://localhost:8080/security/resources/abe.png";
8 const VIDEO_URL = "http://localhost:8080/external/wpt/media/white.webm"; 8 const VIDEO_URL = "http://localhost:8080/external/wpt/media/white.webm";
9 9
10 // Returns a Promise that is resolve()d if detect() is rejected. Needs an input 10 // Returns a Promise that is resolve()d if detect() is rejected. Needs an input
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 "FaceDetector should reject cross-origin ImageBitmaps with a SecurityError."); 68 "FaceDetector should reject cross-origin ImageBitmaps with a SecurityError.");
69 69
70 // Verifies that FaceDetector rejects a cross-origin HTMLVideoElement. 70 // Verifies that FaceDetector rejects a cross-origin HTMLVideoElement.
71 promise_test(function(t) { 71 promise_test(function(t) {
72 var video = document.createElement('video'); 72 var video = document.createElement('video');
73 return detectFaceOnElementAndExpectError(video, VIDEO_URL) 73 return detectFaceOnElementAndExpectError(video, VIDEO_URL)
74 .then(error => { 74 .then(error => {
75 assert_equals(error.name, "SecurityError"); 75 assert_equals(error.name, "SecurityError");
76 }); 76 });
77 }, 77 },
78 "FaceDetector should reject cross-origin HTMLImageElements with a SecurityError. "); 78 "FaceDetector should reject cross-origin HTMLVideoElements with a SecurityError. ");
79 79
80 </script> 80 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698