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

Unified Diff: content/browser/accessibility/accessibility_win_browsertest.cc

Issue 2850683002: Remove ScopedComPtr::ReceiveVoid and Add ScopedComPtrRef (Closed)
Patch Set: Add Explicit Created 3 years, 8 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
Index: content/browser/accessibility/accessibility_win_browsertest.cc
diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc
index 4b6f4d735e8d4441a76289a95b5a4a7d21d363f7..2b31d4ef858561b49facf281496a5baaf7ae2d31 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -70,9 +70,8 @@ class AccessibilityWinBrowserTest : public ContentBrowserTest {
base::win::ScopedComPtr<IAccessibleText>* input_text);
void SetUpTextareaField(
base::win::ScopedComPtr<IAccessibleText>* textarea_text);
- template <typename Interface>
void SetUpSampleParagraph(
- base::win::ScopedComPtr<Interface>* com_interface,
+ base::win::ScopedComPtr<IAccessibleText>* accessible_text,
AccessibilityMode accessibility_mode = kAccessibilityModeComplete);
static base::win::ScopedComPtr<IAccessible> GetAccessibleFromVariant(
@@ -231,11 +230,10 @@ void AccessibilityWinBrowserTest::SetUpTextareaField(
}
// Loads a page with a paragraph of sample text.
-template <typename Interface>
void AccessibilityWinBrowserTest::SetUpSampleParagraph(
- base::win::ScopedComPtr<Interface>* com_interface,
+ base::win::ScopedComPtr<IAccessibleText>* accessible_text,
AccessibilityMode accessibility_mode) {
- ASSERT_NE(nullptr, com_interface);
+ ASSERT_NE(nullptr, accessible_text);
LoadInitialAccessibilityTreeFromHtml(
"<!DOCTYPE html><html>"
"<body style=\"overflow: scroll; margin-top: 100vh\">"
@@ -259,7 +257,8 @@ void AccessibilityWinBrowserTest::SetUpSampleParagraph(
LONG paragraph_role = 0;
ASSERT_HRESULT_SUCCEEDED(paragraph->role(&paragraph_role));
ASSERT_EQ(IA2_ROLE_PARAGRAPH, paragraph_role);
- ASSERT_HRESULT_SUCCEEDED(paragraph.QueryInterface(com_interface->Receive()));
+ ASSERT_HRESULT_SUCCEEDED(paragraph.QueryInterface(
+ accessible_text->Receive()));
}
// Static helpers ------------------------------------------------
@@ -1119,8 +1118,11 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
}
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, TestScrollToPoint) {
+ base::win::ScopedComPtr<IAccessibleText> accessible_text;
+ SetUpSampleParagraph(&accessible_text);
base::win::ScopedComPtr<IAccessible2> paragraph;
- SetUpSampleParagraph(&paragraph);
+ ASSERT_HRESULT_SUCCEEDED(
+ accessible_text.QueryInterface(IID_PPV_ARGS(&paragraph)));
LONG prev_x, prev_y, x, y, width, height;
base::win::ScopedVariant childid_self(CHILDID_SELF);
« no previous file with comments | « components/update_client/background_downloader_win.cc ('k') | media/audio/win/audio_low_latency_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698