Commit 3ef1119a authored by Richard Knoll's avatar Richard Knoll Committed by Commit Bot

Fix RemoteCopyBrowserTest on macOS

This is a fix after crrev.com/c/2125047 that checks the notification
icon instead of the image on macOS. Ran the browser_tests manually on a
Mac this time as they don't seem to run on the CQ.

TBR=mvanouwerkerk@chromium.org

Bug: 1065882
Change-Id: I5e9e7ec544612073258565cc5ce2fa7ac277a91a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2127033Reviewed-by: default avatarRichard Knoll <knollr@chromium.org>
Commit-Queue: Richard Knoll <knollr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754534}
parent f3947c5a
......@@ -12,6 +12,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/notifications/notification_display_service_tester.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sharing/shared_clipboard/feature_flags.h"
......@@ -237,8 +238,14 @@ IN_PROC_BROWSER_TEST_F(RemoteCopyBrowserTest, ImageUrl) {
base::ASCIIToUTF16(kDeviceName)),
notification.title());
ASSERT_EQ(message_center::NOTIFICATION_TYPE_IMAGE, notification.type());
#if defined(OS_MACOSX)
// We show the image in the notification icon on macOS.
ASSERT_EQ(640, notification.icon().Width());
ASSERT_EQ(480, notification.icon().Height());
#else
ASSERT_EQ(640, notification.rich_notification_data().image.Width());
ASSERT_EQ(480, notification.rich_notification_data().image.Height());
#endif // defined(OS_MACOSX)
histograms_.ExpectUniqueSample(kStatusCodeHistogram, net::HTTP_OK, 1);
histograms_.ExpectTotalCount(kLoadTimeHistogram, 1);
histograms_.ExpectUniqueSample(kImageSizeBeforeDecodeHistogram, 810490, 1);
......
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