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

Unified Diff: third_party/WebKit/LayoutTests/shapedetection/detection-security-test.html

Issue 2756793002: RELAND: Shape Detection: move the Mac service to the sandboxed GPU process (Closed)
Patch Set: moved shapedetection-security-test.html to non-fast LayoutTests to use the mock mojo service Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/shapedetection/detection-security-test.html
diff --git a/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html b/third_party/WebKit/LayoutTests/shapedetection/detection-security-test.html
similarity index 79%
rename from third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html
rename to third_party/WebKit/LayoutTests/shapedetection/detection-security-test.html
index 9a03b2ea83dacc8bf8871bee2634ce1612e696fa..6d2689cb7bf8bebb5c283e906fe98f95f7881eef 100644
--- a/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html
+++ b/third_party/WebKit/LayoutTests/shapedetection/detection-security-test.html
@@ -1,6 +1,8 @@
<!DOCTYPE html>
-<script src=../../resources/testharness.js></script>
-<script src=../../resources/testharnessreport.js></script>
+<script src=../resources/testharness.js></script>
+<script src=../resources/testharnessreport.js></script>
+<script src="../resources/mojo-helpers.js"></script>
+<script src="resources/mock-facedetection.js"></script>
<script>
// Returns a Promise that is resolve()d if detect() is rejected. Needs an input
@@ -8,8 +10,14 @@
function detectOnElementAndExpectError(createDetector, element, url) {
return new Promise(function(resolve, reject) {
var tryDetection = function() {
- var detector = createDetector();
- detector.detect(element)
+ var theMock = null;
+ mockFaceDetectionProviderReady
+ .then(mock => {
+ return createDetector();
+ })
+ .then(detector => {
+ return detector.detect(element);
+ })
.then(detectionResult => {
reject("Promise should have been rejected.");
})
@@ -28,7 +36,7 @@ var createTestForBadImage = function(createDetector) {
promise_test(function(t) {
var image = new Image();
return detectOnElementAndExpectError(createDetector, image,
- "../../external/wpt/images/broken.png")
+ "../external/wpt/images/broken.png")
.then(function(error) {
assert_equals(error.name, "InvalidStateError");
});
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698