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

Side by Side Diff: content/browser/accessibility/dump_accessibility_tree_browsertest.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &dir_test_data)); 95 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &dir_test_data));
96 base::FilePath test_path(dir_test_data.AppendASCII("accessibility") 96 base::FilePath test_path(dir_test_data.AppendASCII("accessibility")
97 .AppendASCII("html")); 97 .AppendASCII("html"));
98 ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName(); 98 ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
99 99
100 base::FilePath html_file = test_path.Append(base::FilePath(file_path)); 100 base::FilePath html_file = test_path.Append(base::FilePath(file_path));
101 RunTest(html_file, "accessibility/html"); 101 RunTest(html_file, "accessibility/html");
102 } 102 }
103 103
104 std::vector<std::string> Dump() override { 104 std::vector<std::string> Dump() override {
105 scoped_ptr<AccessibilityTreeFormatter> formatter( 105 std::unique_ptr<AccessibilityTreeFormatter> formatter(
106 CreateAccessibilityTreeFormatter()); 106 CreateAccessibilityTreeFormatter());
107 formatter->SetFilters(filters_); 107 formatter->SetFilters(filters_);
108 base::string16 actual_contents_utf16; 108 base::string16 actual_contents_utf16;
109 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>( 109 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(
110 shell()->web_contents()); 110 shell()->web_contents());
111 formatter->FormatAccessibilityTree( 111 formatter->FormatAccessibilityTree(
112 web_contents->GetRootBrowserAccessibilityManager()->GetRoot(), 112 web_contents->GetRootBrowserAccessibilityManager()->GetRoot(),
113 &actual_contents_utf16); 113 &actual_contents_utf16);
114 std::string actual_contents = base::UTF16ToUTF8(actual_contents_utf16); 114 std::string actual_contents = base::UTF16ToUTF8(actual_contents_utf16);
115 return base::SplitString( 115 return base::SplitString(
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 // crbug.com/281952 1342 // crbug.com/281952
1343 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, DISABLED_AccessibilityVideo) { 1343 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, DISABLED_AccessibilityVideo) {
1344 RunHtmlTest(FILE_PATH_LITERAL("video.html")); 1344 RunHtmlTest(FILE_PATH_LITERAL("video.html"));
1345 } 1345 }
1346 1346
1347 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { 1347 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) {
1348 RunHtmlTest(FILE_PATH_LITERAL("wbr.html")); 1348 RunHtmlTest(FILE_PATH_LITERAL("wbr.html"));
1349 } 1349 }
1350 1350
1351 } // namespace content 1351 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698