diff --git a/DEPS b/DEPS index 7f3c010..feca0cb9 100644 --- a/DEPS +++ b/DEPS
@@ -108,7 +108,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '2fc0806f559502882f9d28f2e64445873e0ee884', + 'angle_revision': '8073a9511a1ede4e9efdd4740fd3389abc9e06a6', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling build tools # and whatever else without interference from each other.
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt index dde0c78..8d186391 100644 --- a/chrome/android/profiles/newest.txt +++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-68.0.3425.0_rc-r1.afdo.bz2 \ No newline at end of file +chromeos-chrome-amd64-68.0.3427.0_rc-r1.afdo.bz2 \ No newline at end of file
diff --git a/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc b/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc index a0cfb89..28d8fea 100644 --- a/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc +++ b/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc
@@ -392,7 +392,14 @@ cast_environment->Shutdown(); } -IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) { +#if !defined(OS_MACOSX) +#define MAYBE_RtpStreamError RtpStreamError +#else +// Flaky on Mac https://crbug.com/841986 +#define MAYBE_RtpStreamError DISABLED_RtpStreamError +#endif +IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, + MAYBE_RtpStreamError) { ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html")); }
diff --git a/media/capture/video/video_capture_device_unittest.cc b/media/capture/video/video_capture_device_unittest.cc index 5122a188..a390e052 100644 --- a/media/capture/video/video_capture_device_unittest.cc +++ b/media/capture/video/video_capture_device_unittest.cc
@@ -61,13 +61,11 @@ #define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg #define MAYBE_TakePhoto TakePhoto #define MAYBE_GetPhotoState GetPhotoState -#define MAYBE_CaptureWithSize CaptureWithSize #elif defined(OS_WIN) #define MAYBE_AllocateBadSize AllocateBadSize #define MAYBE_CaptureMjpeg CaptureMjpeg #define MAYBE_TakePhoto TakePhoto #define MAYBE_GetPhotoState GetPhotoState -#define MAYBE_CaptureWithSize CaptureWithSize #elif defined(OS_ANDROID) #define MAYBE_AllocateBadSize AllocateBadSize #define MAYBE_CaptureMjpeg CaptureMjpeg @@ -81,24 +79,19 @@ #define MAYBE_GetPhotoState GetPhotoState #define MAYBE_CaptureWithSize CaptureWithSize #elif defined(OS_LINUX) -// All tests are flaky on Linux: https://crbug.com/831514. Note: the stuff in -// the next comment is a separate issue. - // AllocateBadSize will hang when a real camera is attached and if more than one // test is trying to use the camera (even across processes). Do NOT renable // this test without fixing the many bugs associated with it: // http://crbug.com/94134 http://crbug.com/137260 http://crbug.com/417824 #define MAYBE_AllocateBadSize DISABLED_AllocateBadSize -#define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg -#define MAYBE_TakePhoto DISABLED_TakePhoto -#define MAYBE_GetPhotoState DISABLED_GetPhotoState -#define MAYBE_CaptureWithSize DISABLED_CaptureWithSize +#define MAYBE_CaptureMjpeg CaptureMjpeg +#define MAYBE_TakePhoto TakePhoto +#define MAYBE_GetPhotoState GetPhotoState #else #define MAYBE_AllocateBadSize AllocateBadSize #define MAYBE_CaptureMjpeg CaptureMjpeg #define MAYBE_TakePhoto DISABLED_TakePhoto #define MAYBE_GetPhotoState DISABLED_GetPhotoState -#define MAYBE_CaptureWithSize CaptureWithSize #endif // Wrap the TEST_P macro into another one to allow to preprocess |test_name| @@ -496,7 +489,7 @@ } // Allocates the first enumerated device, and expects a frame. -WRAPPED_TEST_P(VideoCaptureDeviceTest, MAYBE_CaptureWithSize) { +WRAPPED_TEST_P(VideoCaptureDeviceTest, CaptureWithSize) { const auto descriptor = FindUsableDeviceDescriptor(); if (!descriptor) return;
diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc index 2aae477..3458b4a 100644 --- a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc +++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
@@ -364,7 +364,11 @@ memset(&reqbufs, 0, sizeof(reqbufs)); reqbufs.count = buffers.size(); reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - reqbufs.memory = V4L2_MEMORY_MMAP; + if (!image_processor_device_ && output_mode_ == Config::OutputMode::IMPORT) { + reqbufs.memory = V4L2_MEMORY_DMABUF; + } else { + reqbufs.memory = V4L2_MEMORY_MMAP; + } IOCTL_OR_ERROR_RETURN(VIDIOC_REQBUFS, &reqbufs); if (reqbufs.count != buffers.size()) { @@ -433,13 +437,6 @@ } if (output_mode_ == Config::OutputMode::ALLOCATE) { - DCHECK_EQ(kAwaitingPictureBuffers, decoder_state_); - DVLOGF(3) << "Change state to kDecoding"; - decoder_state_ = kDecoding; - if (reset_pending_) { - FinishReset(); - return; - } ScheduleDecodeBufferTaskIfNeeded(); } } @@ -519,6 +516,10 @@ buffer_index), 0); output_record.egl_image = egl_image; + if (output_mode_ == Config::OutputMode::IMPORT) { + DCHECK(output_record.output_fds.empty()); + output_record.output_fds.swap(dmabuf_fds); + } free_output_buffers_.push_back(buffer_index); if (decoder_state_ != kChangingResolution) { Enqueue(); @@ -609,8 +610,11 @@ NOTIFY_ERROR(INVALID_ARGUMENT); return; } - int adjusted_coded_width = stride * 8 / plane_horiz_bits_per_pixel; + if (reset_pending_) { + FinishReset(); + } + int adjusted_coded_width = stride * 8 / plane_horiz_bits_per_pixel; if (image_processor_device_ && !image_processor_) { // This is the first buffer import. Create the image processor and change // the decoder state. The client may adjust the coded width. We don't have @@ -623,13 +627,12 @@ if (!CreateImageProcessor()) return; DCHECK_EQ(kAwaitingPictureBuffers, decoder_state_); - DVLOGF(3) << "Change state to kDecoding"; + } + DCHECK_EQ(egl_image_size_.width(), adjusted_coded_width); + + if (decoder_state_ == kAwaitingPictureBuffers) { decoder_state_ = kDecoding; - if (reset_pending_) { - FinishReset(); - } - } else { - DCHECK_EQ(egl_image_size_.width(), adjusted_coded_width); + DVLOGF(3) << "Change state to kDecoding"; } size_t index = iter - output_buffer_map_.begin(); @@ -654,7 +657,7 @@ } else { // No need for an EGLImage, start using this buffer now. DCHECK_EQ(egl_image_planes_count_, dmabuf_fds.size()); - iter->processor_output_fds.swap(dmabuf_fds); + iter->output_fds.swap(dmabuf_fds); free_output_buffers_.push_back(index); if (decoder_state_ != kChangingResolution) { Enqueue(); @@ -1539,7 +1542,15 @@ sizeof(struct v4l2_plane) * output_planes_count_); qbuf.index = buffer; qbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - qbuf.memory = V4L2_MEMORY_MMAP; + if (!image_processor_device_ && output_mode_ == Config::OutputMode::IMPORT) { + DCHECK_EQ(output_planes_count_, output_record.output_fds.size()); + for (size_t i = 0; i < output_planes_count_; ++i) { + qbuf_planes[i].m.fd = output_record.output_fds[i].get(); + } + qbuf.memory = V4L2_MEMORY_DMABUF; + } else { + qbuf.memory = V4L2_MEMORY_MMAP; + } qbuf.m.planes = qbuf_planes.get(); qbuf.length = output_planes_count_; DVLOGF(4) << "qbuf.index=" << qbuf.index; @@ -2291,11 +2302,6 @@ } egl_image_device_ = image_processor_device_; } else { - if (output_mode_ == Config::OutputMode::IMPORT) { - VLOGF(1) << "Import mode without image processor is not implemented " - << "yet."; - return false; - } egl_image_format_fourcc_ = output_format_fourcc_; egl_image_device_ = device_; } @@ -2432,12 +2438,11 @@ coded_size_, gfx::Rect(visible_size_), visible_size_, processor_input_fds, base::TimeDelta()); - std::vector<base::ScopedFD> processor_output_fds; + std::vector<base::ScopedFD> output_fds; if (output_mode_ == Config::OutputMode::IMPORT) { - for (auto& fd : output_record.processor_output_fds) { - processor_output_fds.push_back( - base::ScopedFD(HANDLE_EINTR(dup(fd.get())))); - if (!processor_output_fds.back().is_valid()) { + for (auto& fd : output_record.output_fds) { + output_fds.push_back(base::ScopedFD(HANDLE_EINTR(dup(fd.get())))); + if (!output_fds.back().is_valid()) { VPLOGF(1) << "Failed duplicating a dmabuf fd"; return false; } @@ -2446,7 +2451,7 @@ // Unretained is safe because |this| owns image processor and there will // be no callbacks after processor destroys. image_processor_->Process( - input_frame, output_buffer_index, std::move(processor_output_fds), + input_frame, output_buffer_index, std::move(output_fds), base::Bind(&V4L2VideoDecodeAccelerator::FrameProcessed, base::Unretained(this), bitstream_buffer_id)); return true; @@ -2564,7 +2569,11 @@ memset(&reqbufs, 0, sizeof(reqbufs)); reqbufs.count = 0; reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - reqbufs.memory = V4L2_MEMORY_MMAP; + if (!image_processor_device_ && output_mode_ == Config::OutputMode::IMPORT) { + reqbufs.memory = V4L2_MEMORY_DMABUF; + } else { + reqbufs.memory = V4L2_MEMORY_MMAP; + } if (device_->Ioctl(VIDIOC_REQBUFS, &reqbufs) != 0) { VPLOGF(1) << "ioctl() failed: VIDIOC_REQBUFS"; NOTIFY_ERROR(PLATFORM_FAILURE);
diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.h b/media/gpu/v4l2/v4l2_video_decode_accelerator.h index 8e150ba..21203f6 100644 --- a/media/gpu/v4l2/v4l2_video_decode_accelerator.h +++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.h
@@ -199,8 +199,8 @@ // from. See TextureManager for details. // Input fds of the processor. Exported from the decoder. std::vector<base::ScopedFD> processor_input_fds; - // Output fds of the processor. Used only when OutputMode is IMPORT. - std::vector<base::ScopedFD> processor_output_fds; + // Output fds. Used only when OutputMode is IMPORT. + std::vector<base::ScopedFD> output_fds; }; //
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 3644dad..bbbb86fc 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -1897,7 +1897,7 @@ crbug.com/520736 [ Win7 ] media/W3C/video/networkState/networkState_during_progress.html [ Failure Pass ] crbug.com/520736 [ Win7 ] virtual/video-surface-layer/media/W3C/video/networkState/networkState_during_progress.html [ Failure Pass ] -crbug.com/841922 [ Mac10.12 ] virtual/video-surface-layer/media/video-controls-focus-movement-on-hide.html [ Failure Pass ] +crbug.com/841922 [ Mac10.12 Mac10.13 Win7 ] virtual/video-surface-layer/media/video-controls-focus-movement-on-hide.html [ Failure Pass ] # gpuBenchmarking.pinchBy is busted on desktops crbug.com/787615 [ Mac Win Linux Fuchsia ] synthetic_gestures/synthetic-pinch-zoom-gesture.html [ Failure Pass ] @@ -2789,6 +2789,7 @@ crbug.com/832071 virtual/navigation-mojo-response/external/wpt/service-workers/service-worker/worker-client-id.https.html [ Failure ] # ====== New tests from wpt-importer added here ====== +crbug.com/626703 [ Retina ] external/wpt/pointerevents/pointerevent_touch-action-svg-test_touch-manual.html [ Skip ] crbug.com/626703 [ Win7 ] external/wpt/pointerevents/pointerevent_pointerout_received_once-manual.html [ Skip ] crbug.com/626703 external/wpt/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-016.html [ Failure ] crbug.com/626703 external/wpt/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-013.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/external/wpt/resources/testharness.js b/third_party/WebKit/LayoutTests/external/wpt/resources/testharness.js index f37d059..29dc6784 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/resources/testharness.js +++ b/third_party/WebKit/LayoutTests/external/wpt/resources/testharness.js
@@ -451,6 +451,50 @@ } }; + /* + * JavaScript shells. + * + * This class is used as the test_environment when testharness is running + * inside a JavaScript shell. + */ + function ShellTestEnvironment() { + this.name_counter = 0; + this.all_loaded = false; + this.on_loaded_callback = null; + Promise.resolve().then(function() { + this.all_loaded = true + if (this.on_loaded_callback) { + this.on_loaded_callback(); + } + }.bind(this)); + this.message_list = []; + this.message_ports = []; + } + + ShellTestEnvironment.prototype.next_default_test_name = function() { + var suffix = this.name_counter > 0 ? " " + this.name_counter : ""; + this.name_counter++; + return "Untitled" + suffix; + }; + + ShellTestEnvironment.prototype.on_new_harness_properties = function() {}; + + ShellTestEnvironment.prototype.on_tests_ready = function() {}; + + ShellTestEnvironment.prototype.add_on_loaded_callback = function(callback) { + if (this.all_loaded) { + callback(); + } else { + this.on_loaded_callback = callback; + } + }; + + ShellTestEnvironment.prototype.test_timeout = function() { + // Tests running in a shell don't have a default timeout, so behave as + // if settings.explicit_timeout is true. + return null; + }; + function create_test_environment() { if ('document' in global_scope) { return new WindowTestEnvironment(); @@ -472,6 +516,10 @@ return new DedicatedWorkerTestEnvironment(); } + if (!('self' in global_scope)) { + return new ShellTestEnvironment(); + } + throw new Error("Unsupported test environment"); } @@ -1610,7 +1658,9 @@ this.phase = this.phases.COMPLETE; - clearTimeout(this.timeout_id); + if (global_scope.clearTimeout) { + clearTimeout(this.timeout_id); + } tests.result(this); this.cleanup(); }; @@ -1925,12 +1975,14 @@ }; Tests.prototype.set_timeout = function() { - var this_obj = this; - clearTimeout(this.timeout_id); - if (this.timeout_length !== null) { - this.timeout_id = setTimeout(function() { - this_obj.timeout(); - }, this.timeout_length); + if (global_scope.clearTimeout) { + var this_obj = this; + clearTimeout(this.timeout_id); + if (this.timeout_length !== null) { + this.timeout_id = setTimeout(function() { + this_obj.timeout(); + }, this.timeout_length); + } } }; @@ -2910,36 +2962,38 @@ var tests = new Tests(); - var error_handler = function(e) { - if (tests.tests.length === 0 && !tests.allow_uncaught_exception) { - tests.set_file_is_test(); - } - - var stack; - if (e.error && e.error.stack) { - stack = e.error.stack; - } else { - stack = e.filename + ":" + e.lineno + ":" + e.colno; - } - - if (tests.file_is_test) { - var test = tests.tests[0]; - if (test.phase >= test.phases.HAS_RESULT) { - return; + if (global_scope.addEventListener) { + var error_handler = function(e) { + if (tests.tests.length === 0 && !tests.allow_uncaught_exception) { + tests.set_file_is_test(); } - test.set_status(test.FAIL, e.message, stack); - test.phase = test.phases.HAS_RESULT; - test.done(); - } else if (!tests.allow_uncaught_exception) { - tests.status.status = tests.status.ERROR; - tests.status.message = e.message; - tests.status.stack = stack; - } - done(); - }; - addEventListener("error", error_handler, false); - addEventListener("unhandledrejection", function(e){ error_handler(e.reason); }, false); + var stack; + if (e.error && e.error.stack) { + stack = e.error.stack; + } else { + stack = e.filename + ":" + e.lineno + ":" + e.colno; + } + + if (tests.file_is_test) { + var test = tests.tests[0]; + if (test.phase >= test.phases.HAS_RESULT) { + return; + } + test.set_status(test.FAIL, e.message, stack); + test.phase = test.phases.HAS_RESULT; + test.done(); + } else if (!tests.allow_uncaught_exception) { + tests.status.status = tests.status.ERROR; + tests.status.message = e.message; + tests.status.stack = stack; + } + done(); + }; + + addEventListener("error", error_handler, false); + addEventListener("unhandledrejection", function(e){ error_handler(e.reason); }, false); + } test_environment.on_tests_ready();
diff --git a/tools/traffic_annotation/scripts/check_annotations.py b/tools/traffic_annotation/scripts/check_annotations.py index 1e117f8..2ff7ae15 100755 --- a/tools/traffic_annotation/scripts/check_annotations.py +++ b/tools/traffic_annotation/scripts/check_annotations.py
@@ -19,6 +19,9 @@ # //tools/traffic_annotation/OWNERS. TEST_IS_ENABLED = True +# Threshold for the change list size to trigger full test. +CHANGELIST_SIZE_TO_TRIGGER_FULL_TEST = 100 + class NetworkTrafficAnnotationChecker(): EXTENSIONS = ['.cc', '.mm',] @@ -67,6 +70,11 @@ file_path)] if not file_paths: return 0 + # If the number of changed files in the CL exceeds a threshold, trigger + # full test to avoid sending very long list of arguments and possible + # failure in argument buffers. + if len(file_paths) > CHANGELIST_SIZE_TO_TRIGGER_FULL_TEST: + file_paths = [] args = ["--test-only", "--limit=%i" % limit, "--error-resilient"] + \ file_paths