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

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

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/accessibility/dump_accessibility_browsertest_base.h" 5 #include "content/browser/accessibility/dump_accessibility_browsertest_base.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 // Block until the next accessibility notification in any frame. 341 // Block until the next accessibility notification in any frame.
342 VLOG(1) << "Waiting until the next accessibility event"; 342 VLOG(1) << "Waiting until the next accessibility event";
343 AccessibilityNotificationWaiter accessibility_waiter(main_frame, 343 AccessibilityNotificationWaiter accessibility_waiter(main_frame,
344 ui::AX_EVENT_NONE); 344 ui::AX_EVENT_NONE);
345 for (FrameTreeNode* node : frame_tree->Nodes()) 345 for (FrameTreeNode* node : frame_tree->Nodes())
346 accessibility_waiter.ListenToAdditionalFrame(node->current_frame_host()); 346 accessibility_waiter.ListenToAdditionalFrame(node->current_frame_host());
347 accessibility_waiter.WaitForNotification(); 347 accessibility_waiter.WaitForNotification();
348 } 348 }
349 349
350 {
351 LOG(ERROR) << "***";
352 LOG(ERROR) << "***";
353 LOG(ERROR) << "***";
354 RenderFrameHostImpl* main_frame =
355 static_cast<RenderFrameHostImpl*>(web_contents->GetMainFrame());
356 BrowserAccessibilityManager* manager =
357 main_frame->browser_accessibility_manager();
358 LOG(ERROR) << manager->SnapshotAXTreeForTesting().ToString();
359 }
360
350 // Call the subclass to dump the output. 361 // Call the subclass to dump the output.
351 std::vector<std::string> actual_lines = Dump(); 362 std::vector<std::string> actual_lines = Dump();
352 363
353 // Perform a diff (or write the initial baseline). 364 // Perform a diff (or write the initial baseline).
354 std::vector<std::string> expected_lines = base::SplitString( 365 std::vector<std::string> expected_lines = base::SplitString(
355 expected_contents, "\n", base::KEEP_WHITESPACE, 366 expected_contents, "\n", base::KEEP_WHITESPACE,
356 base::SPLIT_WANT_NONEMPTY); 367 base::SPLIT_WANT_NONEMPTY);
357 // Marking the end of the file with a line of text ensures that 368 // Marking the end of the file with a line of text ensures that
358 // file length differences are found. 369 // file length differences are found.
359 expected_lines.push_back(kMarkEndOfFile); 370 expected_lines.push_back(kMarkEndOfFile);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 static_cast<int>(actual_contents.size())); 408 static_cast<int>(actual_contents.size()));
398 LOG(INFO) << "Wrote expectations to: " 409 LOG(INFO) << "Wrote expectations to: "
399 << expected_file.LossyDisplayName(); 410 << expected_file.LossyDisplayName();
400 } 411 }
401 } else { 412 } else {
402 LOG(INFO) << "Test output matches expectations."; 413 LOG(INFO) << "Test output matches expectations.";
403 } 414 }
404 } 415 }
405 416
406 } // namespace content 417 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698