Commit 38a28c7a authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

mac: Delete cocoa version of FindBarPlatformHelperMacTest.

Like the uitest change in https://chromium-review.googlesource.com/c/chromium/src/+/1237454

For some reason the CQ didn't catch this issue.

TBR=rsesek

Bug: 832676
Change-Id: Ie58e701f0f7d231432c1636366545ee211c5e712
Reviewed-on: https://chromium-review.googlesource.com/1239761Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593450}
parent 9276195f
...@@ -11,14 +11,12 @@ ...@@ -11,14 +11,12 @@
#include "chrome/browser/ui/find_bar/find_bar.h" #include "chrome/browser/ui/find_bar/find_bar.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h" #include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/views/scoped_macviews_browser_mode.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#import "ui/base/cocoa/find_pasteboard.h" #import "ui/base/cocoa/find_pasteboard.h"
class FindBarPlatformHelperMacTest : public InProcessBrowserTest, class FindBarPlatformHelperMacTest : public InProcessBrowserTest {
public testing::WithParamInterface<bool> {
public: public:
FindBarPlatformHelperMacTest() : scoped_macviews_browser_mode_(GetParam()) {} FindBarPlatformHelperMacTest() {}
~FindBarPlatformHelperMacTest() override = default; ~FindBarPlatformHelperMacTest() override = default;
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
...@@ -31,20 +29,14 @@ class FindBarPlatformHelperMacTest : public InProcessBrowserTest, ...@@ -31,20 +29,14 @@ class FindBarPlatformHelperMacTest : public InProcessBrowserTest,
InProcessBrowserTest::TearDownOnMainThread(); InProcessBrowserTest::TearDownOnMainThread();
} }
static std::string ParamInfoToString(
::testing::TestParamInfo<bool> param_info) {
return param_info.param ? "Views" : "Cocoa";
}
private: private:
test::ScopedMacViewsBrowserMode scoped_macviews_browser_mode_;
NSString* old_find_text_ = nullptr; NSString* old_find_text_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(FindBarPlatformHelperMacTest); DISALLOW_COPY_AND_ASSIGN(FindBarPlatformHelperMacTest);
}; };
// Tests that the find bar is populated with the pasteboard at construction. // Tests that the find bar is populated with the pasteboard at construction.
IN_PROC_BROWSER_TEST_P(FindBarPlatformHelperMacTest, IN_PROC_BROWSER_TEST_F(FindBarPlatformHelperMacTest,
FindBarPopulatedWithPasteboardOnConstruction) { FindBarPopulatedWithPasteboardOnConstruction) {
ASSERT_FALSE(browser()->HasFindBarController()); ASSERT_FALSE(browser()->HasFindBarController());
...@@ -59,7 +51,7 @@ IN_PROC_BROWSER_TEST_P(FindBarPlatformHelperMacTest, ...@@ -59,7 +51,7 @@ IN_PROC_BROWSER_TEST_P(FindBarPlatformHelperMacTest,
} }
// Tests that the find bar is updated as the pasteboard updates. // Tests that the find bar is updated as the pasteboard updates.
IN_PROC_BROWSER_TEST_P(FindBarPlatformHelperMacTest, IN_PROC_BROWSER_TEST_F(FindBarPlatformHelperMacTest,
FindBarUpdatedFromPasteboard) { FindBarUpdatedFromPasteboard) {
FindBarController* find_bar_controller = browser()->GetFindBarController(); FindBarController* find_bar_controller = browser()->GetFindBarController();
ASSERT_NE(nullptr, find_bar_controller); ASSERT_NE(nullptr, find_bar_controller);
...@@ -76,8 +68,3 @@ IN_PROC_BROWSER_TEST_P(FindBarPlatformHelperMacTest, ...@@ -76,8 +68,3 @@ IN_PROC_BROWSER_TEST_P(FindBarPlatformHelperMacTest,
EXPECT_EQ(base::SysNSStringToUTF16(next_string), EXPECT_EQ(base::SysNSStringToUTF16(next_string),
find_bar_controller->find_bar()->GetFindText()); find_bar_controller->find_bar()->GetFindText());
} }
INSTANTIATE_TEST_CASE_P(,
FindBarPlatformHelperMacTest,
::testing::Bool(),
FindBarPlatformHelperMacTest::ParamInfoToString);
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